HW6 for OCE560

Dependencies:   mbed

Fork of shomberg_hw_5 by Russell Shomberg

Revision:
13:fa74bf0c3b8d
Parent:
12:ea407dcaff78
Child:
14:b3c87a7c7689
diff -r ea407dcaff78 -r fa74bf0c3b8d SegDisplay.cpp
--- a/SegDisplay.cpp	Thu Oct 25 22:43:36 2018 +0000
+++ b/SegDisplay.cpp	Tue Oct 30 14:08:21 2018 +0000
@@ -22,12 +22,17 @@
 #include "mbed.h"
 #include "SegDisplay.h"
 
-int ones;
-int tens;
+// INPUTS
+BusOut Seg1(p12,p13,p14,p15,p16,p17,p18,p19); //01 02 03 04 05 06 07 08 09 10
+BusOut Seg2(p21,p22,p23,p24,p25,p26,p27,p28); //E  D  CC C  DP B  A  CC F  G
 
-
+int ones; // ones digit of output
+int tens; // tens digit of output
 
 char SegConvert(int SegValue) {         // function 'SegConvert'
+    // Converts a integer value to a hexidecimal output
+    // the output corresponds to a bus connected to the segdisplay
+    // bus recreates the original integer
     char SegByte=0x00;
     switch (abs(SegValue)) {           // ABCDEFGP
         case 0 : SegByte= 0x3F;break;  // 11111100 binary