Hi Gert,
No need to fiddle with the Keybuffer on the LCD, the MBED has plenty of ports and my poller works just fine.
It's just the UDP to serial thats buggin me :)
I think im going to solve it this way, since UDP is allmost a guarantee to loose a few data packets:
The app server will send 8 16 byte packets to the MBED, which will store them in 8 16 byte char arrays, then the app server will read back to verify the transfers, set a message length field and then toggle a complete flag.
The MBED waits for the complete flag, and then starts a 100us timer that will send 1 to 8 16 byte char arrays to the LCD in 100us intervals, based on the message length field.
This will ensure that the 8 16 byte char arrays in the app server are mirrored on the LCD, even if UDP packets gets lost along the way :)
Should i write out to the LCD in the mail loop:
while (1) {
net->poll(); Check for network traffic
if (CompleteLcdFlag) {WriteToLCD();};
}
Or give WriteToLCD() it's own independent timer?
What do you think ?
Theo (NL)
Hi guys,
I'm trying to get a project up that listens to UDP on port 4444 and transmits the payload to a serial LCD on P9 and P10.
Small packets go well, but if i try to send 80 bytes of stars "*" the LCD display shows part of the the 80 stars, and / or random garbage.
I presume the serial transmission get screwed up by a 10Ms timer that polls 14 switches.
Normally i would let the UDP receive dump the message in some fifo buffer, and let a seperate "thread" write it out to the serial.
Any suggestions on how to "ruggedize" the write to LCD?
:EDIT:
If you scroll down, you can follow my travels over hope and dispair to the final (working) solution.
Theo (NL)