This is an old revision of the document!


7-segment LED display

Related to: [HW] User Interface Module

This library is intended to use 7-segment LED display on Homelab digital input-output module board. Numbers from 0 to 9 can be displayed with library.

Functions

  • void segment_display_init(void)

Configures display driver control pins.

  • void segment_display_write(unsigned char digit)

Displayes a digit on display. Parameters:

  • digit - Number value from 0 to 9. Any other case E like “error” is displayed.

Example

Number 5 is showed on LED display.

#include <homelab/module/segment_display.h>
 
int main(void)
{
	// Display initialization.
	segment_display_init();
 
	// Digit displaying.
	segment_display_write(5);
}
en/software/homelab/library/module/segment_display.1269885290.txt.gz · Last modified: (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0