Help with final project


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Another final project....sounds like more money wasted....or another crappy instructor....

    At any rate...
    You've got voltage is a word.....
    Somewhere in that coding mess you've got:
    voltage = voltage * 300 ' Removes decimal
    Now what happens when voltage = 219?

    Also, you sample the voltage once and go with that number and only that number. Do you have any kind of filter on the line coming from the battery or is it straight from the battery thru a divider? Probably no filters or anything. Easiest thing to do here is to read the ADC a bunch of times and divide the result by the number of times you read it, average out the reading. Or what I do when I have to read a 'slowly' changing analog input....Say my last result was '100'. I read the ADC again, this time it's 110, I add 1 to my last results making it 101. I read the ADC, this time it's 130, I add another 1 to my last, making 102. I read again, this time it's 80, I subtract one. I would hope you get the picture. If the result I just read is within 1 of my last result, I don't change the number at all unless I get 2 successive reads that are both one off.
    JDG

  2. #2
    OvERKiLL's Avatar
    OvERKiLL Guest


    Did you find this post helpful? Yes | No

    Default Yes!

    Ok, I have finally found somebody who can help me! I have no clue how to read the output of the ADC. I have a friend who is a compulsive buyer with too much money (thats how I got PBP) when he gets tired of something, he gives it to me. The nasty part about it is that I only got a programmer and the software, no manual! So all that I know I have taught myself. Never having used a ADC before I just took a wild shot in the dark that it would give me a definite voltage (but thinking about it now, I see that I was just wishfully thinking) are there any good guides on how to use them? I have been unable to find anything myself. And also, have I set up the analog input pin correctly for the PIC? the data sheet is kinda confusing. Thank you so much for replying!

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default The manual is free and on-line

    Goto http://www.melabs.com/support/index.htm and you can view the manual for free.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 21:58
  2. A Temperature & Humidity Data Recorder Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 9th July 2008, 19:47
  3. Student Final Project Need help
    By marco in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th March 2007, 19:12
  4. Replies: 1
    Last Post: - 26th March 2007, 03:21
  5. A category for Project Ideas
    By Pic_User in forum Forum Requests
    Replies: 2
    Last Post: - 23rd June 2006, 08: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