código guía 2 sesión 1

Dependencies:   mbed

Fork of bdc_7seg by sergio burbano

Committer:
grupo3
Date:
Sat Aug 12 21:03:54 2017 +0000
Revision:
1:64569742f2ec
Parent:
0:a638e4f36df2
Child:
2:7dcd61e90e19
C?DIGO GU?A 2 SESI?N 1

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 1:64569742f2ec 6 dipp=dip.read();
grupo3 1:64569742f2ec 7 return dip;
grupo3 0:a638e4f36df2 8 }
grupo3 1:64569742f2ec 9 void anodo::visual(PinName seg_a,PinName seg_b, PinName seg_c,PinName seg_d,PinName seg_e,PinName seg_f, PinName seg_g)
grupo3 0:a638e4f36df2 10 {
grupo3 1:64569742f2ec 11 _a=seg_a;_b=seg_b;_c=seg_c;_d=seg_d;_e=seg_e;_f=seg_f;_g=seg_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 }