Documente Academic
Documente Profesional
Documente Cultură
MiniprojectDigitalVoltMeter(DVM)usingPIC16F877AwithCcode|ProgrammingTechniques
Pro grammi n g Te c h n i q u e s
T ut o r ia ls a nd Mini Pr o ject s o f C , C + + , PH P, O penG L, a nd o t her la ngua ges w it h C / C + + co des o f Da t a St r uct ur e, Numer ica l Met ho ds
a nd C o mput er G r a phics
Home
CProjects
C++Projects
ComputerGraphics
DataStructure
GLUTTutorial
NumericalMethods
ImageProcessing
Friday,February24,2012
MiniprojectDigitalVoltMeter(DVM)usingPIC16F877AwithCcode
DVMProjectOverview
Digital Volt Meter is a Mini Project that I made as my project of the subject Microprocessor Based
Instrumentation System. In this project I have used three major electronic components. They are
PIC16F877A,LCDDisplay(16X2)andLowpowerQuadopamp(LM324).PIC16F877Aisusedas
an ADC module which converts the analog input into corresponding 10 bit digital output. It also
provides enable and RS signals to the LCD display. LCD Display is used to display the converted
digitalbinarydatatodecimalformatsothatusercaneasilyunderstandthevoltage.AndfinallyLow
powerquadopampisusedasbufferandasinverter.TheDVMmeasuresthevoltagesrangingfrom
50Vto+50V
.ButPICcanoperateonlyupto+5V.Sotomeasurethe+50V,thevoltagedividerisused.This
dividerdividestheinputvoltage10timessothat+50Vinputvoltageisnowbecomes+5VatthePIC
input.InsidePICaprogramiswrittenwhichmultipliestheconverteddigitalvalueby10beforesending
ittotheLCDdisplay.AscreencaptureofaroughdesignoftheprojectinProteus7.0Professionalis
givenbelow.
Topics
AdvancedCTutorial(18)
AndroidApplicationDevelopment(8)
ArtificialIntelligence(4)
AssemblyTutorials(3)
BusinessIntelligence(1)
CProjects(7)
CTutorial(40)
ComputerGraphics(13)
cplusplusprojects(6)
CplusplusTutorial(34)
DataAnalysis(1)
DataStructureandAlgorithm(26)
Database(1)
GLUTTutorial(16)
GraphicsLibraries(4)
ImageProcessing(12)
JavascriptTutorial(3)
Linux(3)
MachineLearning(3)
NumericalMethods(20)
PHPTutorial(13)
PROLOG(8)
R(1)
FindusonFacebook
PIC16F877AADCModule
The A/D convertor module has eight inputs. The conversion of
analog input results in a corresponding 10 bit digital output. The
A/Dmodulehasfourregisters.Theyare
1.A/DResultHighRegister(ADRESH)
2.A/DRegisterLowRegister(ADRESL)
3.A/DControlRegister0(ADCON0)
4.A/DControlRegister1(ADCON1)
The ADICON0 register controls the operation of the A/D module
andtheADICON1registerconfiguresthefunctionsoftheportpins.
ThestructureofADICON0
ADCS1 ADCS0 CHS2 CHS1 CHS0 GO/DONE ADON
bits76:ADCS1:ADCS2=>Conversionchannelselect
bits53:CHS2:CHS0=>Analogchannelselect[000=Channel1,001=Channel2
andsoonuptochannel7]
bit2:GO/GONE=>ADConversionstatusbit[1indicatesconversioninprogress
and0indicatesconversionnotinprogress]
http://www.programmingtechniques.com/2012/02/miniprojectdigitalvoltmeterdvm.html
PopularPosts
TopCollections(Lists)ofMiniProjectsinC
andC++freedownloadsourcecodeand
exe.
HerearethecollectionsofMiniProjectsinc
andc++withfullsourcecodeand
executablefile.Allthecodesarecompiled
usingGCCCom...
BreadthFirstSearchinC++
AlgorithmandSourceCode
BasicTheoryBreadthfirst
searchesareperformedby
exploringallnodesatagiven
depthbeforeproceedingtothenextlevel.
Thismeans...
DifferencebetweenArraysandStructures
inC
Boththearraysandstructuresareclassified
asstructureddatatypesastheyprovidea
mechanismthatenableustoaccessand
manipulate...
1/7
8/20/2016
MiniprojectDigitalVoltMeter(DVM)usingPIC16F877AwithCcode|ProgrammingTechniques
bit1:Unimplemented
MiniprojectEmployeerecord
systemusingC
Theemployeerecordsystem
isverysimpleandforvery
beginnerminiproject.Itis
basedonethemenudrivenprogramfor
elementarydatab...
bit0:ADON=>A/Donbit[1indicatesconvertermoduleispowerupand0indicates
shutdown]
ThestructureofADICON1
ADFM ADCS2
bit7:ADFM=>A/DResultformat[1indicatesRightJustifiedand0indicatesLeft
Justified]
MiniprojectCalendar
ApplicationUsingC/C++
Freedownload.
MiniprojectCalendar
Applicationisalsoasimple
projectmadeusingC.Itusesmanywindows
propertiestomakeitcolorful,forexampl...
bit6:ADCS2=>Conversionchannelselect
bits54:Unimplemented
bits30:A/Dportconfigurationcontrolbits
LDCDisplay(16x2)
PinNo.
Name
Funciton
Vss
Ground
Vdd
+VeSupply
Vee
Contrast
RS
RegisterSelect
R/W
Read/Write
Enable
D0
Databit0
D1
Databit1
D2
Databit2
10
D3
Databit3
11
D4
Databit4
12
D5
Databit5
13
D6
Databit6
14
D7
Databit7
DepthFirstSearchinC++
AlgorithmandSourceCode
BasicTheoryDepthfirst
searchesareperformedby
divingdownwardintoatreeas
quicklyaspossible.Itdoesthisbyalways
generatin...
GoogleCloudMessaging
(GCM)inAndroidusingPHP
Server
GCMforandroidisaservice
whichisbasicallyusedtosend
thedatafromservertotheandroiddevices.
OneuseofthisGCMisapushnoti...
NumericalMethods:Inverseofnxnmatrix
usingC
SourceCode:#include<stdio.h>intmain(){
floatmatrix[10][10],ratio,ainti,j,k,n
printf("Enterorderof...
CSourceCode
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include<htc.h>
#definedataPORTB
#defineRSRD0
#defineENRD1
__CONFIG(HS&WDTDIS&PWRTEN&BORDIS&LVPDIS);
floatvalch0,valch1;
voiddelay_ms(intn)
{
TMR1H=0xEC;
TMR1L=0x77;
T1CKPS1=0;
T1CKPS0=0;
TMR1CS=0;
TMR1IF=0;
TMR1ON=1;
while(n>0)
{
while(!TMR1IF);
TMR1IF=0;
TMR1H=0xEC;
TMR1L=0x77;
n;
}
}
floatselect_adc(unsignedcharchnl){//init_adc(channelname);
CHS2=CHS1=0;CHS0=chnl;
delay_ms(10);
ADON=1;
ADGO=1;
while(ADGO);
return(((ADRESH*256+ADRESL)*5.0/1023)*10);
}
voidLCD_Write(unsignedcharvalues,intrs){
data=values;
RS=rs;//rs=0commandandrs=1data
EN=1;
delay_ms(1);
46
EN=0;
http://www.programmingtechniques.com/2012/02/miniprojectdigitalvoltmeterdvm.html
MiniProjectStudentRecord
SysteminC
Miniprojectstudentrecord
systemisanotherproject
basedonprogramming
languageC.Italsousesfilesasdatabase.
Thisprojectissim...
Addingtwocomplexnumbers
usingStructureinC
Simplealgebraicadditiondo
noworkinthecaseof
ComplexNumber.Because
theyhavetwoparts,RealandImaginary.To
addtwocomplexnumb...
BlogArchive
2016(2)
2015(1)
2014(2)
2013(27)
2012(74)
November(1)
October(1)
July(5)
June(8)
May(8)
April(4)
March(10)
February(17)
PHPTutorial:GettinguserinputinPHP
usingHTML...
FastestwayofcalculatingPrimeNumber
withless...
MiniprojectDigitalVoltMeter(DVM)
usingPIC16F...
2/7
8/20/2016
MiniprojectDigitalVoltMeter(DVM)usingPIC16F877AwithCcode|ProgrammingTechniques
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
EN=0;
}
voidLCD_clear(void){
LCD_Write(0x01,0);//thisclearsLCD
}
voidLCD_goto(unsignedcharrow,unsignedcharcolumn){
if(row==1){
LCD_Write(0x80+column,0);
}
elseif(row==2){
LCD_Write(0xC0+column,0);
}
}
voidLCD_num(intn){
LCD_Write((n/100)+48,1);
LCD_Write(((n%100)/10)+48,1);
LCD_Write((n%10)+48,1);
}
voidinitLCD(void){
TRISD=0x00;//asoutput
TRISB=0x00;
delay_ms(100);
LCD_Write(0x30,0);//8bitdisplay
EN=1;EN=0;
LCD_Write(0x38,0);//2linesmode
LCD_Write(0x0C,0);//dispalyon,cursorblinking
delay_ms(1);
LCD_clear();LCD_goto(1,0);delay_ms(1);
LCD_goto(1,7);
LCD_Write('D',1);delay_ms(100);
LCD_Write('V',1);delay_ms(100);
LCD_Write('M',1);delay_ms(100);
LCD_goto(2,12);
LCD_Write('v',1);delay_ms(100);
LCD_goto(2,7);
LCD_Write('.',1);delay_ms(100);
voidmain(void){
PCFG3=PCFG2=PCFG1=PCFG0=0;
ADFM=1;
ADCS1=1;
ADCS0=0;
TRISA=0xFF;
initLCD();
while(1){
valch0=select_adc(0);
valch1=select_adc(1);
if(valch0<=0.00&&valch1!=0){
valch0=valch1;
LCD_goto(2,1);
LCD_Write('',1);
delay_ms(5);
}
else{
LCD_goto(2,1);
LCD_Write('+',1);
delay_ms(5);
}
LCD_goto(2,4);
LCD_num(valch0);
LCD_goto(2,8);
LCD_num((valch0(int)valch0)*1000);
}
}
ConfiguringMonoDroidinVisualStudio
2010
AndroidAppDevelopmentwith
MonoDroidusing.NET...
DifferentDataTypesinPHP
PHPTutorial:TheOperationalTrail
Subtractionoftwobinarynumbersusing
C
AdditionoftwobinarynumbersusingC
GettingStartedwithPHP:WritingHello
WorldPro...
InstallingPHPusingWAMPonwindows
InstallationofPHPonWindows
Platform
WhyshouldweusePHP?
WhatisPHP?
LightninginOpenGLwithspotLight
LightninginOpenGLwithMaterialEffect
LightninginOpenGLwithoutmaterial
effect.
January(20)
2011(128)
SearchThisBlog
Search
Followers
FlagCounter
Freecounters
AboutAuthor
http://www.programmingtechniques.com/2012/02/miniprojectdigitalvoltmeterdvm.html
3/7
8/20/2016
MiniprojectDigitalVoltMeter(DVM)usingPIC16F877AwithCcode|ProgrammingTechniques
BibekSubediisacomputerengineeringgratuateandfounderofPrograming
Techniques.HelovesresearchinginthefieldofMachinelearning,datamining
andAlgorithms.Heisaparttimeblogger,abathroomsinger(:D)andan
employeeofasoftwarecompany.YoucanfollowhiminTwitterandfindhimin
Facebookormailhim
35comments:
farlind March23,2012at8:16AM
canugivemeadetailpicturesduetoicannotseewithdetailcomponent.hopeucanhelpme.thanks..please
emailtofarlin1987@gmail.com
Reply
Replies
Bibek123 March23,2012at10:14AM
ihaveemailedyou..seeyourmailbox...
rashid September1,2012at3:05PM
alsosendmethepicturesplease?rashiddl@yahoo.com
GuillermoTorresR July11,2013at5:14PM
hi good morning great project. can you please email me the picture to see with detail, the
componentstobuythem.iwillbuildit.Thankyouverymuch
guillerman70@gmail.com
wajihsiai February28,2014at7:41AM
sendmethepicturesplease?wajih.siai.91@gmail.com
Reply
bjs April4,2012at2:34AM
pleasesendmeonedetailedpictureofthecircuit(bhaskars239@gmail.com).thankingyou
Reply
MirMehedi April4,2012at8:42PM
canyouhelpmetomakealinefollowerrobotusingpic16f877?
mahedi.siu@gmail.com
Reply
SREEJAP April17,2012at6:17PM
canugivemeadetailpicturesduetoicannotseewithdetailcomponent.hopeucanhelpme.thanks..please
emailtop.sreeja92@gmail.com.
Reply
bjs April20,2012at2:11AM
canupleasegivemeadetailedcircuitoftheproject.pleaseemailmeatbhaskars239@gmail.com
Reply
ArunS May5,2012at4:11PM
hiamarun.ihavesomeproblem,Error128"volt.c"Line6(1,5):A#DEVICErequiredbeforethisline
__CONFIG(HS&WDTDIS&PWRTEN&BORDIS&LVPDIS)
howtosolvethis
http://www.programmingtechniques.com/2012/02/miniprojectdigitalvoltmeterdvm.html
4/7
8/20/2016
MiniprojectDigitalVoltMeter(DVM)usingPIC16F877AwithCcode|ProgrammingTechniques
iamusingccsccompilerplzhelp
mymailarunvtkl@gmail.com
Reply
alex.y.k May15,2012at6:48PM
Hi,canugivemeadetailpicturesduetoicannotseewithdetailcomponent.hopeucanhelpme.thanks..
pleaseemailtoyoke_kong92@hotmail.com.
Reply
AbhishekMukherjee May30,2012at10:31AM
Hi,Itooneedadetailedpictureofthecircuit.Pleaseemailittomeatabhmukh@gmail.com
Reply
AvijitKarmakar August17,2012at10:31PM
can u give me a detail pictures because i cannot see with detail component.hope u can help
me.thanks..pleaseemailtovirus@gmail.com
Reply
rajinisuresh September5,2012at5:48PM
Isthisprojectwillwork.......
Becauseidesignedthisprojectnotworking.
Itdisplayinganblocklineonly..
Kindlygiveyourreply.
THANKYOU
Reply
Anonymous September16,2012at9:40PM
Canyouprovidemethedetailsofthis?
suchassimulationKindlymailmeat
naeem7240@hotmail.com
thanks:)
Reply
Isra September25,2012at3:35PM
Hi,canugivemeadetailpicturesduetoicannotseewithdetailcomponent.hopeucanhelpme.thanks..
pleaseemailtowritetoisra@yahoo.com.my
Reply
i_phen September28,2012at1:55PM
Hello there.. i cannot clearly identify the other electronic components could you email me the detailed
imageplease?Thankyou!
teaphengrayfog@gmail.com
Reply
iwyz80 February16,2013at9:27PM
whereistheprobeinthecircuitshouldIwanttomeasureacomponent?
Reply
asae March23,2013at3:59PM
couldyouemailmethedetailedimageplease?Thankyou!
pleaseemailmeasze89@gmail.com
Reply
http://www.programmingtechniques.com/2012/02/miniprojectdigitalvoltmeterdvm.html
5/7
8/20/2016
MiniprojectDigitalVoltMeter(DVM)usingPIC16F877AwithCcode|ProgrammingTechniques
Anonymous April8,2013at2:58AM
Hi,kindlyemailmetheschematicwithclearercomponentlabelsatbboofs@yahoo.com.Thankyou
Reply
sunshangxiang May29,2013at4:46AM
thanksthisisgoodexamplecoulduemailforthesimulationandthesourcecodeverygratefulforthis
unilearnanything@gmail.com
Reply
RobertJohnDichos July9,2013at7:27AM
i need a clearer schematic diagram of this circuit. If you don't mind sending, please do at
robertjohndichos@gmail.comortrebor_nhoj_ditch@yahoo.com
thanks
Reply
sunnythreddy July24,2013at7:47PM
canuplsgivemeadetailedinfoabouttheconstructionofsimpledigitalvoltmeter.....
reddy.sunnyth@gmail.com
Reply
RoanAngelExconde September5,2013at11:32AM
plsgivemethepictureofdetailedcomponentthanks:)
myemailisroanzky@gmail.com
Reply
NajamButt September7,2013at8:40PM
canyoupleaseprovidemewithahighresolutionpicofthesimulationorthe.DSNfileatthisemailaddress
(najambutt143@gmail.com)?...thanksinanticipation.....:)
Reply
Replies
ShahirahIrah January2,2014at9:28AM
hi good morning great project. can you please email me the picture to see with detail, the
componentstobuythem.iwillbuildit.Thankyouverymuch
(shahirahghazali93@gmail.com)
Reply
wajihsiai February28,2014at7:08AM
Greatproject.canyoupleaseemailmedetailedpictureofthecircuitinisis.iwillbuildit.Thankyouvery
much
(wajih_siai@hotmail.fr)
Reply
NeethulKrishna March16,2014at11:30AM
plssendmeadetailedpictureofthecircuit
mymailidis
kichunyk@gmail.com..
assoonaspossibleplease
Reply
Anonymous April9,2014at5:21AM
Can you send the picture to see with detail, the components to buy them? There will be very helpful.
raymondliu56@hotmail.com
Reply
http://www.programmingtechniques.com/2012/02/miniprojectdigitalvoltmeterdvm.html
6/7
8/20/2016
MiniprojectDigitalVoltMeter(DVM)usingPIC16F877AwithCcode|ProgrammingTechniques
AymanMatar May21,2014at4:25PM
isthereanywayucanconvertthistobeusedforapic16f917programmedthroughICD3usingMPLAB
Reply
ianvercalub August16,2014at8:34AM
plsemailmeyourcompletedetailofyourproject..ianzz_libra@yahoo.com
Reply
Anonymous September29,2014at3:26PM
Can you send the picture to see with detail, the components to buy them? There will be very helpful.
pumpkin125_mcr@yahoo.com
Reply
AdnanKhan January5,2015at10:01PM
it'snotworkingonmycodeblocks..
thiserrorisshown,
fatalerror:htd.h:nosuchfileordirectory.
Reply
Unknown December17,2015at5:28PM
Gooddaysir,
Wouldbegratefulifyoucouldsendmethepicturetoseewithdetail,thecomponentstobuythem.
karthikeyanramadoss@outlook.com
Reply
Zoniv July13,2016at11:46PM
Hello, It also provides enable and RS signals to the LCD display. LCD Display is used to display the
converteddigitalbinarydatatodecimalformatsothatusercaneasilyunderstandthevoltage.Andfinally
Lowpowerquadopampisusedasbufferandasinverter.Greateffortinanalyzing.Thanksforthepost.
Reply
Enteryourcomment...
Commentas:
Publish
Selectprofile...
Preview
NewerPost
Home
OlderPost
Subscribeto:PostComments(Atom)
ViewMyStats
BibekSubedi.PoweredbyBlogger.
http://www.programmingtechniques.com/2012/02/miniprojectdigitalvoltmeterdvm.html
7/7