??? 12/15/06 04:05 Read: times |
#129519 - LPC9xx Serial Issue - MSBit always set |
Hi all, I am using an LPC925 and think it is a great wee IC, I have an Acqura PDS900 emulator.
Here is my issue. When I run my application (A simple MODBUS serial string) via the emulator all works well and I successfully send a valid response to each message received, back to the computer. However when I run the application in the microcontroller rather than the emulator the Most Significant Bit (MSBit) of almost all the bytes in the message has been set. for instance. I am monitoring the PC using a serial monitor hhdsoftware.com, this is a great tool. Should receive (at the computer) (messages in hex) 10 03 02 00 00 44 47 Actually receive 90 83 82 00 80 C4 C7 the MSBit does shift around a little within the string, but as you can see only the fourth byte came through OK. I have set the device in Mode 3 and use the baudrate generator, I have the interrupts seperate for TX and RX and have the TX interrupt generated at the end of the stop bit, rather than in the middle of the stop bit as per the standard 8051 as this is easier for RS485 (don't need to delay before turning off the DE). The message is being received from the PC at the microcontroller no problems as it wouldn't reply at all if it was getting corrupted on the way into the controller. I am using a Max232 driver, and also have a Max485 on the same serial port, all hardware appears OK and I get the same result whether using the 232 port or the 485 port, if I send a message from another device on the 485 port and out to the computer (using the same hardware) all is received OK, so it does not appear to be a hardware fault. The Question. Has anyone seen this before, or have any ideas what maybe causing it, knowing that the emulator has no issues at all with the code. My Thoughts I'm suspecting a Framing error where the Stop bit of the previous byte is being sent along with the next byte BUT this does not answer why the very first byte would also have the MSBit set. Then I thought maybe parity or stop bit issue, but again why would this mess up the 1st Bit of each byte. Thanks in advance Regards Marshall Brown |
Topic | Author | Date |
LPC9xx Serial Issue - MSBit always set | 01/01/70 00:00 | |
Using a crystal | 01/01/70 00:00 | |
Crystal | 01/01/70 00:00 | |
the Acqura (can) clock itself | 01/01/70 00:00 | |
Using internal Clock | 01/01/70 00:00 | |
use CLKOUT and a scope | 01/01/70 00:00 | |
Yep - I'll give it a go thanks | 01/01/70 00:00 | |
It Works - Thanks for all the help | 01/01/70 00:00 | |
Best to chip the chip specs | 01/01/70 00:00 | |
Using a crystal | 01/01/70 00:00 | |
LPC925 Internal RC Osc![]() | 01/01/70 00:00 |