sergio burbano
/
bdc_7seg
código guía 2 sesión 1
Fork of bdc_7seg by
Diff: BCD_SEC.cpp
- Revision:
- 0:a638e4f36df2
- Child:
- 1:64569742f2ec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BCD_SEC.cpp Sat Aug 12 20:51:41 2017 +0000 @@ -0,0 +1,18 @@ +#include "BCD_SEC.h" +int codhex[16]={0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x58,0x00,0x18,0x08,0x03,0x0b,0x23,0x4f,0x20}; +int anodo::entrada(PinName a,PinName b, PinName c,PinName d) +{ + BusIn dip(a,b,c,d); + dipSw=dip.read(); + return dipSw; + } +void anodo::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 anodo:: BDC(int number) +{ + BusOut display (_g,_f,_e,_d,_c,_b,_a); +display=codhex[number]; + + } \ No newline at end of file