Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Function1.h
- Committer:
- kevinmark13
- Date:
- 2015-01-22
- Revision:
- 0:52fb551ac065
File content as of revision 0:52fb551ac065:
/* Function 1: take a decimal digit (0, 1, 2, ... , 9) and return the segment driver value for this digit */ BusOut digselect(p20, p19, p15, p13, p24); // bus from MSB to LSB: L1/L2, digit4, digit3, digit2, digit1 BusOut digit(p26, p28, p25, p18, p16, p23, p27, p14); // bus from MSB to LSB: dp, g, f, e, d, c, b, a DigitalOut L1(p17); //DigitalOut L2(p24); void digit0 () { digit = 0xC0; }; void digit1 () { digit = 0xF9; }; void digit2 () { //digit = 0x24; digit = 0xA4; }; void digit3 () { digit = 0xB0; }; void digit4 () { digit = 0x99; }; void digit5 () { digit = 0x92; }; void digit6 () { digit = 0x82; }; void digit7 () { digit = 0xF8; }; void digit8 () { digit = 0x80; }; void digit9 () { digit = 0x98; }; void digit00 () { digit = 0xFF; };