Forums

How to Avoid Idle Signal on Ethernet Cable IEEE 802.3

Started by Klaus Kragelund September 19, 2013
On 23.9.13 10:21 , Jasen Betts wrote:

> Getting 3.5+ character-times of slience out of a 16540 UART seems tricky, > > Perhaps wait for the shift-register0-empty flag to be set and then turn off > the transmitter then send 4 characters of dummy data, and wait for > the empty flag again. (that gets you 4+ character times)... > > I don't expect that will be easy to do with a typical OS-provided serial > driver, and a USB UART would be even worse,
To add insult to injury, the requirement for timed framing makes it impossible to use hardware FIFOs, as they lose the timing. -- -TV
On 23 Sep 2013 07:21:24 GMT, Jasen Betts <jasen@xnet.co.nz> wrote:

> >Getting 3.5+ character-times of slience out of a 16540 UART seems tricky, > >Perhaps wait for the shift-register0-empty flag to be set and then turn off >the transmitter then send 4 characters of dummy data, and wait for >the empty flag again. (that gets you 4+ character times)... > >I don't expect that will be easy to do with a typical OS-provided serial >driver, and a USB UART would be even worse,
The 14550 UART is a brain dead construction even for RS-485, not to mention Modbus RTU. In that idiot design, you can get an interrupt, when the last byte is transferred _into_ the shift register. For any practical RS-485 purposes, the only interesting time is when the last transmitted message last stop bit has been actually sent. For the idiotic 14550 chip the only way to detect this is by polling (busy looping) a HW register (no interrupt available), until that bit is actually sent. While this might be acceptable for single thread executive like PC/MS-DOS, this is completely unacceptable in any multitasking environment.
On 23.9.13 11:00 , upsidedown@downunder.com wrote:
> On 23 Sep 2013 07:21:24 GMT, Jasen Betts <jasen@xnet.co.nz> wrote: > >> >> Getting 3.5+ character-times of slience out of a 16540 UART seems tricky, >> >> Perhaps wait for the shift-register0-empty flag to be set and then turn off >> the transmitter then send 4 characters of dummy data, and wait for >> the empty flag again. (that gets you 4+ character times)... >> >> I don't expect that will be easy to do with a typical OS-provided serial >> driver, and a USB UART would be even worse, > > The 14550 UART is a brain dead construction even for RS-485, not to > mention Modbus RTU. > > In that idiot design, you can get an interrupt, when the last byte is > transferred _into_ the shift register. For any practical RS-485 > purposes, the only interesting time is when the last transmitted > message last stop bit has been actually sent. > > For the idiotic 14550 chip the only way to detect this is by polling > (busy looping) a HW register (no interrupt available), until that bit > is actually sent. > > While this might be acceptable for single thread executive like > PC/MS-DOS, this is completely unacceptable in any multitasking > environment.
Remember that the 8250 (base model for PC async serial interface) was made for RS-232 modem connections. It is not interesting when sending is done, only when more can be pushed to the pipeline. The same applies even more to the newer versions with FIFOs. -- -TV
On Thu, 19 Sep 2013 20:23:59 -0400, Spehro Pefhany wrote:

> On Thu, 19 Sep 2013 13:30:12 -0700 (PDT), the renowned Klaus Kragelund > <klauskvik@hotmail.com> wrote:
>>Is there any way to "tell" the PC to use a specific standard so its >>possible to have the scope trigger on a TCP/IP packet?
> Have you tried Wireshark (free)?
One thing you have to remember about wireshark is that it has to be in the same domain as your endpoints: either on one of them, listening to the same interface used for communication, or on a network HUB. If you connect it to the network switch, it will only see the broadcast traffic. Sorry for being Cap't Obvious here but it's easy to forget this unless you work with it all the time---ask me how I know.
On a sunny day (Mon, 23 Sep 2013 23:00:21 +0300) it happened
upsidedown@downunder.com wrote in
<rn6149dvvova3p7qm5b99gt0a0qju2g4vf@4ax.com>:

>On 23 Sep 2013 07:21:24 GMT, Jasen Betts <jasen@xnet.co.nz> wrote: > >> >>Getting 3.5+ character-times of slience out of a 16540 UART seems tricky, >> >>Perhaps wait for the shift-register0-empty flag to be set and then turn off >>the transmitter then send 4 characters of dummy data, and wait for >>the empty flag again. (that gets you 4+ character times)... >> >>I don't expect that will be easy to do with a typical OS-provided serial >>driver, and a USB UART would be even worse, > >The 14550 UART is a brain dead construction even for RS-485, not to >mention Modbus RTU. > >In that idiot design, you can get an interrupt, when the last byte is >transferred _into_ the shift register. For any practical RS-485 >purposes, the only interesting time is when the last transmitted >message last stop bit has been actually sent. > >For the idiotic 14550 chip the only way to detect this is by polling >(busy looping) a HW register (no interrupt available), until that bit >is actually sent. > >While this might be acceptable for single thread executive like >PC/MS-DOS, this is completely unacceptable in any multitasking >environment.
I dunno exactly, but you could set a timer, and test the bit in that timer interrupt, that way the code can continue. Or test the bit the next time the scheduler was around. Slower, perhaps, but what is slow.. Preemptive?