Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Eugene Yong
04/02/07 13:39
Modified:
  04/02/07 13:41

Read: 1001 times
Malacca
Malaysia


 
#136440 - system froze when connected to hyperterminal
Responding to: Eugene Yong's previous message
thank you very much everyone's response, it's very much appreciated. i have start working on the software now but i stumbled across a problem where the 8051 hang once i tried to connect it to Hyperterminal, in another word the whole system stop responding until i disconnected the hyperterminal connection. The reason i was doing this is to make sure that the microcontroller can succesfully send a byte of character out to the hyperterminal. where is my mistake?

void initialize(void){

.
.
.
.
TMOD = 0x21; // T0=16-bits, T1=8-bits auto reload

//set up timer 0 for other interrupts, i.e : sensors routine 
TH0 = 0xFC;  
TL0 = 0x65;
ET0 = 1;
TR0 = 1; 

//set up timer 1 for UART bauding.
SCON = 0x40;      // Serial Mode 1
TH1 = 0xFF;       // 19200 BAUD @ 11,059,000 Hz
TR1 = 1;

EA = 1;
.
.
.
}

void putch(char val) // function to output a single byte character to SBUF
{ 
TI = 0; // transmit flag = 0
SBUF = val; // place the character on SBUF 
while (TI == 0); //wait for the completion of transmission
} 

void main(void)
{
initialize();

while(1){
//LCD Display function call here
//Keypad scanning/decoding function here
if(button pressed) putch('A');
}

}

//If button 1 is pressed


I create the program such that if a certain button is pressed, character 'A' will be sent to the Hyperterminal. The LCD Display was working fine and the keypad is working to scroll through a pre-defined menu, but once the Hyperterminal is connected, everything simply froze until i disconnected the connection again.

Please help!

List of 72 messages in thread
TopicAuthorDate
Serial Communication Related Problem        Eugene Yong      03/06/07 10:49      
   partial answers      Patrick De Groote      03/06/07 11:07      
      Oh yeah, i forgot about that      Eugene Yong      03/06/07 12:09      
   FIRST, THEN, THEN, THEN      Erik Malund      03/06/07 11:10      
      A little bit of sarcasm as usual but often helpful      Eugene Yong      03/06/07 12:25      
         Proper baud rate...      Dave Brooks      03/06/07 12:52      
            baud rate      Erik Malund      03/06/07 13:01      
               calculator      Dave Brooks      03/06/07 13:11      
            modem is autobauding      Jan Waclawek      03/06/07 16:04      
               Noted      Eugene Yong      03/06/07 21:00      
   Some answers      Lynn Reed      03/06/07 11:14      
      Thanks for a patience reply      Eugene Yong      03/06/07 12:33      
   Nothing to add, but ...      Joseph Hebert      03/06/07 11:29      
      i second(ed) that motion      Erik Malund      03/06/07 11:44      
         My location profile?      Eugene Yong      03/06/07 12:38      
            with this known, it would do no good ...      Erik Malund      03/06/07 12:40      
               Radio Shack      Lynn Reed      03/06/07 12:45      
                  Even so      Neil Kurzman      03/06/07 20:44      
                     I can buy it from the local electronic shop      Eugene Yong      03/06/07 20:52      
            Sarcasm      Neil Kurzman      03/06/07 20:52      
               I agree      Eugene Yong      03/06/07 20:57      
      Thanks for understanding and recommendation! - NT      Eugene Yong      03/06/07 12:35      
      More info      Russell Bull      03/06/07 22:28      
         you need to understand the parameters.      Mike Stegmaier      03/07/07 06:28      
            "more valid" evidently means invalid      Erik Malund      03/07/07 07:04      
            not quite      Patrick De Groote      03/07/07 07:29      
               What a wonderful example that when total crap is s      Erik Malund      03/07/07 07:44      
                  lesson      Patrick De Groote      03/07/07 11:43      
            No, it doesn't      Andy Neil      04/03/07 00:37      
   TxD pin to TxD pin?      Eugene Yong      03/07/07 15:31      
      dte-dce-dce-dte      Patrick De Groote      03/07/07 16:00      
         Noted! Thanks!      Eugene Yong      03/07/07 16:20      
            same request question      Jecksons Ben      03/07/07 21:38      
      Meaning of "Transmit"      Andy Neil      04/03/07 04:37      
   same request question 2      Jecksons Ben      03/07/07 21:54      
   Initial command sending code; help me take a look!      Eugene Yong      03/09/07 01:50      
      Make it simple for yourself      Russell Bull      03/09/07 02:50      
         Why the need of circular buffer? Receiving?      Eugene Yong      03/09/07 04:05      
            polling versus interrupt      Patrick De Groote      03/09/07 05:17      
               Check OK string at RXD or DCD at interupt?      Jecksons Ben      03/09/07 21:27      
                  no good      Patrick De Groote      03/10/07 02:14      
                     Voice mode only! No data communication.      Eugene Yong      03/10/07 04:09      
                        you are missing the basics      Patrick De Groote      03/10/07 04:26      
                           NO carrier sent after DCD didn't found      Jecksons Ben      03/11/07 19:54      
                              I do not agree      Patrick De Groote      03/12/07 00:37      
                                 Interupt DCD signal for clear transmission      Jecksons Ben      03/15/07 01:15      
                        For Voice Dialling      Muhammad Fauzan      03/19/07 12:33      
                           and by the way      Muhammad Fauzan      03/19/07 12:36      
                           Sorry for multiposting      Muhammad Fauzan      03/19/07 12:58      
                           The ";" works but...      Eugene Yong      03/22/07 19:46      
                              ";" to return to idle state      Muhammad Fauzan      03/24/07 16:48      
                              +++ with 3 seconds no modem activity      Charles Bannister      03/25/07 03:41      
                                 +++ escape sequence      Andy Neil      03/25/07 07:07      
                                    Monkey See. Monkey Do.      Charles Bannister      03/25/07 08:14      
                                       Now monkey also understand?      Andy Neil      03/26/07 00:26      
                                 Are you mistaken?      Eugene Yong      03/25/07 23:36      
                                    I think so      Andy Neil      03/26/07 00:24      
            Circular buffers      Russell Bull      03/23/07 00:42      
               Initial code for receiving modem response      Eugene Yong      03/26/07 10:38      
                  don't fiddle with the timer, let it run      Erik Malund      03/26/07 10:43      
                     Understood, will run TR1 in global init, thx! - NT      Eugene Yong      03/26/07 10:48      
                  check this out, Eugene...      Dave Brooks      03/26/07 10:52      
                     Ah! Didn't know that! Thanks! -NT      Eugene Yong      03/26/07 11:09      
                     Code; modem commands & responses      Andy Neil      03/26/07 11:23      
   V.250 (formerly V.25-ter) - get it free!      Andy Neil      03/26/07 14:28      
   code,modem command and response      Jecksons Ben      04/01/07 20:20      
   system froze when connected to hyperterminal      Eugene Yong      04/02/07 13:39      
      Your code...      Russell Bull      04/02/07 23:48      
         It should not be a hardware problem since..      Eugene Yong      04/03/07 01:43      
            Not necessarily      Andy Neil      04/03/07 02:42      
      Just taking a stab at it...      Chris Singer      04/03/07 10:22      
         two 'ugly' guesses      Erik Malund      04/03/07 10:44      

Back to Subject List