#URGENT. problem with c code for calibrating lcd based dvm

Thread Starter

mazgun

Joined Apr 24, 2014
1
digital-voltmeter-using-8051-micrcontroller.jpg

View attachment lcd.txt

View attachment voltmeter.txt

hello friends, attached with this thread are the circuit diagram and the c codes for LCD based digitalvoltmeter.


It is working perfectly in PROTEUS.
My problem is that i want to calibrate it i.e. if the input voltage is1v, instead of showing 1v in the LCD op i want to scale it and show 1V*some constant (say 500) and display it. So, the new o/p in the lcd now is 500v. Can any1 please mention the changes in the c code to be done in order to achieve this. I hope you get the problem. I am a novice in C language and i reallyneed your help. It is a little Urgent. You can message me for any doubts.
Thankyou
 

shteii01

Joined Feb 19, 2010
4,644
Do the calculations in the uC, then show whatever you want on the lcd.

Lets say:
1. You read 1 volt, store it in variable: A=1
2. Do the scaling, either reuse A or use different variable: A=A*500 or B=A*500
A now contains 500, or, if you used different variable, B contains 500.
3. Write the variable to lcd, then write letter V or word volts to lcd. Now your lcd shows: 500 V or 500 volts.
 

spinnaker

Joined Oct 29, 2009
7,835
Maybe you should first explain why your issue is more urgent than anyone else's?


I have read your post 5 times and I still don't understand it.

What is an op???

Best I can figure is you just need to multiply by 500 and display that value.
 
Top