2013-10-14
P2.8 ~ 2.11 to display 7 segment LED
Now I am using GPIO pins P2.8 to 2.11 to input to HC595 to display the 7 segment LED. I first use the GPIO pins to direct drive 4 of the 7 segments to make sure that the hardware connections are OK. Then I connect the pins to HC595 and toggle the pins and check that the HC595 pins are toggling OK.
void test7segmentLed01() //
{
// *** system self diagnostic test - blink LED P09 ***
setupGpioPinOutputLow050(PortPinArrayP09); // setup GPIO pin as output
blinkLed0501(PortPinArrayP09); // blink led
// *** setup Hc595 output pins ***
setupAllGpioPinsOutputLow050(Hc595PortPinArrayPointerArray, MAX_HC595_PIN_NUMBER);
// *** Toggle HC595 control pins ***
blinkLed0501(Hc595SerialInClockPulsePortPinArray); // Pin 11
blinkLed0501(Hc595SerialInDataPortPinArray); // Pin 14
blinkLed0501(Hc595ParallOutDataLatchPortPinArray); // Pin 12
blinkLed0501(Hc595OutputEnablePortPinArray); // Pin 13
// displayOlimex7segmentDigit(DIGIT_4);
}
.END
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment