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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/19/08 03:22
Read: times


 
#159189 - what is wrong with this RX code
For the AT89LP4052 - can't seem to get it to RX - RS232 but according to bible code is correct. What am I missing?

I can send the 9600 baud code to a printer and it prints correctly - but when trying to decode that same 9600 baud
with this board it doesn't see it.
Also set a spare port pin to emulate what RI is doing and it is always high - never goes low.

;
;***************************
;**ENABLE SERIAL INTERRUPT**
;***************************
;
;
MOV SCON,#50H ;SERIAL MODE 1
MOV TMOD,#20H
MOV TH1,#253D ;RELOAD VALUE FOR 9600 BAUD
CLR RI ;READY TO RECEIVE
CLR TI ;READY TO XMIT NOT USED
SETB TR1 ;TIMER1 ON
;
;
MAINPGM:CALL ALLOFF ;ALL A6821 OUTPUTS SET OFF
;
MAIJJ: JB RI,SERIN ;WAIT FOR CPU RX FLAG
;
;
JMP MAIJJ
;
SERIN: CALL SDATAIN
JMP MAIJJ
;
;BELOW ABBREVIATED FOR SIMPLICITY
;
SDATAIN:MOV A,SBUF
CLR RI
CJNE A,#2AH,NOT_AST
JNB RI,$
MOV A,SBUF
CLR RI
CJNE A,#4EH,NOT_N
RET

List of 7 messages in thread
TopicAuthorDate
what is wrong with this RX code            01/01/70 00:00      
   pcon.7=?            01/01/70 00:00      
   pcon.7=?            01/01/70 00:00      
   XTAL?            01/01/70 00:00      
      11.0592 MHz            01/01/70 00:00      
         rx byte processing too long???            01/01/70 00:00      
            HOUSEKEEPING PROBLEM            01/01/70 00:00      

Back to Subject List