Difference between revisions of "7 Segment"
Line 8: | Line 8: | ||
== Assembly instructions == |
== Assembly instructions == |
||
None: the board comes fully assembled. |
|||
=== Possible Configurations === |
=== Possible Configurations === |
||
Line 26: | Line 27: | ||
== Pinout == |
== Pinout == |
||
For the SPI connector see: [[SPI_connector_pinout]]. |
|||
For the I2C connector see: [[I2C_connector_pinout]]. |
|||
=== LEDs === |
=== LEDs === |
||
There are no LEDs, except for the display of course. |
|||
== |
== jumper settings == |
||
See [[solder jumpers]] on how to change the solder jumper. |
|||
By changing the solder jumper SJ1, you can make the connector SPI1 (nearest the board edge) into an ICSP programming connector for the attiny48 on the board. |
|||
== Programming == |
== Programming == |
||
Line 38: | Line 45: | ||
== The software == |
== The software == |
||
Reading the pushbuttons is very much like the DIO module. The read and write ports are described below. |
|||
== The software == |
|||
⚫ | |||
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 7_segment board supports several read ports: |
|||
{| border=1 |
|||
! port !! function |
|||
|- |
|||
| 0x10 || Write a bitmap to the display (see [[#bitmap]]) (4 bytes) |
|||
|- |
|||
| 0x11 || Write a hexadecimal number to the display (4 bytes) |
|||
|- |
|||
| 0x20 .. 0x23 || Write a bitmap to only 1 character |
|||
|- |
|||
| 0x30 .. 0x33 || Write a hexadecimal numer to only 1 character |
|||
|- |
|||
| 0x40 || Write a value other then 0x00 to light the bottom dot, 0x00 turns it off. |
|||
|- |
|||
| 0x41 || Write a value other then 0x00 to light the upper dot, 0x00 turns it off. |
|||
|- |
|||
| 0x42 || Write a value other then 0x00 to light both dots, 0x00 turns them off. |
|||
|- |
|||
| 0xf0 || change address. |
|||
|} |
|||
=== read ports === |
|||
The 7_segment board supports several read ports: |
|||
{| border=1 |
|||
! port !! function |
|||
|- |
|||
| 0x01 || identification string. (terminated with 0). |
|||
|- |
|||
| 0x02 || read eeprom (serial number). |
|||
|- |
|||
| 0x10 || Return the entire bitmap (see [[#bitmap]]) (4 bytes) |
|||
|- |
|||
| 0x20 .. 0x23 || Return the bitmap of 1 character |
|||
|} |
|||
=== Bitmap === |
|||
It is possible to tell the module to not show a hexadecimal digit, bit to display a user-defined digit.<br> |
|||
The most significant bit in this bitmap controls segment A, and the least significant bit controls one of the dots. The lower dot is controlled by digit 2, and the upper dot by digit 3. |
|||
== Default operation == |
== Default operation == |
||
Line 51: | Line 104: | ||
== Changelog == |
== Changelog == |
||
=== 1.0 === |
|||
⚫ | |||
* Initial public release |
* Initial public release |
Revision as of 15:53, 16 November 2012
This is the documentation page for the 7_segment boards.
Overview
Assembly instructions
None: the board comes fully assembled.
Possible Configurations
External resources
Datasheets
Additional software
Related projects
Pinout
For the SPI connector see: SPI_connector_pinout. For the I2C connector see: I2C_connector_pinout.
LEDs
There are no LEDs, except for the display of course.
jumper settings
See solder jumpers on how to change the solder jumper.
By changing the solder jumper SJ1, you can make the connector SPI1 (nearest the board edge) into an ICSP programming connector for the attiny48 on the board.
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 7_segment board supports several read ports:
port | function |
---|---|
0x10 | Write a bitmap to the display (see #bitmap) (4 bytes) |
0x11 | Write a hexadecimal number to the display (4 bytes) |
0x20 .. 0x23 | Write a bitmap to only 1 character |
0x30 .. 0x33 | Write a hexadecimal numer to only 1 character |
0x40 | Write a value other then 0x00 to light the bottom dot, 0x00 turns it off. |
0x41 | Write a value other then 0x00 to light the upper dot, 0x00 turns it off. |
0x42 | Write a value other then 0x00 to light both dots, 0x00 turns them off. |
0xf0 | change address. |
read ports
The 7_segment board supports several read ports:
port | function |
---|---|
0x01 | identification string. (terminated with 0). |
0x02 | read eeprom (serial number). |
0x10 | Return the entire bitmap (see #bitmap) (4 bytes) |
0x20 .. 0x23 | Return the bitmap of 1 character |
Bitmap
It is possible to tell the module to not show a hexadecimal digit, bit to display a user-defined digit.
The most significant bit in this bitmap controls segment A, and the least significant bit controls one of the dots. The lower dot is controlled by digit 2, and the upper dot by digit 3.
Default operation
Future hardware enhancements
Future software enhancements
Changelog
1.0
- Initial public release