Page 1 of 1

Electrical characteristics

Posted: 12 July 2006, 17:29 PM
by DH*
How hard are the electrical characteristics given in the ATMega32 datasheet (p285)?

I have a device (X10 MR26A) that is designed to connect to a PC serial port. It draws its power from DTR & RTS, using a 3V regulator (HT103) to supply its RF receiver circuitry and a PIC12C508A which bit-bangs a 9600 8N1 output. (It uses the PC TXD line to power its LED.) I suspect it was designed so it would work with 0-5V PC serial ports. I've never had any trouble with it communicating with a PC but, based on the M32 datasheet, its 0-3V output would appear to be very marginal with a direct connection to a ZX software UART pin. Plus, the PIC is using its internal oscillator which, in theory, means it's borderline as far as RS232 timing.

My ZX-40 based board has COM1,3,4,5 connected through ST232A line drivers but COM6 is switchable between RS485 and 0-5V RS232. Should I tell users to only use the MR26A with the ±12V ports?

Posted: 12 July 2006, 18:18 PM
by dkinzer
3 volts is the minimum guaranteed level for recognizing a logic 1 if the ZX is running at 5.0 volts. Any particular device may actually recognize a significantly lower level as a logic 1 under certain operating conditions.

It seems to me that connecting a nominal 3 volt signal to the ZX would be a marginal design. It is likely that the output signal from the device is actually slightly under 3 volts, further exacerbating the potential problem.

With very few components, you can ensure that the ZX receives an solid signal over a wide range of input voltages. The schematic below shows how it can be done. The diode should be selected for a low forward voltage so that the device's V(OL) plus the forward voltage is below the ZX maximum input low voltage.

The circuit shown is from the External Device Interfacing application note which contains some other alternatives as well.

Posted: 12 July 2006, 19:15 PM
by spamiam
Another technique that is good for up to 16mhz speed is an IC level shifter (aka level translator). They are available in many flavors. Many are bidirectional.

I have seen one that seems good. It is the MAX3392. Digikey does not have them right now. It is a unidirectional: 1 in one direction, 3 in the other.

-Tony

Posted: 12 July 2006, 19:53 PM
by DH*
dkinzer wrote:It seems to me that connecting a nominal 3 volt signal to the ZX would be a marginal design. It is likely that the output signal from the device is actually slightly under 3 volts, further exacerbating the potential problem.
That was my reading, too. Thanks for confirming it.
The circuit shown is from the External Device Interfacing application note which contains some other alternatives as well.
My ZX-40 based board is intended to be versatile and general purpose, interfacing with any of some 20-30 devices so any modifications need to be done to the connecting devices rather than to my board. Your pull-up & diode could meet that criteria but there's an even simpler solution. Since the MR26A will get +5V from my board's regulated supply, all that's needed is to bypass the HT103 regulator in the MR26A, making it a +5V device. As this is a DIY project, it's just an extra, rather simple, and easily reversed DIY step.