código guía 2 sesión 1

Dependencies:   mbed

Fork of bdc_7seg by sergio burbano

Committer:
grupo3
Date:
Sat Aug 12 20:51:41 2017 +0000
Revision:
0:a638e4f36df2
Child:
1:64569742f2ec
c?digo gu?a 2 primera sesion

Who changed what in which revision?

UserRevisionLine numberNew contents of line
grupo3 0:a638e4f36df2 1 #include "BCD_SEC.h"
grupo3 0:a638e4f36df2 2 int codhex[16]={0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x58,0x00,0x18,0x08,0x03,0x0b,0x23,0x4f,0x20};
grupo3 0:a638e4f36df2 3 int anodo::entrada(PinName a,PinName b, PinName c,PinName d)
grupo3 0:a638e4f36df2 4 {
grupo3 0:a638e4f36df2 5 BusIn dip(a,b,c,d);
grupo3 0:a638e4f36df2 6 dipSw=dip.read();
grupo3 0:a638e4f36df2 7 return dipSw;
grupo3 0:a638e4f36df2 8 }
grupo3 0:a638e4f36df2 9 void anodo::visual(PinName a,PinName b, PinName c,PinName d,PinName e,PinName f, PinName g)
grupo3 0:a638e4f36df2 10 {
grupo3 0:a638e4f36df2 11 _a=a;_b=b;_c=c;_d=d;_e=e;_f=f;_g=g;
grupo3 0:a638e4f36df2 12 }
grupo3 0:a638e4f36df2 13 void anodo:: BDC(int number)
grupo3 0:a638e4f36df2 14 {
grupo3 0:a638e4f36df2 15 BusOut display (_g,_f,_e,_d,_c,_b,_a);
grupo3 0:a638e4f36df2 16 display=codhex[number];
grupo3 0:a638e4f36df2 17
grupo3 0:a638e4f36df2 18 }