7-segment LED Display

Related to: [HW] User Interface Module

This library is intended to use a 7-segment LED display on the HomeLab Digital i/o module board. Numbers from 0 to 9 can be displayed with the 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.txt · Last modified: 2020/07/20 09:00 by 127.0.0.1
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