![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Lab 2 part 3
Revision 0:3cab63033453, committed 2015-01-07
- Comitter:
- kevinmark13
- Date:
- Wed Jan 07 01:12:36 2015 +0000
- Commit message:
- Lab2 Part3;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jan 07 01:12:36 2015 +0000 @@ -0,0 +1,42 @@ + +//In this part of the Lab 1 +//you will need to use the 4-bank seven-segment LED display to display a pattern of "2.468 + + +#include "mbed.h" + +//BusOut Seg1(p5,p6,p7,p8,p9,p10,p11,p12); // ABCDEFGDP +//BusOut Seg2(p5,p6,p7,p8,p9,p10,p11,p12); // ABCDEFGDP +//BusOut Seg3(p5,p6,p7,p8,p9,p10,p11,p12); // ABCDEFGDP +//BusOut Seg4(p5,p6,p7,p8,p9,p10,p11,p12); // ABCDEFGDP +//BusOut dp1(p12); // DP + +DigitalOut A(p5); +DigitalOut B(p6); +DigitalOut C(p7); +DigitalOut D(p8); +DigitalOut E(p9); +DigitalOut F(p10); +DigitalOut G(p11); +DigitalOut DP(p12); + +DigitalOut Dig1(p17); +DigitalOut Dig2(p18); +DigitalOut Dig3(p19); +DigitalOut Dig4(p20); + +int main() +{ + + Dig1 =0x5B; // 01011011 binary LEDs to '2' + + Dig2 =0x66; // 01100110 binary LEDs to '4' + + Dig3 = 0x7D; // 01111101 binary LEDs to '6' + + Dig4 = 0x7F; // 01111111 binary LEDs to '8' + + DP = 1; + + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jan 07 01:12:36 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file