I have connected a RS485 chip to my FEZ (COM1). I am able to send an receive data at the desired baudrate. That’s all fine. There is however one thing that bothers me.
When TX has finished I need to disable the transmitter and start listening the RS485 line. This is done by looking at the nr of bytes left to be written. When there are no bytes left to be written, I just wait an extra millisecond before I disable the transmitter. All this is done in a seperate thread. The thread normally is suspended and resumed when I’m starting TX. Nothing wrong with this either.
What bothers me is the time it (sometimes) takes before this thread is actually started. Most of the time the transmitters is disabled in 1.5 msec. Sometimes however it takes much longer, up to 200 msec, for no reason at all.
Any of you guys knows a better way to handle this?