??? 02/12/05 09:20 Read: times |
#87194 - this is what is wrong Responding to: ???'s previous message |
With this code:
SERIAL: CLR TI MOV A, #'A' MOV SBUF, A JNB TI, SERIAL SJMP SERIAL you are never waiting for the byte to be sent before writing the next byte. Lets look at what happens. TI is intially cleared. Then you write a char to SBUF. TI will be set only after the char is transmitted. But your jmp say if TI is not set go back to "serial" where you clr TI and write a new char. You need to wait unti TI is set before writing your next char to SBUF Try this: SERIAL: CLR TI MOV A, #'A' MOV SBUF, A JNB TI, $ SJMP SERIAL Bill |
Topic | Author | Date |
what is wrong? | 01/01/70 00:00 | |
Oscilloscope. | 01/01/70 00:00 | |
this is what is wrong | 01/01/70 00:00 | |
thanks | 01/01/70 00:00 | |
signals | 01/01/70 00:00 | |
max232 | 01/01/70 00:00 | |
Review your hardware | 01/01/70 00:00 | |
MAX202 | 01/01/70 00:00 | |
Re: MAX202 | 01/01/70 00:00 | |
change baud rate to 2400/1200 | 01/01/70 00:00 | |
Check this! | 01/01/70 00:00 | |
change caps to 10Uf. | 01/01/70 00:00 | |
maybe 8051 not work | 01/01/70 00:00 | |
capacitor values correct? | 01/01/70 00:00 | |
Re: capacitor values | 01/01/70 00:00 | |
and here![]() | 01/01/70 00:00 |