Page 1 of 1

GPIO Pings re-assigment?

Posted: Fri Nov 15, 2013 6:42 pm
by donis
Hello folks,
I have been using a Raspberry Pi B rev 2. I need to read data continuously on GPIO 15 (pin # 10, UART RXD) and have verified that no data is received. Data is to be supplied by a gps receiver. Set up a serial connection (hyper terminal on a laptop and minicom on the Rpi). I ran a minicom session to verify serial communication connections and I can send data from the Rpi on UART TXD (pin 8) to a laptop but NOTHING is received on the Rpi running minicom. The pi is up to date! These are my questions:
- How to check if UART RXD is properly configured?
- Should I try removing & re-installing GPIO? and how?
- Any quick piece of code to rest send/receive functions on the rraspberry pi?
-Any ideas?

Thanks so much

Re: GPIO Pings re-assigment?

Posted: Fri Nov 15, 2013 9:26 pm
by DeeJay
What external hardware are you using to convert from the (presumed) rs232 serial output from the gpsr or laptop? (Just because the GPIO pins are labelled for use as a serial uart does not automagically convert the signal levels as well. 'Standard' rs232 serial comms do not use ttl [for the RPi, 0.0 - 3.3 volts] signal levels.)

Re: GPIO Pings re-assigment?

Posted: Fri Nov 15, 2013 9:31 pm
by joan
All the gpios on the Pi are 3.3V. What voltage does your GPS unit use?

Use

stty -F /dev/ttyAMA0 4800

to set the default GPS baud rate. Change the 4800 if your unit uses a different value.

Try

cat /dev/ttyAMA0

to see if the GPS is working.

Re: GPIO Pings re-assigment?

Posted: Sat Nov 16, 2013 1:14 pm
by donis
DeeJay wrote:What external hardware are you using to convert from the (presumed) rs232 serial output from the gpsr or laptop? (Just because the GPIO pins are labelled for use as a serial uart does not automagically convert the signal levels as well. 'Standard' rs232 serial comms do not use ttl [for the RPi, 0.0 - 3.3 volts] signal levels.)
>>This is my hardware: GARMIN 17X GPS, powered with battery (not with the Rpi). I measured the signals out of the gps receiver to be 3.3V for PPS, and signal expected on the UART RXD is about 2V. I receive the pps signal on the Rpi using "/dev/pps0" and the data stream looks correct. The serial data expected on the RXD UART of the Rpi is not seen. The rest of the hardware set up is as follows:
GPS receiver with battery power
GRD (Rpi pin #6) to GRD on GPS
UART TXD (Rpi pin #8) to Receive on GPS
UART RXD (Rpi pin #10) to TRX on GPS.
I have but not using a “RS232 Serial Port To TTL Converter Module MAX3232″.
Running "cgps -s" always times out with no data and "cat /dev/ttyAMA0" gives some type of un-readable characters (like opening a binary file with a text editor!)

Should I expect a different result if I power the GPS with the raspberry pi?

Thanks again

Re: GPIO Pings re-assigment?

Posted: Sat Nov 16, 2013 1:26 pm
by donis
joan wrote:All the gpios on the Pi are 3.3V. What voltage does your GPS unit use?

Use

stty -F /dev/ttyAMA0 4800

to set the default GPS baud rate. Change the 4800 if your unit uses a different value.

Try

cat /dev/ttyAMA0

>>I tried sty -F /dev/ttyAMA0 9600 (value used by the unit) but then
cat "dev/ttyAMA0" shows some unreadable characters (like opening a binary file with a text editor!).

I know the GPS works as I have tested on a regular PC.

to see if the GPS is working.

Re: GPIO Pings re-assigment?

Posted: Sat Nov 16, 2013 3:31 pm
by joan
Try a different baud rate.

Re: GPIO Pings re-assigment?

Posted: Sun Nov 17, 2013 7:52 am
by DeeJay
donis wrote: I have but not using a “RS232 Serial Port To TTL Converter Module MAX3232″.
I wonder if that might be the clue?

I've taken a vow not to waste time repeating myself, but note again that standard rs232 serial signal levels do not use the same signal levels (voltages) as the gpio pins on the RPi.

Re: GPIO Pings re-assigment?

Posted: Sun Nov 17, 2013 3:20 pm
by klricks
Have you modified the inittab and cmdline.txt files to convert the serial port from a Linux console to a general purpose serial port? (No other configuration is needed as the UART is enabled by default).

You can test your setup by connecting TX and RX together with a wire. Data (key-presses) will then be echoed back to the terminal program - Minicom.

Re: GPIO Pings re-assigment?

Posted: Sun Nov 17, 2013 3:42 pm
by karlkiste
If your RS232 sending device sends only 0V/3.3V, but on a DB9 connector, you still cannot connect it directly. The voltage levels may be right, but the logic is not. You'll need an inverter at least. RS232 defines a "1" as -3..-15V and "0" as +3..+15V, while the pi assumes 1 to be +2.5V..+3.3V and 0 like 0V..0.7V.

Re: GPIO Pings re-assigment?

Posted: Fri Nov 22, 2013 5:47 pm
by donis
Folks,

The issue was resolved by getting a different GPS receiver: "Ultimate GPS breakout" from Adafruit industries. The problem with my previous GPS is that it was putting out a negative voltage output and this wasn't within the bounds accepted by the GPIO UART.

Thanks a lot for your ideas and support.

Don