Quantcast

Serial port communication problem - logic level converter

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Serial port communication problem - logic level converter

Savas Piperidis
I tried to use the Sparkfun BOB-08745 logic level converter (http://www.sparkfun.com/products/8745) to connect the serial port of my Gumstix Overo Fire COM to a 5V TTL level serial port. At my overo board I use the O0 serial port (pins 9, 10 of the 40 pin header connected to the TXI and RXO at the low voltage level side of the converter) and the VCC_1.8 and GND ( pins 26, 25 of the 40 pin header connected to the LV and GND at the low voltage side of the converter). At the high voltage side of the converter I connect the appropriate data and power signals of the 5V TTL serial port device. I double checked all the connections and I used the libserial C++ library and the minicom program for communication but, unfortunately, the connection is dead. It seems to work for receiving data from the device's 5V TTL serial port but it is not possible to send data from the Overo board. From the technical specifications of the Sparkfun BOB-08745 converter it seems that it is compatible with the signal levels of my devices. Has anybody some previous experience with this converter?

I would also like to ask why at the /dev directory of my overo board exist the O0, O1, O2 ports that seems to work, but also exist the S0, S1, S2, S3 ports that seems to be dead?

For several days I tried everything I could think but the connection is not working. I have checked the 5V TTL serial port of the device, establishing a connection with my PC, through a ftdi usb to serial converter and it  is working fine. The O0 serial port of my overo board is also working if I use a different connection than the one with the converter.

Any Ideas?
Savas Piperidis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial port communication problem - logic level converter

Trevor Woerner-6
On Tue, Dec 13, 2011 at 4:08 AM, Savas Piperidis <[hidden email]> wrote:
> I tried to use the Sparkfun BOB-08745 logic level converter (
> http://www.sparkfun.com/products/8745 http://www.sparkfun.com/products/8745
> ) to connect the serial port of my Gumstix Overo Fire COM to a 5V TTL level
> serial port.

Does anything on the following pages help:
http://sakoman.com/OMAP/how-to-add-a-serial-console-to-overo-thumbopinto.html
http://sakoman.com/OMAP/how-to-add-a-serial-7-segment-display-to-overo.html

> I would also like to ask why at the /dev directory of my overo board exist
> the O0, O1, O2 ports that seems to work, but also exist the S0, S1, S2, S3
> ports that seems to be dead?

On these processors the serial ports are Ox; these processors don't
have Sx-style serial ports.

------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and
improve service delivery. Take 5 minutes to use this Systems Optimization
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial port communication problem - logic level converter

Alex Gibson-3
In reply to this post by Savas Piperidis
On 13/12/2011 8:08 PM, Savas Piperidis wrote:

> I tried to use the Sparkfun BOB-08745 logic level converter (
> http://www.sparkfun.com/products/8745 http://www.sparkfun.com/products/8745
> ) to connect the serial port of my Gumstix Overo Fire COM to a 5V TTL level
> serial port. At my overo board I use the O0 serial port (pins 9, 10 of the
> 40 pin header connected to the TXI and RXO at the low voltage level side of
> the converter) and the VCC_1.8 and GND ( pins 26, 25 of the 40 pin header
> connected to the LV and GND at the low voltage side of the converter). At
> the high voltage side of the converter I connect the appropriate data and
> power signals of the 5V TTL serial port device. I double checked all the
> connections and I used the libserial C++ library and the minicom program for
> communication but, unfortunately, the connection is dead. It seems to work
> for receiving data from the device's 5V TTL serial port but it is not
> possible to send data from the Overo board. From the technical
> specifications of the Sparkfun BOB-08745 converter it seems that it is
> compatible with the signal levels of my devices. Has anybody some previous
> experience with this converter?
>
> I would also like to ask why at the /dev directory of my overo board exist
> the O0, O1, O2 ports that seems to work, but also exist the S0, S1, S2, S3
> ports that seems to be dead?
>
> For several days I tried everything I could think but the connection is not
> working. I have checked the 5V TTL serial port of the device, establishing a
> connection with my PC, through a ftdi usb to serial converter and it  is
> working fine. The O0 serial port of my overo board is also working if I use
> a different connection than the one with the converter.
>
> Any Ideas?
> Savas Piperidis

We use the exact same sparkfun level converter for a serial connection
(root console) then a max232 chip then to a standard pc serial port.
Works great.


We don't connect the low side ground to the level shifter, as the spark
fun level shifter board has a common ground.

We've done the same(not connect the low side ground) for spi and i2c
with the level shifters.
For i2c even though the boards have pullups builtin, we've found we need
4.7k ohm pullups

Which pins are you using ?

tx and rx or tx and tx ?


Scott Ellis has code and schematic on his site for i2c connections
http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=69&Itemid=78


Alex


------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity
while improving strategic productivity.  Learn More!
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial port communication problem - logic level converter

Savas Piperidis
Dear Alex,
Thank you for your useful comments and instructions.
I have connected the overo-side low level GND to the Sparkfun converter. I think this is necessary and Scott Ellis also uses this connection at his examples.
Also, I use the Tx and Rx signals. I tried, once, to use the Tx and Tx signals but as far as I remember, this didn't solve the communication problem.
Savas Piperidis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial port communication problem - logic level converter

Savas Piperidis
I tried, again, using the two Tx lines at the Sparkfun converter, instead of the Tx and Rx. This way I manage to establish communication through the overo serial port, using minicom or kermit. Unfortunately, until now, I could not communicate using the C++ code and the libserial library, which was and my initial intention. No matter what changes I made to my code, overo receives data from the device but cannot send. Should I keep on trying using only the Tx lines on the Sparkfun BOB-08745 logic level converter?

Has anybody previous experience with the libserial library?

Savas
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial port communication problem - logic level converter

Savas Piperidis
Unfortunately, I still can not communicate using the C++ code and the the SerialStream class of the libserial library. The overo serial port O0 (pins 09, 10 at the 40pin header) receives data from the device but cannot send.

Has anybody previous experience with the libserial library?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial port communication problem - logic level converter

dariojcanelons
Savas Piperidis <savas <at> dpem.tuc.gr> writes:

>
> Unfortunately, I still can not communicate using the C++ code and the the
> /SerialStream/ class of the /libserial/ library. The overo serial port O0
> (pins 09, 10 at the 40pin header) receives data from the device but cannot
> send.
>
> Has anybody previous experience with the libserial library?
>
> --
> View this message in context: http://gumstix.8.n6.nabble.com/Serial-port-
communication-problem-logic-level-converter-tp1602396p2278349.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
>

Hello Savas,

I'm having the exact same problems you are/were having. Did you find a solution?
The last I've tried was transmitting through the SparkFun logic converter but to
no avail.

I've connected a Logic Analyzer from Sparkfun
(https://www.sparkfun.com/products/8938) and looked at the messages being sent
back and forth through the devices and found this:

1. Each one of the devices transmits its message correctly.
2. When the devices are connected, the messages from the Gumstix appear on the
5V logic line corrupted.

By the way, I doubt it's your C++ code that's the problem as I have checked and
ran into the same problem as you.

Thanks,
Dario



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial port communication problem - logic level converter

Savas Piperidis
Hello Dario,
It's been a long time since I solved the serial communication problems and I don't remember what exactly was the cause or causes of them. Though, I can advise the following:

1* If the serial port of the device you want to communicate with, has different logic level than the 1.8V of overo, you have to use a logic level converter. I use, successfully, the Sparkfun BOB-08745 logic level converter (http://www.sparkfun.com/products/8745). The connections schematic of the overo - BOB-08745 - 5V TTL serial device that I use in my project is available at: https://dl.dropbox.com/u/13520357/2011_12_SparkfunLogicConverter/converterOveroCMU.png. In all cases, with or without the use of converter, the Rx of the one device is wired to the Tx of the other device!

2* In the default overo console image I use, the available serial port is only the O0 (GPIO148_TXD1 and GPIO151_RXD1). In order to use the O2 serial port (GPIO166_IR_TXD3 and GPIO165_IR_RXD3) you have to comment the following line at the /etc/inittab file, and so the O2 will not be reserved as the overo console port:
S:2345:respawn:/sbin/getty 115200 ttyO2

3* I, successfully, use the minicom program as communication software to perform my tests and my debugging.

I can assure you that since I established and properly set the serial communications, everything works fine for months, until now. I use both O0 and O2 to communicate with two serial port devices: one at 5V and the other at 3.3V. In both serial connections, I use the Sparkfun BOB-08745 logic level converter.

Good Luck!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial port communication problem - logic level converter

danieltturner
I to have used the sparkfun device to allow a gumstix to talk to a motor controller. It works quite well.
Sent via BlackBerry by AT&T

-----Original Message-----
From: Savas Piperidis <[hidden email]>
Date: Mon, 3 Sep 2012 01:16:44
To: <[hidden email]>
Reply-To: "General mailing list for gumstix users."
        <[hidden email]>
Subject: Re: [Gumstix-users] Serial port communication problem - logic
        level converter

Hello Dario,
It's been a long time since I solved the serial communication problems and I
don't remember what exactly was the cause or causes of them. Though, I can
advise the following:

1* If the serial port of the device you want to communicate with, has
different logic level than the 1.8V of overo, you have to use a logic level
converter. I use, successfully, the Sparkfun BOB-08745 logic level converter
( http://www.sparkfun.com/products/8745
http://www.sparkfun.com/products/8745 ). The connections schematic of the
overo - BOB-08745 - 5V TTL serial device that I use in my project is
available at:
https://dl.dropbox.com/u/13520357/2011_12_SparkfunLogicConverter/converterOveroCMU.png
https://dl.dropbox.com/u/13520357/2011_12_SparkfunLogicConverter/converterOveroCMU.png
. In all cases, with or without the use of converter, the Rx of the one
device is wired to the Tx of the other device!

2* In the default overo console image I use, the available serial port is
only the O0 (GPIO148_TXD1 and GPIO151_RXD1). In order to use the O2 serial
port (GPIO166_IR_TXD3 and GPIO165_IR_RXD3) you have to comment the following
line at the /etc/inittab file, and so the O2 will not be reserved as the
overo console port:


3* I, successfully, use the minicom program as communication software to
perform my tests and my debugging.

I can assure you that since I established and properly set the serial
communications, everything works fine for months, until now. I use both O0
and O2 to communicate with two serial port devices: one at 5V and the other
at 3.3V. In both serial connections, I use the Sparkfun BOB-08745 logic
level converter.

Good Luck!



--
View this message in context: http://gumstix.8.n6.nabble.com/Serial-port-communication-problem-logic-level-converter-tp1602396p4965288.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serial port communication problem - logic level converter

Edward Diaz
This post has NOT been accepted by the mailing list yet.
In reply to this post by Savas Piperidis
Hi,

I use the FTDI cable with the built in converter and followed the schematic on the sakoman uart page.

As a suggestion:
Disconnect the level shifter from your overo, and then do the following: After and before the converter short the tx and rx lines together. Type on your minicom/hyperterm and you should see what you typed like if you were in fulldeplex mode.  If after shorting them together(after the level shifter), you see what you typed echoed back then everything to that point is working. Next verify that the levels are indeed 1.8, and you should be good to go. On my Tobi I connected to pins 21 and 22 (if I remember correctly). You can square that out with the corresponding schematic.

http://www.sakoman.com/images/pdf/pinto-console.pdf

What ever board your using look for  RXD3 and TXD3. Find out what pins correspond to those signal names.

If after connecting them, it still doesnt work, flip the signals. The TX from your level shifter should connect to RXD3 and vice versa.

Thanks,
Edward
Loading...