Receive string from Uart (by Ken)
Hi all,
I have project send and receive data between a servo driver and MCU, baudrate is 19200. I wrote a LD at baudrate 2400 it working and read value ok, but at 19200 it working wrong. How i read value in string from servo driver? the string send to MCU at format: ";number"
(no subject) (by Ken)
Thanks MGP,
Really, i don't know about how to use cycle time and how it impact to program, can you help me about this one?
(no subject) (by MGP)
Let us count on the assumption that 1 letter consists of 10 bits, then with 19200B you can receive about 1920 letters per second or 1 letter needs 0.5 mS.
That's too fast for LDmicro with a 1mS cycle time because you need 1 cycle time to receive and 1 cycle to process.
You have 2 options, either you reduce the baudrate or you check the incoming speed by handshaking, something LDmicro cannot do.
You can switch off the cycle time by setting it to 0, then the program will run at its fastest, the disadvantage is that the timers will no longer be correct.
If it still doesn't work then your program is too long to receive at 19200b.
In general 19200 is too fast to work properly and 9600 is just about the maximum in LDmicro.