User Manual

11
Label on GB
Port on RPi1
Port on RPi2
Alt function (which alt)
Purpose
GP0
GPIO0
GPIO2
SDA
I
2
C bus
GP1
GPIO1
GPIO3
SCL
GP4
GPIO4
GPIO4
GP7
GPIO7
GPIO7
SPI_CE1_N (alt 0)
SPI bus
GP8
GPIO8
GPIO8
SPI_CE0_N (alt 0)
GP9
GPIO9
GPIO9
SPI_MISO (alt 0)
GP10
GPIO10
GPIO10
SPI_MOSI (alt 0)
GP11
GPIO11
GPIO11
SPI_SCLK (alt 0)
GP14
GPIO14
GPIO14
TXD0 (alt 0)
UART
GP15
GPIO15
GPIO15
RXD0 (alt 0)
GP17
GPIO17
GPIO17
GP18
GPIO18
GPIO18
PWM0 (alt 5)
pulse width modulation
GP21
GPIO21
GPIO27
GP22
GPIO22
GPIO22
GP23
GPIO23
GPIO23
GP24
GPIO24
GPIO24
GP25
GPIO25
GPIO25
Table 1: GPIO ports corresponding to GP labels, and alternative functions of GPIO ports
(GB means Gertboard, RPi1 means Raspberry Pi rev1, RPi2 means Raspberry Pi rev2)
Schematics
Whilst there are some circuit diagrams, or schematics, in the main body of the manual for some of the
functional blocks of the board, they are simplifications of the actual circuits. While these simplified
diagrams and the explanations in the text will be good enough for most uses of the Gertboard, there
will occasionally be questions that can only answered by knowing exactly what is on the board. Thus
we have attached the full schematics at the end of this manual as Appendix A. These pages are in
landscape format. The page numbers A-1, A-2, etc, are in the lower left corner of the pages (if you
hold them so that the writing is the right way up).
Test Programs Overview
There are test programs for the Gertboard written in C and in Python. C provides the most direct
access to the Gertboard functionality, but it is not a language that is very accessible to the beginner
programmer. Several packages have been written to allow Python code to access the Raspberry Pi
GPIO pins and alternative functions of these pins such as Serial Peripheral Interface (SPI) bus and
pulse width modulation (PWM). Using these packages, you can access most of the functionality of the
Gertboard with Python. At the time of writing, the only major functional block that (to our
knowledge) cannot be programmed with Python is the Atmel microcontroller.
C Code Overview
To download the Gertboard C software, go to http://www.element14.com and search for
“Gertboard” using the box at the top of the screen. The link you want will probably be called
something like “Application Library for Gertboard”. From there you can download the file containing
the C code; it will have a name like gertboard_sw_20120725.zip. As you can tell by the file
extension .zip, this is a zip file, which means that it is a compressed collection of different files, all
packed together into a single file.