User Interface
This is the documentation page for the RPi_UI board.
Overview
Assembly instructions
Specifications
Possible Configurations
External resources
Datasheets
Additional software
Related projects
Pinout
The 26 pin gpio connector is described at elinux
The SPI connector has the same pinout as the atmel 6-pin ICSP connector and is documented here: SPI_connector_pinout.
The I2C connector is documented here: I2C_connector_pinout.
The UART connector is documented here: uart connector pinout.
LEDs
The only LED is a power indicator.
jumper settings
There is one 2x2 pin jumper (JP1), which controls which SPI bus (actually which SPI chip-select line) is routed to the AVRs slave-select pin, and which is routed to the reset pin (to enable reprogramming of the AVR):
Left pads/pins connected: SPI0 connected to Slave-Select
Right pads/pins connected: SPI1 connected to RESET
Bottom pads/pins connected: SPI0 connected to RESET
Top (near the LCD) pads/pins connected: SPI1 connected to Slave-Select
There is also one solder jumper, SJ1, which controls the supply voltage on the SPI, I2C, and UART connectors:
1-2: 5V (left)
2-3: 3V3 (right, near the PCB edge)
Protocol
To make the RPI_UI PCB do things, you need to send things over the SPI or I2C bus to the PCB. A comparison of the two protocols can be found here.
The general overview of the SPI protocol is here.
The software
Controlling the display works the same way as our SPI_LCD or I2C_LCD modules. Reading the pushbuttons is very much like the DIO module. The read and write ports are described below.
write ports
Some ports just set a single value. So writing more than one byte to such a port is redundant. Other ports are logically a stream of bytes. So writing more than one byte is encouraged.
The rpi_ui board defines several ports.
port | function |
---|---|
0x00 | display data. |
0x01 | write data as command to LCD. |
0x10 | any data clears the screen. |
0x11 | move the cursor to line l, position p. l is the top 3 bits p is the bottom 5 bits of the data. |
0x12 | set contrast. |
0x13 | set backlight. |
0x14 | reinit LCD. |
0xf0 | change address. |
read ports
The rpi_ui board supports several read ports:
port | function |
---|---|
0x01 | identification string. (terminated with 0). |
0x02 | read eeprom (serial number). |
0x20 | read button 1 |
0x21 | read button 2 |
0x22 | read button 3 |
0x23 | read button 4 |
0x24 | read button 5 |
0x25 | read button 6 |
0x30 | reports which buttons have been pushed since last read of this register |
examples
read identification
read the identification string of the board.
data sent | data recieved | explanation |
---|---|---|
0x95 | xx | select destination with address 0x94 for READ. |
0x01 | xx | identify |
xx | 0x73 | 's' |
xx | 0x70 | 'p' |
xx | 0x69 | 'i' |
xx | ... | etc. |
Send text to display
Display the string "Hello World!" (only the first 5 bytes of the string shown).
data sent | data recieved | explanation |
---|---|---|
0x94 | xx | select destination with address 0x94 for WRITE |
0x00 | xx | datastream |
0x48 | xx | 'H' |
0x65 | xx | 'e' |
0x6c | xx | 'l' |
0x6c | xx | 'l' |
0x6f | xx | 'o' |
xx | ... | etc. |
set cursor position
move to line 1, character 5:
data sent | data recieved | explanation |
---|---|---|
0x94 | xx | select destination with address 0x94 for WRITE |
0x11 | xx | port 0x11 = set cursor position. |
0x25 | xx | 0x25 = 001 00101 = line 1 position 5. |
Default operation
Future hardware enhancements
Future software enhancements
Changelog
1.0
- Initial public release