??? 07/09/06 01:30 Read: times |
#119853 - Serail Com codes |
Hi. I made my first RS232 hardware... Simple... 89C51 connected to MAX232.
I downloaded the following code from 8052.com : MOV SCON,#01110000B MOV TH1,#0FDH MOV TCON,#01010101B MOV TMOD,#00100001B START: JNB RI,START CLR RI MOV A,SBUF MOV SBUF,A SJMP START It worked well. You push some key on your PC Keyboard goes to your uC and back to your PC to show the key in the monitor. Then I said... Ok... I'll make a VERY BIG change: MOV SCON,#01110000B MOV TH1,#0FDH MOV TCON,#01010101B MOV TMOD,#00100001B mov R0, #65h START: JNB RI,START CLR RI MOV A, R0 ;SBUF MOV SBUF,A ACALL delay SJMP START delay: djnz R0, delay djnz R0, delay ret Now it's not working.... :( The only thing I want to do is send what I have in R0 (or other registers) to my PC and show it on the sceen.... Only that... But with those lines I added now it's not working... How should I send a Register content to SBUF? Can you help me? Thank you. |
Topic | Author | Date |
Serail Com codes | 01/01/70 00:00 | |
How do you Know | 01/01/70 00:00 | |
I solved the problem for Serial Comm | 01/01/70 00:00 | |
Delay | 01/01/70 00:00 | |
Sorry David, that's not correct. | 01/01/70 00:00 | |
Delay correct | 01/01/70 00:00 | |
David referred to...![]() | 01/01/70 00:00 |