??? 10/29/03 03:15 Read: times |
#57417 - RE: RS232 Serial port problem Responding to: ???'s previous message |
I think I have a similar problem. When I send three 1s for example, I get two 1s and then another symbol different from the one I send. I am checking this on an LCD display that works. I am using HyperTerminal on my PC. I used a MAX232 that worked perfectly and an AT89C52 as microcontroller. Here's my code:
ORG 0 JMP principal ORG 23H JMP Rx principal: MOV SP, #070H MOV TMOD, #020H; MOV TH1, #0FAH; 4800 baud/s @11.059Mhz MOV SCON, #050H; MOV IE, #090H SETB TR1; arranca T1 JMP $ Rx: ;--------------------------------- RECEPCIĆN PUSH ACC PUSH PSW JB TI, salirRx CLR RI CALL printonLCD salirRx: CLR TI POP PSW POP ACC RETI Does any of you know what the source of the error might be? I'm sending 4800 bits/s, 8 data bits, no parity, 1 stop bit, and no flow control on the HyperTerminal. Thanks! Eduardo Hurtado |