Difference between revisions of "Pushbutton"
Jump to navigation
Jump to search
(Created page with "thumb|300px|alt=spi_pushbutton|The pushbutton board (depicted: the SPI version) This is the documentation page for . == Overview == == Assembl...") |
|||
Line 38: | Line 38: | ||
== The software == |
== The software == |
||
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 pushbutton board defines just one port. |
|||
{| border=1 |
|||
! port !! function |
|||
|- |
|||
| 0xf0 || change address. |
|||
|} |
|||
=== read ports === |
|||
The pushbutton board supports several read ports: |
|||
{| border=1 |
|||
! 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 |
|||
|} |
|||
== Default operation == |
== Default operation == |
Revision as of 15:12, 16 November 2012
This is the documentation page for .
Overview
Assembly instructions
Possible Configurations
External resources
Datasheets
Additional software
Related projects
Pinout
LEDs
Jumper settings
Programming
The software
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 pushbutton board defines just one port.
port | function |
---|---|
0xf0 | change address. |
read ports
The pushbutton 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 |
Default operation
Future hardware enhancements
Future software enhancements
Changelog
- Initial public release