The Textbook
Read Section 8.6 of the textbook.
- Memory and I/O, pp 77–86
PIC 32 reference suvey
- Datasheets (wiring)
- PIC32MX1XX/2XX datasheet
- PIC32 Family Reference Manual (Documentation → Reference Manual)
- PIC12LF1822 datasheet
- Programming (downloading)
- Microstick II
- PICKit 3 programmer
- I/O (programming)
More about the PIC32 MX
-
PIC32MX1XX/2XX 28/36/44-PIN datasheet (again)
- Pin layout — page 4, Table 3
- Minimal setup — page 28, Figure 2-1
- Programming setup — page 28, Figure 2-2
- Memory organization — page 39, Table 4-2
- SFR memory locations — page 44, Table 4-1
- Oscillator control — page 74, Figure 8-1
- GPIO Port structure — page 127, Figure 11-1
- MIPS® Architecture For Programmers Volume II-A: The MIPS32® Instruction Set
“Building” a computer on a breadboard
- the really hard way
- 8 bit spaghetti
- Arduino on a breadboard
- Arduino Tiny AVR programmer
- Arduino in Altoid
GPIO interfaces
In general, there are at least three collections of registers to control GPIO.
- One sets the direction — input or output:
TRISp
ofDDRp
- One writes the pin — 0 or 1:
LATp
orPORTp
- One reads the pin — 0 or 1:
PORTp
orPINp
GPIO in C
Take a look at the first part of the lab on PIC32 GPIO to see how C is used for GPIO. (You can also use assembly code!)
GPIO in Arduino
GPIO on the Raspberry Pi
- easiest — Python (
RPi.GPIO
) API - Linux-est — GPIO Sysfs
Looking at some source — Arduino
- Wiring site
- Wiring at Wikipedia
- Github
- Arduino
- Arduino AVR
main
- wiring.c — timing and delay
- wiring_digital.c — digital I/O
- port stuff
- Arduino.h — lots of constants
- pins_arduino.h — pin definitions