4.7 Using the Red LED and 7-SEG LED Display
The I-7188XCD includes a 5-digit 7-segment LED, together with a
decimal point, which can be switched on or off using software. Each
digit of the LED is numerically identified from left to right using the
numbers 1 to 5, and are individually programmable, which can be very
useful in real world applications and can be used to replace a monitor or
touch screen in many applications.
Before attempting to use the LED, the
Init5DigitLed()
function must first
be called, then the
Show5DigitLed()
function can be used to display
data. The code required to display “7188d” on 5-digit 7-segment LED is
as follows:
InitLib(); /* Initiate the 7188xc library */
Init5DigitLed();
Show5DigitLed(1, 7);
Show5DigitLed(2, 1);
Show5DigitLed(3, 8);
Show5DigitLed(4, 8);
Show5DigitLed(5, 13); /* The ASCII code for ‘d’ is 13 */
Refer to the demo programs in the
CD:\Napdos\7188XABC\7188XC\Demo\BC_TC\LED folder for more
information.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
60
Summary of Contents for I-7188XC Series
Page 87: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 87...
Page 136: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 136...
Page 142: ...Step 8 Make the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 142...
Page 149: ...Step 8 Rebuild the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 149...