We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
I have connected the P89LPC932 microcontroller to the PC That does not work, you must connect the LPC932 to a MAX232 (equivalent) Erik
"The communication seems to be OK ... but I don't get the correct characters" So it's obviously not OK, then, is it?! Are you absolutely certain that you have everything setup the same on both the PC and the micro: baud rate, number of data bits, parity, stop bits...? Have you tried it in the simulator: Run your code in the simulator, and direct the UART to the PC COM: port. Then connect that COM to another PC (or another COM port on the same PC) and do the Hypoterminal test. If this works, it shows that your basic procedures are OK - the problem then must be either in your hardware, or your UART and/or port setup.
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!