|
Project 3
Seven-Segment Display
|
Neff Site |
This module implements an interface to the MIKROE-1201 7seg click. More...
Go to the source code of this file.
Functions | |
| void | c1201_transmit (uint8_t dis1, uint8_t dis2) |
| Transmit the segment patterns. More... | |
| void | c1201_init (void) |
| Initialize click module. More... | |
| void | c1201_display_on (void) |
| Turn display on. More... | |
| void | c1201_display_off (void) |
| Turn display off. More... | |
| void | c1201_display_clear (void) |
| Clear display. More... | |
| void | c1201_set_intensity (uint8_t intensity) |
| Dim display. More... | |
| void | c1201_display_number (uint8_t number) |
| Display a number. More... | |
| void | c1201_display_symbols (uint8_t dis1, uint8_t dis2) |
| Display symbols. More... | |
This module implements an interface to the MIKROE-1201 7seg click.
The MIKROE-1201 7seg click provides two seven-segment displays using a 74HC595 serial-in, parallel-out shift register. This module provides an interface to this module.
| void c1201_display_clear | ( | void | ) |
Clear display.
Clears the display by a master reset.
| void c1201_display_number | ( | uint8_t | number | ) |
Display a number.
Displays a number by transmitting the corresponding segment pattern. The range of number must be between 0 and 99. Leading zeros are suppressed.
| number | The number to be displayed. |
| void c1201_display_off | ( | void | ) |
Turn display off.
Turns the display off by shutting down the PWM.
| void c1201_display_on | ( | void | ) |
Turn display on.
Turns the display on by activating the PWM.
| void c1201_display_symbols | ( | uint8_t | dis1, |
| uint8_t | dis2 | ||
| ) |
Display symbols.
Display two code B encoded symbols on the display. The following encoding is used:
| Code | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Symbol | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | - | E | H | L | P | blank |
| dis1 | The row to be activated |
| dis2 | The row to be activated |
| void c1201_init | ( | void | ) |
Initialize click module.
Initializes the click module by setting up the SPI module, the PWM module and the reset line. The display is turned off after initialization.
| void c1201_set_intensity | ( | uint8_t | intensity | ) |
Dim display.
Dims the display by specifying the desired intensity. The intensity corresponds to the duty cycle of the PWM signal used to control the luminance.
| intensity | The per cent intensity of the luminance. |
| void c1201_transmit | ( | uint8_t | dis1, |
| uint8_t | dis2 | ||
| ) |
Transmit the segment patterns.
Selects at which row the stored data is displayed.
| dis1 | Segment pattern for display 1. |
| dis2 | Segment pattern for display 2. |
| Contact |
Generated by
1.8.13
|