nicolás rodríguez
/
BCD_GUIA2
7 segmetobcd
Diff: BCDSEG.cpp
- Revision:
- 0:246c93030d74
diff -r 000000000000 -r 246c93030d74 BCDSEG.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BCDSEG.cpp Sat Aug 12 21:54:13 2017 +0000 @@ -0,0 +1,21 @@ +#include "BCDSEG.h" + + +int anodo[10] = {0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x58,0x00,0x18}; + +int anodoo::entrada (PinName A, PinName B, PinName C, PinName D) +{ + BusIn dip(A,B,C,D); + Sw = dip.read(); + return Sw; + +} +void anodoo::visual(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 anodoo::bcd(int number) +{ + BusOut display(_G,_F,_E,_D,_C,_B,_A); + display=anodo[number]; +} \ No newline at end of file