//conversor de bcd a 7 segmentos

Dependencies:   mbed

Revision:
0:da3425777443
Child:
1:c773d22f95b3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/seg.cpp	Sat Aug 12 21:44:02 2017 +0000
@@ -0,0 +1,19 @@
+#include "seg.h"
+
+int arreglo[16]={0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x58,0x00,0x18,0x08,0x46,0x21,0x06,0x0e};
+int cod::enter(PinName a,PinName b,PinName c,PinName d)
+{
+    BusIn dip(a,b,c,d);
+    sw=dip.read();
+    return sw;   
+}
+void cod::salida(PinName a,PinName b,PinName c,PinName d,PinName e,PinName f,PinName g)
+{
+    a_=a;b_=b;c_=c;d_=d;e_=e;f_=f;g_=g;
+    
+}  
+void cod::bcd(int number)
+{
+    BusOut display(a_,b_,c_,d_,e_,f_,g_);
+    display=arreglo[number];
+}
\ No newline at end of file