How to make UART Tx idle state logic LOW

Is there a way to make the Rx and Tx lines logic level LOWs when idle? I'm interfacing my Duem. to a Telit GE865 GSM module using the UART signals through a Sparkfun logic level converter to interface with the 2.8 volt CMOS logic. There is an ouput pin on the GE865, POWERMON, that you use to determine if the unit is powered on (HIGH) or powered off(LOW). The problem is that when the GSM is powered off the datasheet "recommends" that there be no logic level HIGH's on the IO pins. Apparently the datasheet neglects to mention the reason (which tech support just informed me will be updated shortly in the datasheets) is that if there is a HIGH on the pins the POWERMON floats around 2.0 volts (well within the range of logic high in 2.8 logic) so a simple digital read from a microcontroller can not distinguish between on and off. So as you can see I won't be able to poll the sensor to check it's state or even use an ISR because it technically will never toggle logic levels if the GSM shuts off. So I was wondering if it's possible/recommended to change the states of the Rx and Tx pins to LOW before polling the signal? I realize the Tx is easy, just do a digitalwrite but is there an easy way to do the Rx? Would I have to disable the internal pullup and use an external pulldown? Any ideas or suggestions would be appreciated. Thanks. :cry:

Would I have to disable the internal pullup and use an external pulldown? Any ideas or suggestions would be appreciated. Thanks.

Interesting problem.

Not sure the Arduino serial library uses the internal pullup or not on pin 0. If you are using a standard Arduino USB with a FTDI USB serial converter chip then the solution if possible is a little more complex.

The HIGH (serial idle condition) on the serial rec pin 0 is coming from the TTL serial output of the FTDI chip through a series 1k resistor. The only way to overcome this I think would be to change pin 0 to an output pin and set it LOW. You would have to then change it back to a input before you did any serial commands.

Lefty

Thanks. I'm starting to think it might be just easier if I switch to a logic level IC with an output enable pin which I could just toggle before and after communication.

When there is voltage on the logic pins and no Vcc there is a conductiion
through the protection diodes. This happens on a lot of digital devices.

It may not be a good idea to pull those lines low. When idle most UARTs want
to be at a high state.

What types of BAUD rates do you require? An alternative would be to use the
UART emulation library NewSoftSerial. You can configure two unused pins
as a RX and TX to your GSM module. Tri-state the pins when the GSM is
powered down.

(* jcl *)


www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks
blog: http://luciani.org