Raspberry Pi: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m updated an outdated tutorial link
you can use an arduino
Line 19:
=== Serial adaptor ===
 
The RPi has 2 serial ports ([[UART|UARTs]]). This tutorial only concerns itself with UART0, called simply UART or serial port. UART1 is ignored from now on. The basic UART onboard uses a 3.3V TTL and is connected to some of the GPIO pins labeled "P1" on the board. x86 PCs and MACs do use 5V TTL so you need some adaptor to convert the TTL. I recommend aA '''USB to TTL Serial Cable - Debug/Console Cable for Raspberry Pi''' with separate connectors per lead, like [http://www.adafruit.com/products/954 commercial RPi serial adaptor], is recommended.. Which is then connected to the RPi [[Media:ARM_RaspberryPi_serial.jpg|like this]]. SlightlyThe slightly cheaper [http://www.ebay.com/itm/USB-To-RS232-TTL-PL2303HX-Auto-Converter-Module-Converter-Adapter-5V-3-3V-Output-/350568364250 PL2303HX adapter] was found usable, but seems to be unreliable if connected to an USB port with an extension cable (a USB 2.0 hub might remedy this).
 
Note: The serial adaptor I use provides both a 0V and 5V lead (black and red) which provide power to the RPi. No extra power supply is needed besides this.
 
Alternatively, you can use the FTDI chip on an Arduino (or clone thereof). Connect RX on the Arduino to RX on the Pi, TX to TX and GND to GND, then connect the Arduino's reset pin to ground to prevent code in flash from interfering. Due to reset being held low, the Arduino itself is entirely bypassed. If you have a clone that supports 3.3V operation (such as a Seeeduino) then you can enable it to be safe, but this approach works fine with 5V.
 
=== Testing your hardware/serial port ===