jueves, 25 de octubre de 2012

sdcc easypic2 jmq xD! BCD

jmq.h
#include <pic16f877a.h>

void INT_BCD(unsigned int dato, unsigned int *a, unsigned int *b,unsigned int *c,unsigned int *d)
{
 *a = dato / 1000;
 *b = (dato % 1000) / 100;
 *c = ((dato % 1000) % 100)/10;
 *d = ((dato % 1000) % 100)%10;

}

char BCD_ASCII(unsigned int dato){
 return (dato | 48);
}

No hay comentarios:

IRC

#freenode->#usljujuy

Seguidores

Eventos n_n

Tira Ecol Nano,Bilo y Luca