Marvin Villamizar
/
DECO_7_BCD_DYNAMIC
asdasd
BCDSEG.cpp
- Committer:
- dimmu8410
- Date:
- 2018-07-06
- Revision:
- 0:751d972986e7
File content as of revision 0:751d972986e7:
#include "BCDSEG.h" int anod[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::bcd(int number) { BusOut display(_g,_f,_e,_d,_c,_b,_a); display=anod[number]; } void anodo::dual(PinName one,PinName two,int uni,int dec,int time) { DigitalOut Eone(one); DigitalOut Etwo(two); for(int u=0;u<time;u++) { Eone=1; Etwo=0; bcd(uni); wait(0.0005); Eone=0; Etwo=1; bcd(dec); wait(0.0005); } }