Current Measurement


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008
    Location
    Charlottesville, VA
    Posts
    31

    Post Current Measurement

    I am using the PIC16F877A to measure current flowing through a shunt. The way that it works is basically this: with every 10mA increase in current, the adc should increase by 1. I need help with a program to output this current on an lcd. What I'm doing right now is using a bunch of if statements but as you can imagine this eats up alot of code space as well as time... any help would be greatly appreciated. Thank you all in advance.

    Note: I'm using microcode studio plus with the pbp language. Not too fluent in assembly.
    Last edited by mcbeasleyjr; - 24th May 2009 at 15:35. Reason: forgot to put in language using...

    Morris Beasley
    Manufacturing Test Technician
    B.S. Industrial Technology (2007)

    For more information on our robotics, please visit:
    http://www.ish-electronics.webs.com

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mcbeasleyjr View Post
    The way that it works is basically this: with every 10mA increase in current, the adc should increase by 1.
    Hello mcbeasleyjr,

    I think you might need to give us more information. Otherwise, you may just get answers like this:

    Code:
    adc_result = adc_result * 10 '10mA per value of adc_result
    lcdout $FE,1,#adc_result," mA"
    http://www.scalerobotics.com

  3. #3
    Join Date
    Dec 2008
    Location
    Charlottesville, VA
    Posts
    31


    Did you find this post helpful? Yes | No

    Smile simple

    you know... looking at that, i always try to make things complicated... lol. from what you've posted here i realize that whatever the value of the adc is it will multiply it by the 10mA and give me the answer i need. i thank you for that. eliminates all those annoying if statements.

    Morris Beasley
    Manufacturing Test Technician
    B.S. Industrial Technology (2007)

    For more information on our robotics, please visit:
    http://www.ish-electronics.webs.com

Similar Threads

  1. Reducing PIC current to as low as possible...
    By FromTheCockpit in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th November 2009, 04:28
  2. Replies: 8
    Last Post: - 5th May 2009, 20:10
  3. 16F628A current high during sleep
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th October 2006, 10:21
  4. Current Meter
    By mikefox in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 18th September 2006, 06:15
  5. AC Measurement problems
    By Charles C in forum Off Topic
    Replies: 0
    Last Post: - 25th October 2005, 17:13

Members who have read this thread : 1

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

Tags for this Thread

Posting Permissions

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