12F675 compare voltage help.


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by geckogrotto View Post
    Ok how do I do that. I had edited my post while you were posting.
    I see the edit, and you're on the right track, pretty much the only track.

  2. #2
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Ok thanks,
    I just didn't want to go down that road if there was a better way,

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by geckogrotto View Post
    Ok thanks,
    I just didn't want to go down that road if there was a better way,
    Well, you could use the floating point math routines on melabs website, microchip's site, etc.etc. or write your own.

    The trick to doing it the way you've got set up above is to make sure that no individual variables overflow or underflow, no matter what values end up going into them. It just takes a bit of thinking thru it all...

  4. #4
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Well, you could use the floating point math routines on melabs website, microchip's site, etc.etc. or write your own.

    The trick to doing it the way you've got set up above is to make sure that no individual variables overflow or underflow, no matter what values end up going into them. It just takes a bit of thinking thru it all...


    I would like to not use those as I want to learn how to do this, but I sure could use some help i'm a bit lost here. Maybe just working on it too long.

    The number I expect is 1-3 digits. Example

    If the number is 123 it would be 1.23
    If its 12 .12
    If its just 1 then would be .01

    I just can't seem to wrap my mind around how to actually accomplish this.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by geckogrotto View Post
    I would like to not use those as I want to learn how to do this, but I sure could use some help i'm a bit lost here. Maybe just working on it too long.

    The number I expect is 1-3 digits. Example

    If the number is 123 it would be 1.23
    If its 12 .12
    If its just 1 then would be .01

    I just can't seem to wrap my mind around how to actually accomplish this.

    In post #9 and post #15, you've practically got the answer for yourself.
    Cook on it for a bit, roll it around in your brain, see what you come up with.

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    You should have a look at DEC and DIG modifier and keep your maths as is.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Ok guys thanks for the input I think im going to call it a night and take a fresh look at it again tomorrow.

    Hopefully it will all fall into place

Similar Threads

  1. high voltage high frequency H-Bridge
    By George in forum Off Topic
    Replies: 6
    Last Post: - 27th April 2009, 11:50
  2. Expanded Scale Voltmeter
    By Pic_User in forum Schematics
    Replies: 6
    Last Post: - 8th February 2008, 20:32
  3. make a low voltage output from a PIC pin
    By emptyset in forum General
    Replies: 1
    Last Post: - 8th February 2008, 19:20
  4. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  5. Low Voltage Detection
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th January 2005, 18:29

Members who have read this thread : 0

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