CRISTIAN YOMAYUZA
/
dec_seg_
//conversor de bcd a 7 segmentos
seg.cpp@1:c773d22f95b3, 2017-08-19 (annotated)
- Committer:
- cristiany
- Date:
- Sat Aug 19 21:50:37 2017 +0000
- Revision:
- 1:c773d22f95b3
- Parent:
- 0:da3425777443
ADC WITH LEDS
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cristiany | 0:da3425777443 | 1 | #include "seg.h" |
cristiany | 0:da3425777443 | 2 | |
cristiany | 1:c773d22f95b3 | 3 | int arreglo[13]={0x00,0x01,0x03,0x07,0x0F,0x1F,0x3F,0x7F,0xFF,0x1FF,0x3FF,0x7FF,0xFFF}; |
cristiany | 1:c773d22f95b3 | 4 | |
cristiany | 1:c773d22f95b3 | 5 | void cod::salida(PinName a,PinName b,PinName c,PinName d,PinName e,PinName f,PinName g,PinName h, PinName i, PinName j, PinName k, PinName l) |
cristiany | 0:da3425777443 | 6 | { |
cristiany | 1:c773d22f95b3 | 7 | a_=a;b_=b;c_=c;d_=d;e_=e;f_=f;g_=g;h_=h;i_=i;j_=j;k_=k;l_=l; |
cristiany | 1:c773d22f95b3 | 8 | |
cristiany | 1:c773d22f95b3 | 9 | } |
cristiany | 1:c773d22f95b3 | 10 | void cod::leds(int number) |
cristiany | 0:da3425777443 | 11 | { |
cristiany | 1:c773d22f95b3 | 12 | BusOut display(a_,b_,c_,d_,e_,f_,g_,h_,i_,j_,k_,l_); |
cristiany | 0:da3425777443 | 13 | display=arreglo[number]; |
cristiany | 0:da3425777443 | 14 | } |