This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • Resolved

LM3S6965 : Uart in open drain mode ?

Intellectual 280 points

Replies: 4

Views: 3272

HI all

I'm wondering if I can configure the GIO to work in open drain mode  if the alternate function  ( UART mode ) is used
The spec  I have indicates that UART doesn't use open dran mode.

I''m working on a web based swimming pool controller for heating panel, pH,  redox and other fancy control.
http://poolserver.dyndns.info/

The environment temperatures are captured  using Dallas One wire  Temp. sensors  via UART function ( taken from an Dallas App note and works pretty good)
Currently the UART drives the Dallas sensors with 3.3 V which is close to the Dallas spec.
I would like to have an open collector / open drain to connect them to 5V to increase robustness for long cable lengths

any advise on that  ?

regards
Frank

  • Frank Kiesow

    I'm wondering if I can configure the GIO to work in open drain mode  if the alternate function  ( UART mode ) is used
    The spec  I have indicates that UART doesn't use open dran mode.

    I assume by "spec" you refer to the datasheet from the LM3S6965 Product Folder.  As you noted, the UART does not operate in an open drain mode, but rather a push pull.

     

    Frank Kiesow

    I''m working on a web based swimming pool controller for heating panel, pH,  redox and other fancy control.
    http://poolserver.dyndns.info/

    The environment temperatures are captured  using Dallas One wire  Temp. sensors  via UART function ( taken from an Dallas App note and works pretty good)
    Currently the UART drives the Dallas sensors with 3.3 V which is close to the Dallas spec.
    I would like to have an open collector / open drain to connect them to 5V to increase robustness for long cable lengths

    The LM3S6965 GPIOs are 5V tolerant which means they can accept voltages presented on the pins up to 5V, but will not be able to drive to 5V.  Since you desire an open-drain configuration anyway, this shouldn't be an issue.

    What speed (bit rate) is needed on the interface?  You could implement software to manipulate the GPIO pins to emulate an open drain type of function by modulating the GPIO configuration registers to be in either input mode or output mode.  You would then set the GPIO output register to a logic '0'.  When the GPIO is configured as an input, it would place the pin in a high impedence state and your external pull up resistor would bring the signal to a logic "1" at 5V.  Then when you desire the LM3S6965 to drive the signal low, simply configure the GPIO pin to be in output mode.

    Brandon

     

  • In reply to BrandonAzbell:

    HI Brandon

    thnx for quick reply ( even on sunday:-)

    >> I assume by "spec" you refer to the datasheet from the LM3S6965 Product Folder.  As you noted, the UART does not operate in an open drain mode, but rather a push pull.

    yes->Table 9-1. GPIO Pad Configuration Examples in  DS-LM3S6965-5920  I got the impression that the GIO Pad control works entirly independant from the alternate funcction
    ->.that was the reason for my question
    Can I use the UART and configure the pin ( independantly ) to open drain mode ?  
    Otherwise I need an external transistor with inverter and such , was just to reduce the amount of ext. components needed 

    So, my "simple" idea was to configure for open drain but leave it in UART mode ( am a software guy , not  HW expert :-)

     

    Just connect a 4.7K Ohm resistor from UART TX to 5V, and a series  resistor (e.g. 1k ?) from TX to RX  and leave everthing as it is.
    Thats my basic question, whether I can do this.

    Implementing  the One-Wire IF with a UART works very efficient rather than manually  toggling a GIO pin to emualate a one wire transport protocol.
    you can stuff the entire bit sequence for all the various One Wire commands into a buffer and let the UART send out the entire message in the background.

    regards

    Frank 

  • In reply to Frank Kiesow:

    At the time I was half watching the professional football game in the first half which seemed like a blow out.  Now I may need to pay attention.  :>)

    Frank Kiesow

    Can I use the UART and configure the pin ( independantly ) to open drain mode ?

    No, this is not possible.  You are correct that when the pin is configured for the alteranate function mode, its behavior is defined and controlled by the selected peripheral.
    However, that UART peripheral implements a push-pull interface.

     

    Frank Kiesow

    Otherwise I need an external transistor with inverter and such , was just to reduce the amount of ext. components needed.
    So, my "simple" idea was to configure for open drain but leave it in UART mode ( am a software guy , not  HW expert :-)

    You will need external components.

     

    Frank Kiesow

    Implementing  the One-Wire IF with a UART works very efficient rather than manually  toggling a GIO pin to emualate a one wire transport protocol.
    you can stuff the entire bit sequence for all the various One Wire commands into a buffer and let the UART send out the entire message in the background.

    If the one-wire interface can be implemented within the constraints of the UART physcial layer, I would agree that would be preferrable.  I had not personally analyzed the interface to know if that is possible.

    Brandon

     

  • In reply to BrandonAzbell:

    HI Brandon

    >> when the pin is configured for the alteranate function mode, its behavior is defined and controlled by the selected peripheral.

    that answers my question perfectly .
    For me it wasn't really clear ( you guys shoud place that statement in the data sheet during next update, eventually   :-)

    Thnx a lot
    Frank

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.