??? 11/15/05 13:05 Read: times |
#103737 - serial communication help |
I´m trying to comunicate my at89s8052 with the PC vía MAX232 though I had no response. Is there something wrong with the code?
By the way, is there a way to simulate the serial comunication with the 8052 simulator or with pinnacle 52? Because I´m able to simulate the recive byte, but I don´t know how to see the Tx data. PS. the cristal is 12MHz the code is suposed to replicate the recived byte 'TIMER EQU $07 'WMCON DATA 96h ' ' DEFSEG programa, START = $0000, ABSOLUTE, CLASS = CODE ' SEG programa ' ' ORG 0H ' JMP PPAL ' ORG 03H ' RETI ' ORG 0BH ' RETI ' ORG 13H ' RETI ' ORG 01BH ' RETI ' ORG 023H ' JMP HAND_SHAKE ' ORG 02BH ' RETI ' ORG 030H ' 'PPAL: ' CLR IE.7 ' MOV SP,#060H ' SETB IE.7 ' CALL INICIALIZACION ' 'COMIENZO: ' CLR C ' JMP COMIENZO ' 'INICIALIZACION: ' CALL INICIO_RS232 ' RET ' 'INICIO_RS232: ' SETB IE.7 ' SETB IE.4 ' SETB IP.4 ' MOV PCON, #080H ' MOV TH1, #0FAH ' MOV SCON, #01010000B ' MOV TMOD, #00100001B ' MOV TCON, #01000000B ' RET ' ' 'SEND: ' MOV SBUF,A ' JNB TI,$ ' CLR TI ' RET ' 'HAND_SHAKE: ' CLR EA ' PUSH ACC ' PUSH PSW ' PUSH DPL ' PUSH DPH ' CLR RI ' MOV A,SBUF ' CALL SEND ' ' POP DPH ' POP DPL ' POP PSW ' POP ACC ' ' SETB EA ' RETI ' END |
Topic | Author | Date |
serial communication help | 01/01/70 00:00 | |
you have a wait in an ISR, that is a no- | 01/01/70 00:00 | |
12MHz is not the best choice for crystal | 01/01/70 00:00 | |
Baud rate calculator | 01/01/70 00:00 | |
I´ll try 11.0592 Xtal | 01/01/70 00:00 | |
Pinnacle 52 will do it. | 01/01/70 00:00 | |
tjhe baud rate calculator... | 01/01/70 00:00 | |
Error | 01/01/70 00:00 | |
Hardware test | 01/01/70 00:00 | |
Software test | 01/01/70 00:00 | |
...after the Xtal changed to 11.0592MHz. | 01/01/70 00:00 | |
I was about to edit ... | 01/01/70 00:00 | |
Sorry... | 01/01/70 00:00 | |
probably an excellent test | 01/01/70 00:00 | |
So simple and useful | 01/01/70 00:00 | |
serial communication | 01/01/70 00:00 | |
up to you | 01/01/70 00:00 | |
procom; rs232hex![]() | 01/01/70 00:00 |