Using the UART
11 posts
How do I use the Uart serial port do I have to disable console output to it to be able to use it in python?
- Posts: 234
- Joined: Sun Mar 04, 2012 9:28 am
Yes, and you must disable the getty process plus it's respawn which I think is still in most distributions.
I have removed the references to /dev/ttyama0 from /boot/cmdline.txt and /etc/innittab. Then rebooted but I still cant get the uart working.
Should the uart pins be outputting 3v all the time?
Should the uart pins be outputting 3v all the time?
- Posts: 234
- Joined: Sun Mar 04, 2012 9:28 am
Just had a thought. I am powering the reader I am connecting from the 3v3 the datasheet says typical draw is 45 mah but maximum is 120. Im wondering if this is the reason I cannot get it to work. How can I drop the 5v supply to 3.3 so I can power the reader from this? I can power the reader from 5v but then the serial pins output 5v too. I assume this would not be good?
- Posts: 234
- Joined: Sun Mar 04, 2012 9:28 am
I have no idea what you are talking about.
What is this reader you are talking about?
What have you connected that you conclude it does not work?
The UART is3V3 and 3V3 only. Always.
What is this reader you are talking about?
What have you connected that you conclude it does not work?
The UART is3V3 and 3V3 only. Always.
The device I am connecting is a ttl uart 3.3v Mifare reader. I have an rs232 version of the same reader and that works fine on a USB serial converter. I wanted to get rid of the converter so got the ttl version but I cannot get any input from /dev/ttyAMA0
- Posts: 234
- Joined: Sun Mar 04, 2012 9:28 am
How can I drop the 5v supply to 3.3 so I can power the reader from this?
Use a 3v3 regulator from the 5V line, you need caps on the input and output as well.
I am powering the reader I am connecting from the 3v3
Can you run the reader from such a low voltage? If you can it is most unusual.
so got the ttl version
TTL is 5V not 3v3 are you sure you are not trying to drive 5V into the Pi?
Should the uart pins be outputting 3v all the time?
All the time when not outputting data the signal level should be high (3v3)
The reader is definitely rated to work from 3 to 5 volts and the voltage you put in has a direct relation to the voltage coming out ( I checked with a meter).
I have been very careful not to push 5 volts into the pi.
The other reader I have is also rated from 3 to 5 volts but that is rs232 not ttl and the output voltage is 7 volts on that one and does not change if I use a different supply.
I have been very careful not to push 5 volts into the pi.
The other reader I have is also rated from 3 to 5 volts but that is rs232 not ttl and the output voltage is 7 volts on that one and does not change if I use a different supply.
- Posts: 234
- Joined: Sun Mar 04, 2012 9:28 am
I am starting to wonder now if I haven't at some point earlier on damaged my uart interface by accident?
I have never tried to use it until now. I have a USB ttl adapter coming soon so I should be able to see if my pi is outputting anything and also if my reader is outputting anything too.
There is only one uart on the pi isn't there?
I have never tried to use it until now. I have a USB ttl adapter coming soon so I should be able to see if my pi is outputting anything and also if my reader is outputting anything too.
There is only one uart on the pi isn't there?
- Posts: 234
- Joined: Sun Mar 04, 2012 9:28 am
I created a loopback connection and that worked fine so it must be something to do with the serial settings on the reader or the reader is faulty.
- Posts: 234
- Joined: Sun Mar 04, 2012 9:28 am
Also both the tx and rx pins on the pi measuer +3.3v all the time but the reader only measures 0.1v on rx and 3.3v on tx.
Also I tested the reader on a friends Pi with the same results. So maybe this reader is faulty or I have the settings wrong somewhere.
this is the datasheet
http://www.ehuoyan.com/download/module/ ... CTGV33.pdf
Also I tested the reader on a friends Pi with the same results. So maybe this reader is faulty or I have the settings wrong somewhere.
this is the datasheet
http://www.ehuoyan.com/download/module/ ... CTGV33.pdf
- Posts: 234
- Joined: Sun Mar 04, 2012 9:28 am