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.

IS it possible to use USCI_A0 in UART mode for two purposes Simultaneouly.

Other Parts Discussed in Thread: CC430F6137, MAX232

Hi,

 

I am working on CC430F6137.Right now I am using USCI_A0 in UART mode for serial communication with server but simultaneously I wanted to use USCI_A0 in UART mode to

print.Is it possible to map them like UART_A0 and UART_A1 in CC430F6137.What can I do?..

Please help me.

 

Thanks in advance.

Regards,

Jagas edara

 

 

 

 

 

  • ??? You want to use USCI_A0 to communicatw with two peers (server, printer) simultaneously?
    Or do you want it for server communication and later for printer communication?

    However, unless you use a multi-peer setup like RS485 and a high-level protocol to manage who is talking and who is receiving, you will need to switch the signals electrically from one peer to the other and back. This can be done using external TLL multiplexers/demultiplexers or (if possible) by mapping the internal RX/TX signals to different port pins for the two connections using the port mapping controller. In every case you'll need two external level shifters (MAX232 etc.), one for each peer.

    The UART module itself and its registers stay the same.

    UART_A0 and UART_A1 (or rather USCI0 and USCI1, of which the UART/USCI_A is a part of) are two separate, independent hardware units (and some even have USCI3+4). There is no "mapping".

  • I'm confused about what you want to do.

    For example, lets say you had P1.5 as RXD from the server and P1.6 as TXD to the server.  You would use USCI_A0 to communicate with the server.

    Then lets say you had P1.3 as RXD from the printer and P1.4 as TXD to the printer.  If you want to use USCI_A0 to communicate with the printer, then yes, you can do that using the port mapping controller.  However, you used the word "simultaneous" which is where I got lost.  In the scenario I described, you would communicate with only one system at a time, but you could switch between them at will under software control using the port mapping controller.

    Your device has only one UART, and it's USCI_A0.  There is no USCI_A1 UART on your device.  If you truly need "simultaneous" communication with the server and the printer, then you'll need to add a Timer UART or software UART.

    Jeff

  • Hi Jens,

    Thanks for your reply.

    Ya,Initially i wanted communicate with server as well as printer simultaneously But its seems I  could not able to do with this board without adding any extra things.

    I think its better to use port mapping to do so.But to communicate  simultaneously I will think about it later.Right now i can't do it.

     

     

    Thanks and regards,

    jagas edara.

  • Hi Jeff,

     

    Thanks for your reply,

    Actually I am new to CC430.I thought I can map USCI_A0 as another module But its foolish I got now.Thats better Idea which you have given.

    I will try to use USCI_A0 for both server and printer communication but not simultaneously.Later i will do for simultaneous communication

    as per you said.As for time being will you give more info on Timer UART  and how to implement it in my device.

     

     

     

    Thanks and regards,

    Jagas edara.

  • If you only want to send to the printer, and printer and server use the same baudrate, then you can keep the RX line always connected with the server (so you won't miss any server data) and only remap the TX line depending on whether you want to send to the server or the printer. The printers TX line (which is RX for the MSP) will then be not electrically connected at all.

    For tiemr uart, there are several implementaitons available. The LaunchPad demo software implements one, for example. Search the board for other threads about this topic.

  • A Timer UART is a software module that uses a hardware timer to transmit / receive UART signaling.  The timer itself actually drives the TX pin and latches data from the RX pin, which means transmit / receive timing remains accurate even if you have sophisticated application software with other interrupts and varying interrupt latency.  A Timer UART has more software overhead than a true UART, and usually that software overhead limits the maximum baud rate.  Figure on MCLK running 100x faster than the bit clock or more.

    As JMG mentioned, example code from TI demonstrates proper technique for utilizing the Timer's capabilities for this purpose.  You would need to modify example code to fit your processor (port names, pin numbers) and clock rates.  This sample code for a 'G2xx includes timer UART code for Timer A.  Timer A on the 5xx/6xx is basically the same as Timer A on the 'G2xx.  On the 5xx/6xx there are usually more capture/compare channels, but that's it.

    Jeff

  • Hi Jens,

    Thanks for your suggestion.

    I think thats good idea and I will try to implement it as soon my on going work is completed.

    As I said I will try to implement both server and printer connection as per your suggestion and

    later I will try to Implement using Timer's UART.

     

     

    Thanks and Regards,

    Jagas edara.

     

     

  • Hi Jeff,

    Thanks for your info,

    Its a much needed info.I will try to implement it later and let you know if they are any doubts about it.

     

     

     

     

     

    Thanks and regards,

    Jagas edara.

**Attention** This is a public forum