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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/02/09 02:14
Read: times


 
#162992 - thank you
Responding to: ???'s previous message
Thank you for the reply. It looks like the TI bit wasn't included in the sample code I was using to test my MAX232 circuit. I have changed the code to the following:

$MOD831
CSEG

ORG 0000h
	LJMP BEGIN
ORG 40h

BEGIN:
	MOV SCON,#01110000B ; Mode 1/Stop b/Rec en/x/x/Flags
	MOV TH1,#0FDh ; Reload value for 9600 Bd
	MOV TCON,#01010101B ; Fl1/Tim1 on/Fl0/Tim0 on/Ext1-edge/Ext0-edge
	MOV TMOD,#00100001B ; Gate1/Timer/Mode 2/Gate0/Timer/Mode 1
START:
	JNB RI,$ ; Sit here and wait for the Rx. Int. bit to go high
	MOV A,SBUF ; Move the rcv'd character to the acc.
	CLR RI ; Clear the Rx. Int. bit
	CLR TI ; Clear the Tx. Int. bit
	MOV SBUF,A ; Send out the rcv'd character
	JNB TI,$ ; Wait here until the Tx is complete
	LJMP START ; Jump back to Start to repeat the process

 


I still do not get anything back from the uC when I send it a character from HyperTerm using this program. I am clearly missing something here. Thoughts?


List of 23 messages in thread
TopicAuthorDate
serial comm problem            01/01/70 00:00      
   what about TI?            01/01/70 00:00      
      thank you            01/01/70 00:00      
         Be better...            01/01/70 00:00      
            no luck            01/01/70 00:00      
               Settings            01/01/70 00:00      
               What is your XTAL frequency ?            01/01/70 00:00      
                  parity and XTAL            01/01/70 00:00      
                     Eh ?            01/01/70 00:00      
                        one or the other            01/01/70 00:00      
                           my mistake            01/01/70 00:00      
                           scope pictures            01/01/70 00:00      
                              whatizit?            01/01/70 00:00      
                                 where I measured it...            01/01/70 00:00      
                                    waveforms look OK            01/01/70 00:00      
                                       question            01/01/70 00:00      
                                          LSBit comes first after startbit            01/01/70 00:00      
                                       cable            01/01/70 00:00      
                                          isolation and ESD protection            01/01/70 00:00      
                                             I have blown very few, if any, MAX232's            01/01/70 00:00      
                              Your scope trace looks normal            01/01/70 00:00      
                                 more pics            01/01/70 00:00      
                                    show picture at PC side            01/01/70 00:00      

Back to Subject List