Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4930

making a frequency measurement meter with 7 segment dynamic display and pic18f4550

$
0
0
#define f_timer 2000000

const unsigned short DIGITOS[] =
{
0x3F,
0x06,
0x5B,
0x4F,
0x66,
0x6D,
0x7D,
0x07,
0x7F,
0x6F,
};


void VerDisplay( int Frequency )
{
unsigned short U;
unsigned short D;
unsigned short C;
unsigned short UM;
UM = Frequency/1000;
C = (Frequency-UM*1000)/100;
D = (Frequency-UM*1000-C*100)/10;
U = (Frequency-UM*1000-C*100-D*10);
PORTB = DIGITOS;
PORTA.F0=1;
delay_ms(10);
PORTA=0;
PORTB = DIGITOS[D];
PORTA.F1=1;
delay_ms(10);
PORTA=0;
PORTB = DIGITOS[C];...


making a frequency measurement meter with 7 segment dynamic display and pic18f4550

Viewing all articles
Browse latest Browse all 4930