//CODIGO PARA PASAR DE BCD A 7 SEGMENTOS

Dependencies:   mbed

Committer:
ABD931
Date:
Sat Aug 12 21:31:02 2017 +0000
Revision:
0:d343b54f75c1
//CODIGO PARA PASAR DE BCD A 7 SEGMENTOS

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ABD931 0:d343b54f75c1 1 #include "BCDSEG.h" // SE LLAMA LA LIBRERIA BCDSEG
ABD931 0:d343b54f75c1 2 int anod[12]= {0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x58,0x00,0x18,0x08,0x03}; // SE CREA VECTOR DE 12 POSICIONES PARA VISUALIZAR LOS VALORES EN EL DIPSLAY
ABD931 0:d343b54f75c1 3 int anodo::entrada(PinName a,PinName b,PinName c,PinName d)
ABD931 0:d343b54f75c1 4 {
ABD931 0:d343b54f75c1 5 BusIn dip(a,b,c,d);
ABD931 0:d343b54f75c1 6 dipSw=dip.read();
ABD931 0:d343b54f75c1 7 return dipSw;
ABD931 0:d343b54f75c1 8 }
ABD931 0:d343b54f75c1 9 void anodo::visual(PinName a,PinName b,PinName c,PinName d,PinName e,PinName f,PinName g)//
ABD931 0:d343b54f75c1 10 {
ABD931 0:d343b54f75c1 11 _a=a;_b=b;_c=c;_d=d;_e=e;_f=f;_g=g;
ABD931 0:d343b54f75c1 12
ABD931 0:d343b54f75c1 13 }
ABD931 0:d343b54f75c1 14 void anodo::bcd(int number)
ABD931 0:d343b54f75c1 15 {
ABD931 0:d343b54f75c1 16 BusOut display(_g,_f,_e,_d,_c,_b,_a);
ABD931 0:d343b54f75c1 17 display=anod[number];
ABD931 0:d343b54f75c1 18 }