Yuliang Hao
/
Thermostat
Sample Code for RDC EET214 Lab3
Diff: main.cpp
- Revision:
- 3:f2026b3d5763
- Parent:
- 2:e36baf6001b1
- Child:
- 4:c654bdf271fc
--- a/main.cpp Wed Sep 27 00:01:58 2017 +0000 +++ b/main.cpp Wed Sep 27 00:08:14 2017 +0000 @@ -38,7 +38,7 @@ } // End of while(1) } -//Display number at ten digits +//Display number at TEN digits int display10( int iRoom_T_Ten) { switch(iRoom_T_Ten) @@ -51,7 +51,11 @@ case 1: // displayA = 0x3f; break; - + + case 2: + //displayA = 0x5B; //Common Cathode + displayA = 0xA4; //Common Anode + break; default: @@ -62,7 +66,7 @@ return 1; } -//Display number at one digits +//Display number at ONE digits int display1( int iRoom_T_One) { switch(iRoom_T_One) @@ -73,7 +77,8 @@ break; case 1: - // displayB = 0x3f; + //displayB = 0x06; //Common Cathode + displayB = 0xf9; //Common anode break;