Difference between revisions of "7 Segment"
(6 intermediate revisions by 3 users not shown) | |||
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 == |
== 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 == |
||
== The software == |
|||
⚫ | |||
Reading the pushbuttons is very much like the DIO module. The read and write ports are described below. |
|||
⚫ | |||
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. |
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 |
The 7_segment board supports several read ports: |
||
{| border=1 |
{| border=1 |
||
! port !! function |
! port !! function |
||
⚫ | |||
| 0x10 || Write a bitmap to the display (see [[#bitmap]]) (4 bytes) |
|||
⚫ | |||
| 0x11 || Write a hexadecimal number to the display (4 bytes) |
|||
⚫ | |||
| 0x12 || write 0x01 to store the current display as startup display. Write 0x00 to return to the default. |
|||
⚫ | |||
| 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. |
| 0xf0 || change address. |
||
|} |
|} |
||
=== |
=== Read ports === |
||
The |
The 7_segment board supports several read ports: |
||
{| border=1 |
{| border=1 |
||
Line 63: | Line 84: | ||
| 0x02 || read eeprom (serial number). |
| 0x02 || read eeprom (serial number). |
||
|- |
|- |
||
| 0x10 || Return the entire bitmap (see [[#bitmap]]) (4 bytes) |
|||
| 0x20 || read button 1 |
|||
|- |
|- |
||
| 0x20 .. 0x23 || Return the bitmap of 1 character |
|||
| 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 |
|||
|} |
|} |
||
⚫ | |||
It is possible to tell the module to not show a hexadecimal digit, but 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 89: | Line 105: | ||
== Changelog == |
== Changelog == |
||
=== 1.0 === |
|||
⚫ | |||
* Initial public release |
* Initial public release |
Latest revision as of 11:58, 11 November 2015
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
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) |
0x12 | write 0x01 to store the current display as startup display. Write 0x00 to return to the default. |
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, but 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