| ??? 12/01/02 23:25 Read: times |
#33527 - RE: Serial programming problem |
Thanks Michael. However I still cannot get the program to output to the screen. I'm attaching the code below. I use the Keil compiler to first assemble the code. Then I use hper terminal to send the hex file to the 8051. Finally I enter the starting address of assemled program and the program executes. This is were I'm not sure what should happen. WhenI press keys from my keyboard nothing happens. I think its because the program is continuosly looping right? How do I capture the keys and output them to screen?
Once again thanks for your help and all the other guys who answer the queries. START EQU 8100H ORG START MAIN: LCALL INIT LCALL INCHAR ANL A, #05FH LCALL OUTCHAR JMP MAIN INIT: MOV SCON, #52H MOV TMOD, #20H MOV TH1, #0FDH ; set baud rate 9600 SETB TR1 RET INCHAR: JNB RI,$ CLR RI MOV A, SBUF RET OUTCHAR: CLR TI MOV SBUF,A AGAIN: JNB TI, AGAIN RET END |
| Topic | Author | Date |
| Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
| RE: Serial programming problem | 01/01/70 00:00 | |
RE: Serial programming problem | 01/01/70 00:00 |



