pic16f676 voltmeter

Pic 16f676 Microcontroller Voltmeter 15

[otw_is sidebar=otw-sidebar-1]pic16f676 voltmeter,pic voltmeter 7 segment,Pic16f676 adc c codein this article I will discuss the Pic 16f676 Microcontroller Voltmeter and pic16f676 programming . In the previous article I have discussed the interface of Ultrasonic sensor and the Raspberry Pi using the Python language. So this post will be oriented around how to use Pic 16f676 Microcontroller as a Voltmeter and understanding about Pic Microcontroller  programming

Pic 16f676 Microcontroller Voltmeter:

[otw_is sidebar=otw-sidebar-3]

 

 

Pic 16f676 Microcontroller Voltmeter,pic voltmeter 7 segment

After reading this post you will be able to understand the basics of the circuit Pic 16f676 Microcontroller Voltmeter and also you will learn about the important  c code  for pic voltmeter 7 segment  So sit back keep reading and enjoy learning.

Equipment Required of project :

we are using these components

  • common andoe 7segment displsy
  • pic microcontroller 16f676
  • 14 pin base
  • resistor 10k,10k veriable resistors
  • 7805 for voltage regulator
  • 100uf .01uf capcitor
  • led
  • diode
  • pic kit 2 for programming

[otw_is sidebar=otw-sidebar-2]

pic microcontroller code,pic microcontroller  voltmeter

PIC Microcontroller Programming:

here is the steps of PIC Microcontroller Programming

  1. first open the pic ccs s compiler software
  2. select the project options and set the project options and save
  3. Select a microcontroller for your project. Here ‘PIC16f676’ microcontroller is selected.
  4. Select the compiler and path location for your project. Here  ‘CCS C compiler’ is selected for the PIC microcontroller, then select the ‘browse’ option from the project wired window to select the ‘ccsloader’ in the PICC  folder from the program files.  A folder with the name ‘source group’ is created in the ‘target’ folder.
  5. Give a name to the project and click on ‘NEXT’ button to save the project. A folder with the name ‘source group’ is created in the ‘target’ folder.. Click on the ‘file’ menu on the menu bar. Select ‘new file’ from the drop- down menu.

[otw_is sidebar=otw-sidebar-3]

 

the voltmeter

microcontroller for beginners

 

 

Pic16f676 adc c code:

here is the code of reading  adc in c language and it is compile in pic ccs c compiler

SET_ADC_CHANNEL(3); // for(i=0;i<2;i++) // { // delay_ms(1); mux(); mux();mux();mux(); mux();mux(); result=read_adc(); //} val2=result; // value = (int8) (read_adc() * 500)/1023; //val2 = read_adc (); value = (val2* 5000)/1023;

[otw_is sidebar=otw-sidebar-3]

pic voltmeter 7 segment:

3 digit 7 segment with pic 16f676 microcontroller. this is a very simple pic microcontroller voltmeter using 7 segment it can measure up to 99.9 voltage

here is the circuit of 7 segment voltmeter

pic16f676 voltmeter code:

in this code we are using pic ccs c compiler and read analog signal  and convert in to digital

here is the full code of pic16f676 voltmeter

#include <16f676.h>
#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC                 //Internal RC Osc, no CLKOUT
#FUSES NOMCLR                   //Master Clear pin used for I/O
#FUSES NOBROWNOUT               //No brownout reset
#FUSES PUT
#device ADC=10
#use delay(INT=4Mhz)
#define aon    output_LOW(PIN_C0);
#define aof    output_HIGH (PIN_C0);
#define bon    output_LOW(PIN_C1);
#define bof    output_HIGH (PIN_C1);
#define con    output_LOW(PIN_C2);
#define cof    output_HIGH (PIN_C2);
#define don    output_LOW(PIN_C3);
#define dof    output_HIGH (PIN_C3);
#define eon    output_LOW(PIN_C4);
#define eof    output_HIGH (PIN_C4);
#define fon    output_LOW(PIN_C5);
#define fof    output_HIGH (PIN_C5);
#define gon    output_LOW(PIN_A2);
#define gof    output_HIGH (PIN_A2);
#define d1_of    output_LOW(PIN_A1);
#define d1_on    output_HIGH (PIN_A1);
#define d2_of    output_LOW(PIN_A0);
#define d2_on    output_HIGH (PIN_A0);
#define d3_of    output_LOW(PIN_A5);
#define d3_on    output_HIGH (PIN_A5);
int32  value=0,val2,ind=0,ind2=0,cnt5=0,d1;
void off();
int thu,ten,unit,digit;
void zero(){
 aon;
 bon;
 con;
 don;
 eon;
 fon;
 gof;
}
void one(){
 aof;
 bon;
 con;
 dof;
 eof;
 fof;
 gof;
}

void two(){
 aon;
 bon;
 cof;
 don;
 eon;
 fof;
 gon;
}
void three(){
 aon;
 bon;
 con;
 don;
 eof;
 fof;
 gon;
}
void four(){
 aof;
 bon;
 con;
 dof;
 eof;
 fon;
 gon;
}
void five(){
 aon;
 bof;
 con;
 don;
 eof;
 fon;
 gon;
}

void six(){
 aon;
 bof;
 con;
 don;
 eon;
 fon;
 gon;
}
void seven(){
 aon;
 bon;
 con;
 dof;
 eof;
 fof;
 gof;
}
void eight(){
 aon;
 bon;
 con;
 don;
 eon;
 fon;
 gon;
}

void nine(){
 aon;
 bon;
 con;
 don;
 eof;
 fon;
 gon;
}
void comp1(){
if(digit==0)zero();
if(digit==1)one();
if(digit==2)two();
if(digit==3)three();
if(digit==4)four();
if(digit==5)five();
if(digit==6)six();
if(digit==7)seven();
if(digit==8)eight();
if(digit==9)nine();
 DELAY_MS(1);}
void mux(){
d1_on;digit=thu;comp1();d1_of;
d2_on;digit=ten;comp1();d2_of;
d3_on;digit=unit;comp1();d3_of;
//d3_on;digit=unit;comp1();d3_of;}
void mdelay()
{
mux();mux();//mux();mux();
mux();mux();mux();mux();
mux();mux();mux();mux();
mux();mux();mux();mux();
mux();mux();mux();mux();
mux();mux();mux();mux();
//mux();mux();mux();mux();
//mux();mux();mux();mux();
}
void getad(){
      int32   result=0;int8 i;
     SET_ADC_CHANNEL(3);
//       for(i=0;i<2;i++)
 //  {
  //   delay_ms(1);
 mux(); mux();mux();mux(); mux();mux();
 result=read_adc();
//}
   val2=result;
  //   value = (int8) (read_adc() * 500)/1023;
//val2 = read_adc ();
  value =   (val2* 5000)/1023;
 thu = (value/1000); mux(); mux();mux();mux(); mux();mux();
 ten = (value/100)%10; mux(); mux();mux();mux(); mux();mux();
 unit = (value/10)%10; mux(); mux();mux();mux(); mux();mux();
/*
putc(thu+48);
putc(ten+48);
putc(unit+48);
 unit = value%10;
putc(unit+48);
putc(10);putc(13);
*/
 }
void main ()
{ DELAY_MS(1);
/*
 //SETUP_ADC_PORTS(NO_ANALOGS);
//   set_tris_a(0);
   set_tris_c(0x00);
   setup_comparator(NC_NC_NC_NC);
   setup_adc_ports(sAN0 | VSS_VDD);
   setup_adc(ADC_CLOCK_INTERNAL);
setup_adc(ADC_CLOCK_INTERNAL );
set_tris_c(0x00);     set_tris_a(0xff);
     set_tris_a(0b00011001);
       setup_comparator(NC_NC_NC_NC);   // not use comparator module
   setup_adc_ports( sAN3 | VSS_VDD); 
   setup_adc(ADC_CLOCK_DIV_64);
     set_tris_a(0b00011001);
zero();//DELAY_MS(1000);
while(1)
 {
// DELAY_MS(10);
//pwmd();
getad();
mdelay();
}}

digital voltmeter using microcontroller:

you can download pic16f676 voltmeter hex file and source code below link

Pic16f676 Pinout

Here is the pinout of pic16f676 microcontroller

pic16f676 pinout,pic16f676 pin diagram,pic16f676 datasheet

 

pic16f676 example c code:

pic16f676 is a 8 bit microcontroller and it has 14 pins.

[otw_is sidebar=otw-sidebar-2]

List of Pic16f676 Microcontroller Projects

here is the best and easy pic microcontroller projects

 

  1. Frequency Counter using Pic 16f676
  2. ac/dc voltmeter using pic microcontroller
  3. digital free fall
  4. timer circuit
  5. traffic signal
  6. mark space timer
  7. fridge timer
  8. 50hz comparator
  9. automatic battery monitor circuit
  10. stablizer timer and circuit
  11. multi steps battery charger circuit
  12. digital stop watch
  13. solar energy measurement
  14. ac dimmer using pic microcontroller
  15. ir remote control devices
  16. home automation using pic16f676
  17. digital clock
  18. lcd alarm clock
  19. temperature control +timer
  20. home automation with bluetooth hc04
  21. sonar sensor hcsr04 interfacing
  22. pir light on/off circuit

 

Pic16f676 Frequiency Counter

 

pic microcontroller projects,pic16f676 frequiency counter

 

 

Solar Energy Measurement Using Pic Microcontroller

here is the circuit of solar energy meter or Solar Energy Measurement Using Pic Microcontroller

 

solar energy measurement using pic microcontroller,solar energy meter

it can measure

  1. Solar Voltage
  2. Battery Voltage
  3. Solar Current
  4. Solar Power

temperature controller ds18b20 using pic16f676 microcontroller

[otw_is sidebar=otw-sidebar-3]

temperature controller,DS18B20 PIC MICROCONTROLLER,pic16f676 relay circuit

 

stepper motor control using pic

stepper motor control,motor control using pic

wapda ups voltage display

 

wapda ups voltage display pic microcontroller

 

DOTMATRIX display pic microcontroller

DOTMATRIX display pic microcontroller

 

DOTMATRIX display pic microcontroller

all

for more Engineering Projects click below link

Engineering Projects

Related Articles

[otw_is sidebar=otw-sidebar-3]

 

Introduction to PIC18F452 Microcontroller

 

15 Comments

  1. give me full circuit diagram

  2. i cant find the link to download the HEX file of Pic Microcontroller. Please send me the link or send me the HEX file directly.

  3. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  4. https://lisinopril.network/# order lisinopril without a prescription

    RonaldAveve
  5. tamoxifen menopause tamoxifen adverse effects tamoxifen postmenopausal

    DavidbritY
  6. cytotec pills online: buy cytotec over the counter – buy cytotec online

    RandallFaila
  7. http://lisinopril.network/# lisinopril 10 mg prices

    WilliamReX
  8. buy cipro online canada cipro online no prescription in the usa ciprofloxacin order online

    DavidbritY
  9. https://ciprofloxacin.tech/# ciprofloxacin 500mg buy online

    WilliamReX
  10. lisinopril medicine: 50 mg lisinopril – cost of lisinopril 20 mg

    RandallFaila
  11. cost of cheap propecia without rx buying propecia online buy propecia now

    DavidbritY
  12. http://finasteride.store/# cost of cheap propecia without insurance

    WilliamReX
  13. https://cytotec.club/# buy cytotec over the counter

    RonaldAveve
  14. order cytotec online Cytotec 200mcg price Misoprostol 200 mg buy online

    DavidbritY
  15. cost of cheap propecia without insurance: cost of cheap propecia – buy propecia online

    RandallFaila

Leave a Reply

Your email address will not be published. Required fields are marked *