Using PIC as a Low Voltage Meter, need help


Closed Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Jun 2008
    Location
    Eastern USA
    Posts
    5

    Question Using PIC as a Low Voltage Meter, need help

    Hello everybody, I have used pics before and I am still green, I managed to create inputs and outputs ok, used some time delays, but i now have a need to create a PIC managed voltage meter in the range of 0 to 2 volts., also must have four places. I have seen PIC controlled LCD and LED displays. Iam open on either. I do have the schematic for a PIC16F877A but no code! Can any body help with the code to get this project underway?

    Thanks in advance, I have tryed other forums with little to no responce, I am starting to believe that its not a easy task.

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    Hi Doable

    I'm not sure if anyone could help without knowing details of your board. Maybe you'd like to consider posting the schematic of your board to get ideas flowing.

  3. #3
    Join Date
    Jun 2008
    Location
    Eastern USA
    Posts
    5


    Did you find this post helpful? Yes | No

    Default PIC Voltmeter

    Thanks Jerson,

    Heres the schematic of a PIC 16F876A with a LCD display showing 2 lines, able to output 2 voltages as i need.

    This looks like what i need, i cant get any responce form the site that has posted this schematic!

    Its a pleasure to get a responce to the question, thanks again Jerson.
    Attached Images Attached Images  

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Cool

    Hi, Doable

    I think a look to the SAMPLES folder of your PbP CD will show you how to deal with the PIC A/D converter ... and display the result.

    search for "ADCin xxxxx.bas"

    The link you gave only allows ( with buying the '876 ) a 0 - 7v range ... by changing the input divider ratio.

    These examples are for '877 and '876 ... surprise !

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Jun 2008
    Location
    Eastern USA
    Posts
    5


    Did you find this post helpful? Yes | No

    Smile

    Hello Alian,

    I am using Microchip PICkit-2 and MPLAB, are the SAMPLES folders you speak of on those disk? If not wher can i get the sample folders of PbP CD?

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    Alain gave you the direction, to your legal obtained CD. Are a legal owner?

    Ioannis

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink

    Hi, Ioannis

    As those files are free to download for every one ... and considering our friend's profile ...

    let's give this link without any indiscreet further question ...

    http://www.melabs.com/resources/samples.htm

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    Okie-dokie Alain...

    Ioannis

  9. #9
    Join Date
    Jun 2008
    Location
    Eastern USA
    Posts
    5


    Did you find this post helpful? Yes | No

    Smile

    Thanks Alian for the information,

    I dont want to sound stupid but i have little experance in the PIC world, but have a great thurst to learn. Now with the system i am using are the code examples compatable. I have done enough to have learned that even between different PIC the basic code changes, I dont understand Microchip's reason for that.

    I will attemp to write to a PIC16F877A the sample code for the voltage meter, I am sure that i have more questions later on. Thanks again for helping with this!

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Cool

    Quote Originally Posted by Acetronics View Post
    let's give this link without any indiscreet further question ...
    Probably never seen the 'little green book' either...

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink

    Hi, Ski

    As Mel said ... let's be helpful, ... !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  12. #12


    Did you find this post helpful? Yes | No

    Default

    One thing you can do is to take away the resistor network on your analog inputs and just put a 1k in place of the 100k(for isolation and input protection). That resistor network is scaling a 0-70v input to a 0-5v in to the PIC.

    Then connect a 2 volt source to AN3 to serve as the high voltage ref. To do this you need to set register bits PCFG3-0 to '0001'. This changes the range of the ADC to 0-2V, instaed of 0-5v. You could use a simple resistor divider like 3k/2k or a precision voltage reference like a LMV431 or even a zener diode.
    Tim Barr

  13. #13
    Join Date
    Jun 2008
    Location
    Eastern USA
    Posts
    5


    Did you find this post helpful? Yes | No

    Smile

    Thanks Tim for the info, i will try that and let you know how it worked.

Similar Threads

  1. The PIC does not start its program.
    By Ted's in forum Off Topic
    Replies: 36
    Last Post: - 28th July 2008, 09:22
  2. Serial Question + General Review
    By Freman in forum General
    Replies: 2
    Last Post: - 20th June 2008, 22:27
  3. Problems with RC2 and RC3
    By Christopher4187 in forum General
    Replies: 11
    Last Post: - 29th May 2006, 17:19
  4. PIC16F84(A) counter
    By nmmr in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th May 2005, 04:27
  5. Low Voltage Detect
    By Brian in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 1st April 2005, 16:46

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts