The program uses the BusOut Class to make a counter
Dependencies: mbed
Fork of BusOut_HelloWorld by
main.cpp
- Committer:
- shiyilei
- Date:
- 2014-10-16
- Revision:
- 2:76f66b714f20
- Parent:
- 0:717993c337df
- Child:
- 3:b83cb0af21b0
File content as of revision 2:76f66b714f20:
/*********************************************** *file name :number show *creator: Jacob Shi *Time :2014/10/16 *Description: The program use the BusOut Class to *realize a counter(0-9) *************************************************/ #include "mbed.h" char data[10]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90}; BusOut port(p21, p22, p23, p24,p25,p26,p27,p28); int main() { while(1) { for(int i=0; i<10; i++) { port = data[i]; wait(1); } } }