Project 3  Seven-Segment Display
Neff Site
Functions
c1201.h File Reference

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...
 

Detailed Description

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.

Author
Wolfgang Neff
Version
1.0
Date
2018-03-09
History
Created: 2018-03-09

Function Documentation

◆ c1201_display_clear()

void c1201_display_clear ( void  )

Clear display.

Clears the display by a master reset.

◆ c1201_display_number()

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.

Parameters
numberThe number to be displayed.

◆ c1201_display_off()

void c1201_display_off ( void  )

Turn display off.

Turns the display off by shutting down the PWM.

◆ c1201_display_on()

void c1201_display_on ( void  )

Turn display on.

Turns the display on by activating the PWM.

◆ c1201_display_symbols()

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
Parameters
dis1The row to be activated
dis2The row to be activated

◆ c1201_init()

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.

◆ c1201_set_intensity()

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.

Parameters
intensityThe per cent intensity of the luminance.

◆ c1201_transmit()

void c1201_transmit ( uint8_t  dis1,
uint8_t  dis2 
)

Transmit the segment patterns.

Selects at which row the stored data is displayed.

Parameters
dis1Segment pattern for display 1.
dis2Segment pattern for display 2.
Contact