Hello everybody I have connected the P89LPC932 microcontroller to the PC and try to send and receive characters using the windows hyperterminal. The communication seems to be OK, interruptions work, but I don't get the correct characters in neither of the directions, only strange characters: ASCII 233, 234, 235 ... I've checked the physical connections several times, I don't think is a matter of hardware. I've also connected two PCs to check the ports and the cable, and it's ok. The code was generated with the code architect, so I guess it's ok. Has anyone an idea? Thanks
Thanks for your replies, I use the MAX232 and this configuration: Hyperterminal: bps: 9600 data bits: 8 parity: none stop bits: 1 fLow control: none Micro (code architect): Mode 1 (8 bits, variable baud rate) Desired baud rate: 9600 Use baud rate generator Combined tx and rx interrupts The program I have tested just returns an echo. Now I have tested the same but I have made a Visual Basic program to control exactly what I send, instead of using the hyperterminal. The port is configured as follows: MSComm1.Settings = "9600,N,8,1" I send Hex numbers corresponding to characters, sometimes the micro returns no printable characters and others I receive a framing error ... I know that the most likely cause is a difference in the baud rates, but I think they are OK. I'll check the hardware again ...
Now it works ... I had worked out the baud rate generator for a clock frequency of 12Mhz, and the internal oscilator is 7,373 ... Thank you anyway!