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

Discussion in 'Programmer's Corner' started by mazgun, Apr 24, 2014.

  1. mazgun

    Thread Starter New Member

    Apr 24, 2014

    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.
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    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.
  3. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    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.