Prep for pt

This commit is contained in:
RogueM 2016-07-27 11:52:47 +01:00
parent 512f47f3df
commit dd80eceaa8
13 changed files with 133 additions and 96 deletions

View File

@ -1,8 +1,8 @@
<!--
---
name: Ground
class: interface
type: pinout
name: Ground
description: Raspberry Pi Ground Pins
pincount: 1
pin:
@ -23,5 +23,5 @@ which one you use if you're wiring up a voltage supply.
Generally the one that's most convenient or closest to the rest of your connections is tidier
and easier, or alternatively the one closest to the supply pin that you use.
It's a good idea to use Physical Pin 17 for 3v3 and Physical Pin 25 for ground when using
the [SPI](/pinout/spi) connections, for example, as these are right next to the important pins for SPI0.
For example, it's a good idea to use Physical Pin 17 for 3v3 and Physical Pin 25 for ground when using
the SPI connections, as these are right next to the important pins for SPI0.

View File

@ -1,9 +1,10 @@
<!--
---
name: I2C
class: interface
type: pinout
name: I2C
description: Raspberry Pi i2c pins
description: Raspberry Pi I2C pins
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
pin:
'3':
name: Data
@ -23,10 +24,13 @@ pin:
active: high
-->
#I2C - Inter Integrated Circuit
---
###I2C pins in BCM mode are: 2, 3
###I2C pins in WiringPi are: 8, 9
---
The Raspberry Pi's I2C pins are an extremely useful way to talk to many different types of external peripheral; from the MCP23017 digital IO expander, to a connected ATmega.
The i2c pins include a fixed 1.8 kohms pull-up resistor to 3.3v. This means they are not suitable for use as general purpose IO where a pull-up is not required.
The I2C pins include a fixed 1.8 kohms pull-up resistor to 3.3v. This means they are not suitable for use as general purpose IO where a pull-up is not required.
You can verify the address of connected I2C peripherals with a simple one-liner:
@ -35,13 +39,7 @@ sudo apt-get install i2c-tools
sudo i2cdetect -y 1
```
You can access i2c from Python using the smbus library:
```bash
sudo apt-get install python-smbus
```
And then in Python:
You can then access I2C from Python using the smbus library:
```python
import smbus

View File

@ -1,9 +1,10 @@
<!--
---
name: DPI
class: interface
type: pinout
name: DPI
description: Raspberry Pi DPI pins
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/dpi/
pin:
'bcm0':
name: CLK
@ -52,6 +53,6 @@ pin:
-->
#DPI - Display Parallel Interface
###DPI (Display Parallel Interface) is a 24-bit parallel interface with 28 clock and synchronisation signals. The Pi uses a cut-down, 6-bit, 22 pin version omitting the least significant R, G and B colour bits.
DPI (Display Parallel Interface) is a 24-bit parallel interface with 28 clock and synchronisation signals. The Pi uses a cut-down, 6-bit, 22 pin version omitting the least significant R, G and B colour bits.
DPI, combined with a simple adaptor consisting of 20 resistors, allows you to add a VGA connector to the Pi which supports resolutions from 640 x 480 up to 1920 x 1024 at 60fps and 6bits per channel.

View File

@ -1,8 +1,8 @@
<!--
---
name: GPCLK
class: interface
type: pinout
name: GPCLK
description: Raspberry Pi General Purpose Clock
pin:
'bcm4':
@ -14,7 +14,7 @@ pin:
-->
#GPCLK - General Purpose CLock
###General Purpose Clock pins can be set up to output a fixed frequency without any ongoing software control.
General Purpose Clock pins can be set up to output a fixed frequency without any ongoing software control.
The following clock sources are available:

View File

@ -1,8 +1,8 @@
<!--
---
name: JTAG
class: interface
type: pinout
name: JTAG
description: Raspberry Pi JTAG pins
pin:
'bcm4':
@ -30,4 +30,4 @@ pin:
-->
#JTAG - Joint Test Action Group
###JTAG is a standardised interface for debugging integrated circuits which you can use to debug your Raspberry Pi
JTAG is a standardised interface for debugging integrated circuits which you can use to debug your Raspberry Pi.

View File

@ -1,8 +1,8 @@
<!--
---
name: PCM
class: interface
type: pinout
name: PCM
description: Raspberry Pi PCM pins
pin:
'bcm18':
@ -16,4 +16,4 @@ pin:
-->
#PCM - Pulse-code Modulation
###PCM (Pulse-code Modulation) is a digital representation of sampled analog. On the Raspberry Pi it's a form of digital audio output which can be understood by a DAC for high quality sound.
PCM (Pulse-code Modulation) is a digital representation of sampled analog. On the Raspberry Pi it's a form of digital audio output which can be understood by a DAC for high quality sound.

View File

@ -1,8 +1,8 @@
<!--
---
name: SDIO
class: interface
type: pinout
name: SD
description: Raspberry Pi SD0/SD1 pins
pin:
'bcm22':
@ -20,6 +20,6 @@ pin:
-->
#SD - SD Card Interface
###SD is the SD host/eMMC interface on the Raspberry Pi. SD host signals are normally used for the microSD slot.
SD is the SD host/eMMC interface on the Raspberry Pi. SD host signals are normally used for the microSD slot.
These pins are "SD host" on Alt0 and "eMMC" on Alt3.

View File

@ -1,9 +1,10 @@
<!--
---
name: SPI
class: interface
type: pinout
name: SPI
description: Raspberry Pi SPI pins
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
pincount: 5
pin:
'11':
@ -45,24 +46,20 @@ pin:
name: SPI1 SCLK
-->
#SPI - Serial Peripheral Interface
---
###SPI0 pins in BCM mode are: 9, 10, 11 + 7/8
###SPI0 pins in WiringPi are: 12, 13, 14 + 10/11
---
Known as the four-wire serial bus, SPI lets you daisy-chain multiple compatible devices off a single set of pins by assigning them different chip-select pins.
###Known as the four-wire serial bus, SPI lets you daisy-chain multiple compatible devices off a single set of pins by assigning them different chip-select pins.
A useful example of an SPI peripheral is the MCP23S17 digital IO expander chip Note the S in place of the 0 found on the I2C version.
A useful example of an SPI peripheral is the MCP23S17 digital IO expander chip ( Note the S in place of the 0 found on the I2C version ). You can also use the SPI port to "Bit-Bang" an ATmega 328, loading Arduino sketches onto it with Gordon Hendersons' modified version of AVRDude.
To talk to an SPI device, you assert its corresponding chip-select pin. By default the Pi has CE0 and CE1.
```python
import spidev
spi = spidev.SpiDev()
spi.open(0, CHIP_SELECT_0_OR_1)
spi.max_speed_hz = 1000000
spi.xfer([value_8bit])
```
You can also use the SPI port to "Bit-Bang" an ATmega 328, loading Arduino sketches onto it with Gordon's modified version of AVRDude.
Hook up you Pi's SPI port to that of your ATmega, and power the ATmega from the 3.3v pin on the Pi. Make sure you're not running any SPI device drivers, and run "avrdude -p m328p -c gpio" to verify the connection.
See the individual pins to learn how to connect up your ATmega.

View File

@ -1,9 +1,10 @@
<!--
---
name: UART
class: interface
type: pinout
name: UART
description: Raspberry Pi UART pins
url: http://elinux.org/RPi_Serial_Connection
pincount: 2
pin:
'8':
@ -16,12 +17,17 @@ pin:
active: high
-->
#UART - Universal Asynchronous Receiver/Transmitter
---
###UART pins in BCM mode are: 14, 15
###UART pins in WiringPi are: 15, 16
---
UART is an asynchronous serial communication protocol, meaning that it takes bytes of data and transmits the individual bits in a sequential fashion.
###The 2 UART pins in WiringPi are: 15, 16
Asynchronous transmission allows data to be transmitted without the sender having to send a clock signal to the receiver. Instead, the sender and receiver agree on timing parameters in advance and special bits called 'start bits' are added to each word and used to synchronize the sending and receiving units.
UART is a handy, straight forward way to interface an Arduino ( or bootloaded ATmega ) with your Pi. You must, however, be careful with logic-levels between the two devices: the Pi is 3.3v and the Arduino is 5v. Connect the two and you might conjure up some magic blue smoke.
UART is commonly used on the Pi as a convenient way to control it over the GPIO, or access the kernel boot messages from the serial console (enabled by default).
Personally I'm a fan of building out a Arduino Bootloaded ATmega 328 circuit on a breadboard with a voltage regulator to take the Pi's 5v line and convert it to 3.3v. The ATmega 328 seems to run quite happily at 3.3v using a 16Mhz crystal and you'll then have an Arduino clone with 3.3v logic.
It can also be used as a way to interface an Arduino, bootloaded ATmega, ESP8266, etc with your Pi. Be careful with logic-levels between the devices though, for example the Pi is 3.3v and the Arduino is 5v. Connect the two and you might conjure up some magic blue smoke.
Assuming you have WiringPi2-Python installed, the following python example opens the Pi's UART at 9600baud and puts 'hello world'

View File

@ -1,8 +1,8 @@
<!--
---
name: WiringPi
class: interface
type: pinout
name: WiringPi GPIO Pinout
url: http://wiringpi.com
github: https://github.com/WiringPi/WiringPi2-Python
pincount: 40
@ -60,16 +60,14 @@ pin:
'40':
name: WiringPi 29
-->
#Raspberry Pi WiringPi
#WiringPi
###WiringPi is an attempt to bring Arduino-wiring-like simplicity to the Raspberry Pi.
WiringPi is an attempt to bring Arduino-wiring-like simplicity to the Raspberry Pi.
The goal is to have a single common platform and set of functions for accessing the Raspberry Pi GPIO across multiple languages. WiringPi is a C library at heart, but it's available to both Ruby and Python users who can "gem install wiringpi" or "pip install wiringpi2" respectively.
Python users note the 2 on the end, the WiringPi2-Python library finally brings a whole host of existing WiringPi functionality to Python including brand new features from WiringPi 2.
##Getting started with WiringPi
WiringPi uses its own pin numbering scheme, here you'll learn how WiringPi numbers your GPIO pins, what those pins do and how to do shiny things with them from within Python or Ruby.
Installing to Python couldn't be easier, just:

View File

@ -25,48 +25,18 @@ strings:
- github_repository: 'GitHub Repository'
- buy_now: 'Buy Now'
featured:
- piano-hat
- propeller-hat
- ab-adc-pi-zero
overlays:
- ground
- uart
- i2c
- spi
- arduino-spi
- uart
- wiringpi
overlays:
- ground
- i2c
- spi
- uart
- wiringpi
- cirruslogicaudiocard
- display-o-tron
- display-o-tron-hat
- discohat
- drum-hat
- espiot-phat
- explorer-hat
- explorer-hat-pro
- explorer-phat
- phat-dac
- propeller-hat
- iqaudio-pi-dac
- piano-hat
- piborg-ledborg
- pibrella
- piglow
- dots
- rtk-000-001
- scroll-phat
- sense-hat
- skywriter-hat
- traffic-hat
- unicorn-hat
- ab-1-wire-plus
- ab-adc-differential-pi
- ab-adc-pi-plus
- ab-adc-pi-zero
- ab-io-pi-plus
- ab-rtc-pi-plus
- ab-serial-pi-plus
- iface-gpclk
- iface-dpi
- iface-gpclk
- iface-jtag
- iface-pcm
- iface-sd
- iface-jtag

View File

@ -0,0 +1,67 @@
<!doctype html>
<html lang="{{langcode}}">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>{{title}}</title>
<meta name="description" content="{{description}}" />
<link href='//fonts.googleapis.com/css?family=Ubuntu+Mono' rel='stylesheet' type='text/css' />
<link href='{{resource_url}}prettify/prettify.css' rel='stylesheet' />
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link href="{{resource_url}}pinout.css?v={{v}}" rel="stylesheet">
<link href="{{resource_url}}print.css?v={{v}}" rel="stylesheet" media="print">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
{{hreflang}}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-69846516-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body class="boards-page">
<div id="container">
<h1 class="logo"><a title="Raspberry Pi GPIO Pinout home" href="/"><img src="{{resource_url}}pinout-logo.png" style="top:8px;" /><span>Raspberry Pi</span>n<span class="out">out</span></a></h1>
<div id="leftcolumn">
<nav id="gpio">
<div class="facets"></div>
<div id="interfaces">
<h4>Interfaces</h4>
<ul>
{{nav_html_interface}}
</ul>
</div>
</nav>
</div>
<div id="content">
<div id="pages">
<article><h1>Raspberry Pi HATs, pHATs &amp; Add-ons</h1>
<h3>Click on a HAT, pHAT or add-on for more details and to see which pins it uses!</h3>
</article>
<div id="boards"><ul>{{content}}</ul></div>
</div>
<div id="lang">
<ul class="lang-nav">
{{lang_links}}
</ul>
</div>
</div>
<div class="footer" style="clear: both;padding: 20px 0px;text-align:center;">
<p>Spotted an error, want to add your board's pinout? <a href="https://github.com/gadgetoid/Pinout2">Head on over to our GitHub repository</a> and submit an Issue or a Pull Request!</p>
<p>Originally part of <a href="http://pi.gadgetoid.com">pi.gadgetoid.com</a></p>
<p>Maintained by <a href="https://twitter.com/gadgetoid"><i class="fa fa-twitter"></i> @Gadgetoid</a> and <a href="https://twitter.com/roguehal13"><i class="fa fa-twitter"></i> @RogueHAL13</a></p>
</ul>
</div>
</div>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery/1.9.1/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/prettify/0.1/prettify.js"></script>
<script src='{{resource_url}}prettify/lang-ruby.js'></script>
<script src='{{resource_url}}prettify/lang-bash.js'></script>
<script src='{{resource_url}}pinout.js?v={{v}}'></script>
<script src='{{resource_url}}boards.js?v={{v}}'></script>
</body>
</html>

View File

@ -25,33 +25,33 @@
<body>
<div id="container">
<h1 class="logo"><a title="Raspberry Pi GPIO Pinout home" href="/"><img src="{{resource_url}}pinout-logo.png" style="top:8px;" /><span>Raspberry Pi</span>n<span class="out">out</span></a></h1>
<div id="leftcolumn">
<nav id="gpio">
<div id="pinbase"></div>
<div id="pinbasebplus"></div>
{{nav}}
</nav>
</div>
<div id="content">
<div id="sections">
<div id="featured">
<ul>
<li class="boards"><a href="" title="Add-on boards for Raspberry Pi">Boards</a>
<div class="dropdown">{{nav_html_board}}</div>
</li>
<li class="interfaces"><a href="" title="Raspberry Pi hardware interfaces">Interfaces</a>
<div class="dropdown">{{nav_html_interface}}</div>
</li>
<li class="guides"><a href="" title="Connection guides for Raspberry Pi GPIO">Guides</a>
<div class="dropdown">{{nav_html_guide}}</div>
</li>
{{featured_boards}}
</ul>
<a class="more" href="/boards">See more HATs, pHATs and add-ons</a>
</div>
<div id="interfaces">
<ul>
{{nav_html_interface}}
</ul>
</div>
<div id="pages">
{{content}}
</div>
<div id="lang">
<ul class="lang-nav">
{{lang_links}}
</ul>
</div>
<div id="pages">
{{content}}
</div>
</div>
<div class="footer" style="clear: both;padding: 20px 0px;text-align:center;">
<p>Spotted an error, want to add your board's pinout? <a href="https://github.com/gadgetoid/Pinout2">Head on over to our GitHub repository</a> and submit an Issue or a Pull Request!</p>