Voltímetro ADC y BCD

Dependencies:   mbed

Fork of BCD_GUIA2 by nicolás rodríguez

Committer:
nikor97r
Date:
Sat Aug 12 21:54:13 2017 +0000
Revision:
0:246c93030d74
Child:
1:b6f946fdfb2f
7 segmetobcd

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nikor97r 0:246c93030d74 1 #include "BCDSEG.h"
nikor97r 0:246c93030d74 2
nikor97r 0:246c93030d74 3
nikor97r 0:246c93030d74 4 int anodo[10] = {0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x58,0x00,0x18};
nikor97r 0:246c93030d74 5
nikor97r 0:246c93030d74 6 int anodoo::entrada (PinName A, PinName B, PinName C, PinName D)
nikor97r 0:246c93030d74 7 {
nikor97r 0:246c93030d74 8 BusIn dip(A,B,C,D);
nikor97r 0:246c93030d74 9 Sw = dip.read();
nikor97r 0:246c93030d74 10 return Sw;
nikor97r 0:246c93030d74 11
nikor97r 0:246c93030d74 12 }
nikor97r 0:246c93030d74 13 void anodoo::visual(PinName A, PinName B, PinName C, PinName D, PinName E, PinName F, PinName G)
nikor97r 0:246c93030d74 14 {
nikor97r 0:246c93030d74 15 _A=A; _B=B; _C=C; _D=D; _E=E; _F=F; _G=G;
nikor97r 0:246c93030d74 16 }
nikor97r 0:246c93030d74 17 void anodoo::bcd(int number)
nikor97r 0:246c93030d74 18 {
nikor97r 0:246c93030d74 19 BusOut display(_G,_F,_E,_D,_C,_B,_A);
nikor97r 0:246c93030d74 20 display=anodo[number];
nikor97r 0:246c93030d74 21 }