Content tweaks for #375

This commit is contained in:
Phil Howard 2020-08-25 20:08:38 +01:00
parent 9721bc1320
commit 0b217f32b3
16 changed files with 70 additions and 33 deletions

View File

@ -25,12 +25,13 @@ pin:
-->
# I2C - Inter Integrated Circuit
---
###I2C pins in BCM mode are: 2, 3
###I2C pins in WiringPi are: 8, 9
### 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 k 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:

View File

@ -23,7 +23,7 @@ or
dtoverlay=w1-gpio,gpiopin=x
```
if you would like to use a custom pin (default is BCM4, as illustrated in pinout herein).
if you would like to use a custom pin (default is GPIO 4, as illustrated in pinout herein).
Alternatively you can enable the one-wire interface on demand using raspi-config, or the following:
@ -39,7 +39,7 @@ sudo dtoverlay w1-gpio gpiopin=17 pullup=0 # header pin 11
sudo dtoverlay w1-gpio gpiopin=27 pullup=0 # header pin 13
```
once any of the steps above have been performed, and discovery is complete you can list the devices that your Raspberry Pi has discovered via all 1-Wire busses (by default BCM4), like so:
once any of the steps above have been performed, and discovery is complete you can list the devices that your Raspberry Pi has discovered via all 1-Wire busses (by default GPIO 4), like so:
```
ls /sys/bus/w1/devices/

View File

@ -29,4 +29,5 @@ The following clock sources are available:
7 216 MHz HDMI auxiliary
8-15 0 Hz Ground
```
Other frequencies can be achieved by setting a clock-divider in the form of `SOURCE/(DIV_I + DIV_F/4096)`. Note, that the [BCM2835 ARM Peripherals](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf) document contains an error and states that the denominator of the divider is 1024 instead of 4096.

View File

@ -30,4 +30,9 @@ 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.
There are two separate JTAG interfaces available on the Pi:
* Alt5 on GPIOs 4, 5, 6, 12 and 13
* Alt4 on GPIOs 22, 23, 24, 25, 26 and 27

View File

@ -0,0 +1,17 @@
<!--
---
name: PWM
class: interface
type: pinout
description: Raspberry Pi PWM pins
pin:
'32':
name: PWM0
'33':
name: PWM1
'12':
name: PWM0
-->
# PWM - Pulse-width Modulation
PWM (Pulse-width Modulation) is a method of creating an analog voltage by toggling a digital pin on and off.

View File

@ -46,20 +46,22 @@ 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
### SPI0 pins are GPIO 7, 8, 9, 10, 11
### SPI1 pins are GPIO 16, 17, 18, 19, 20, 21
---
Known as the four-wire serial bus, SPI lets you attach multiple compatible devices to 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 ). 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.
To talk to an SPI device, you assert its corresponding chip-select pin. By default the Pi has CE0 and CE1.
By default the Pi allows you to use SPI0 with chip select pins on CE0 on GPIO 8 and CE1 on GPIO 7.
You can enable SPI1 with a dtoverlay configured in "/boot/config.txt", for example:
```python
import spidev
spi = spidev.SpiDev()
spi.open(0, CHIP_SELECT_0_OR_1)
spi.max_speed_hz = 1000000
spi.xfer([value_8bit])
```
dtoverlay=spi1-3cs
```
For full details of the SPI dtoverlays (and others) see [the Raspberry Pi dtoverlay README](https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/overlays/README)

View File

@ -2,4 +2,4 @@ The 3v3 supply pin on the early Raspberry Pi had a maximum available current of
All Raspberry Pi since the Model B+ can provide quite a bit more, up to 500mA to remain on the safe side, thanks to a switching regulator.
Still, you should generally use the 5v supply, coupled with a 3v3 regulator for 3.3v projects.
You should generally use the 5v supply, coupled with a 3v3 regulator for 3.3v projects.

View File

@ -1,7 +1,11 @@
This pin doubles up as the UART receive pin, RXD. It's also commonly known as "Serial" and, by default, will output a Console from your Pi that, with a suitable Serial cable, you can use to control your Pi via the command-line.
This pin doubles up as the UART receive pin, RX. It's also commonly known as "Serial" and, by default, will output a Console from your Pi that, with a suitable Serial cable, you can use to control your Pi via the command-line.
Thus, The UART pins are useful for setting up a "headless" Pi (a Pi without a screen) and getting it connected to a network.
The UART pins are useful for setting up a "headless" Pi (a Pi without a screen) and getting it connected to a network.
UART can also be extremely useful if you want to talk to Arduino or Propeller boards from your Pi, but you must make sure you disable the Serial Console in raspi-config first.
UART can be used to talk to Serial GPS modules or sensors such as the PM5003, but you must make sure you disable the Serial Console in raspi-config first.
[Learn more about UART](/pinout/uart)
On the Pi 3 and 4 the UART is, by default, used for Bluetooth and you may need to add "dtoverlay=miniuart-bt" to "/boot/config.txt" to achieve a stable.
[Learn more about UART](/pinout/uart)
[Raspberry Pi UART documentation](https://www.raspberrypi.org/documentation/configuration/uart.md)

View File

@ -1 +1,3 @@
The PWM0 output of BCM 18 is particularly useful, in combination with some fast, direct memory access trickery, for driving tricky devices with very specific timings. The WS2812 LEDs on the [Unicorn HAT](/pinout/unicorn_hat) are a good example of this in action.
GPIO 18 is used by PCM to provide a clock signal to an external audio device such as a DAC chip.
The PWM0 output of GPIO 18 is particularly useful, in combination with some fast, direct memory access trickery, for driving devices with very specific timings. The WS2812 LEDs on the [Unicorn HAT](/pinout/unicorn_hat) are a good example of this in action.

View File

@ -1,5 +1,3 @@
The 5v power pins are connected directly to the Pi's power input and will capably provide the full current of your mains adaptor, less that used by the Pi itself.
With a decent power supply, such as the official Pi adaptor, you can expect to pull about 1.5A.
Don't be disuaded by what sounds like a measly low voltage. You can do a lot with 5v. Power Arduinos, and even run a small electroluminescent wire inverter right off the 5v pin!
With a decent power supply, such as the official 3A adapter on the Pi 4, you can expect to pull about 1A to 2A.

View File

@ -1,3 +1,3 @@
SDA (i2c Data) is one of the i2c pins on the Pi, [learn more about i2c](/pinout/i2c).
SDA (I2C1 Data) is one of the i2c pins on the Pi, [learn more about i2c](/pinout/i2c).
SDA includes a fixed, 1.8 kohms pull-up to 3.3v, which means this pin is not suitable for use as a general purpose IO where no pullup resistor is desired.
SDA includes a fixed, 1.8 kΩ pull-up to 3.3v, which means this pin is not suitable for use as a general purpose IO where no pull-up resistor is desired.

1
src/en/pin/pin-35.md Normal file
View File

@ -0,0 +1 @@
GPIO 19 is used by PCM to provide a frame-sync signal to an external audio device such as a DAC chip.

1
src/en/pin/pin-38.md Normal file
View File

@ -0,0 +1 @@
GPIO 20 is used by PCM to as a data input from an audio device such as an I2C microphone.

1
src/en/pin/pin-40.md Normal file
View File

@ -0,0 +1 @@
GPIO 21 is used by PCM to provide a data output signal to an external audio device such as a DAC chip.

View File

@ -1,3 +1,3 @@
SCL (i2c Clock) is one of the i2c pins on the Pi, [learn more about i2c](/pinout/i2c).
SCL (I2C1 Clock) is one of the i2c pins on the Pi, [learn more about i2c](/pinout/i2c).
SCL includes a fixed, 1.8 kohms pull-up to 3.3v, which means this pin is not suitable for use as a general purpose IO where no pullup resistor is desired.
SCL includes a fixed, 1.8 k pull-up to 3.3v, which means this pin is not suitable for use as a general purpose IO where no pull-up resistor is desired.

View File

@ -1,7 +1,11 @@
This pin doubles up as the UART transmit pin, TXD. It's also commonly known as "Serial" and, by default, will output a Console from your Pi that, with a suitable Serial cable, you can use to control your Pi via the command-line.
This pin doubles up as the UART transmit pin, TX. It's also commonly known as "Serial" and, by default, will output a Console from your Pi that, with a suitable Serial cable, you can use to control your Pi via the command-line.
Thus, The UART pins are useful for setting up a "headless" Pi (a Pi without a screen) and getting it connected to a network.
The UART pins are useful for setting up a "headless" Pi (a Pi without a screen) and getting it connected to a network.
UART can also be extremely useful if you want to talk to Arduino or Propeller boards from your Pi, but you must make sure you disable the Serial Console in raspi-config first.
UART can be used to talk to Serial GPS modules or sensors such as the PM5003, but you must make sure you disable the Serial Console in raspi-config first.
[Learn more about UART](/pinout/uart)
On the Pi 3 and 4 the UART is, by default, used for Bluetooth and you may need to add "dtoverlay=miniuart-bt" to "/boot/config.txt" to achieve a stable.
[Learn more about UART](/pinout/uart)
[Raspberry Pi UART documentation](https://www.raspberrypi.org/documentation/configuration/uart.md)