Digital volt meter with LED 7segment display PIC16f877
Digital VoltMeter Project:-
Introduction:
In this project we will learn how develop a digital voltmeter using microcontroller PIC 16f877. This microcontroller project is for learning purpose. students will get knowledge about the seven segment led display. Four digits are used for display.
Multiplexed LED display:-
In this project the led seven segment display is used in multiplexed formate. In multiplexed format only one digit is truned ON and remaining all three digits remain switched OFF. The seven sgments of all four digits are tighted common so, b-bit code is place whose digit is on. The display made such that the digits are turned ON one by one and coresponding code is sent to data bus corespondingly.
The frequency of the switching digits should be kept such that no flucring effects should observed. Normal the switching frequency is more than 100Hz. In this way the observed think that all the digits are truned and required number is read.
These digits are controled by microcontroller, in our case we are using microcontroller PIC16f877 as a controlling device of the display.
The microcontroller PIC16f877 have 8 channel 10 bit resolution analog to digital converts builtin. Thus we donot need to use any ADC externally.
Only one of these adc is used here. the circuit diagram is shown below.The program in written in c language using mikroC compiler. The code listing is presented below.
unsigned int cnt ,brk;
char led [3];
unsigned int rem ;
void converter (unsigned int z);
void scanled (void);
void main() {
OPTION_REG = 0×80; // pull up resistors
//PORTA = 0; // clear porta (make sure both displays are off)
TRISA = 255; // designate porta pins as output
PORTD = 0; // clear portb (make sure LEDs are off)
TRISD = 0; // designate portb pins as input
ADCON1 = 0×80;//ADCON2 = 0×80; // Configure analog inputs and Vref
while(1)
{
cnt=ADC_Read(2);
cnt=cnt*5;
converter(cnt);
scanled();
}
}
void converter(unsigned int z)
{
led[0] = z/1000;
rem = z%1000 ;
led[1] = rem/100;
rem = rem%100 ;
led[2] = rem/10;
led[3] = rem%10;
}
void scanled(void)
{
unsigned char i;
for(i=0;i<4;i++)
{
portd = i << 4;
portd |= led[i];
delay_ms(10);
}
}
Tags:-
digital voltmeter circuit diagram,digital voltmeter manufacturers,digital voltmeter suppliers,digital voltmeter circuits,digital voltmeter patent,digital ac dc voltmeter,make digital voltmeter,digital wallet,pic microcontroller voltmeter, voltmeter microcontroller, microcontroller voltmeter ammeter, voltmeter pic microcontroller,7 segment led display,led display laptop,led display price,led display board,lcd display,led display wikipedia,oled display,led signs
dear sir,now write mikroC c program 16f676 cathode seven segment ac voltmeter.But display read
maximum value 256.So I want to read 300.How adc calculation.Please you help me, thank a lot.