H8/3867 Synchronous Uart False Clocks...

Does anybody know how to reset an H8 /3867 synchronous uart when it is part way through receiving a data byte? I have tried toggling the RE bit, apparently to no avail.

I believe that noise may be causing a false clock so that the uart clocks in the first bit. Some period later, the real data is sent and the uart will raise RDRF after 7 bits have been received. One protection against this would be to reset the uart when expecting data. There is no obvious way that I can see to do this, except by toggling RE, but this appears not to work. Does anyone know if toggling RE does indeed reset the receiver? I guess there must be some kind of FSA which returns to its initial state after

8 clocks. Is there any other way to persuade it to reset?

Many thanks,

Paul

Reply to
Paul Hackney
Loading thread data ...

Plenty of experience with asynchronous on H8 (see sig)

Why do it that way?

How can you be sure that the time between toggling off and on again will ensure that no more data bits will be received?

You do of course do at least two read cycles to clear all the receive buffers as well.

Alternativeley you reenabled BEFORE the last data bits have passed.

Which is what synchronous mode is supposed to do, raise RDRF after

8 bits of data.

Normally RE just enables/disables the receiver, it does NOT reset the receiver.

Even in asynchronous mode when enabling the receiver it is always advisable to discard the first at least two bytes received as there may have been data on the receive line which will give scrambled results.

Why do you need to reset the receiver at all?

The simpler method is discard known garbage data, as you must be using some form of synchronisation process with the data.

Monitor the I/O pin for a known idle period before enabling the receiver. Once you have valid bytes being received just leave the receiver enabled.

--
Paul Carpenter		| paul@pcserv.demon.co.uk
        Main Site
              GNU H8 & mailing list info.
             For those web sites you hate.
Reply to
Paul Carpenter

Paul,

Thanks for your reply. You ask a couple of questions which I shall attempt to answer.

Why toggle RE? An attempt to reset the uart, is the short answer; normally the uart is permanently enabled.

Why do I need to reset the receiver? Again, normally I wouldn't, but if a glitch on the line causes a false clock I need to reset the internal state to its initial state when I am expecting real data, otherwise the data will be corrupt.

You have given me an idea though ;-)

Paul.

Reply to
Paul Hackney

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.