16F876A Pulsin issues


Results 1 to 16 of 16

Threaded View

  1. #10
    Join Date
    Mar 2010
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    I have an idiot grin on my face, :-) im making some really good progress, I have the pulse in now displaying on the screen (strange from a JR Rx Im getting a range from 560 - 990 from the pulsin) and have the ability to jump to a servo test (sweep from side to side) at the push of a button, :-)

    My ADC is sort of working, with the voltage divider I'm getting 2.54V on my DMM, however if I display the ADC input Im only seeing 2 and not the .54 (obviously this will be multiplied by 2 once i get the decimals). I have tried:

    Code:
    lcdout $FE, $C0+8, dec volt
    
    and 
    
    lcdout $FE, $C0+8, # volt

    but still only get the first digit. Is this due to the ADC VAR being a "WORD"

    Code:
    Volt    Var     WORD
    .
    .
    .
    ADCIN 4, volt
    .
    .
    .
    My Vref from the regulator is 5.00V on my DMM

    Not sure im getting this whole ADC concept, I;ve read another one of Melanie's posts and from what I can work out, my RAW ADC in variable should be as follows:

    if my Vref = 5.00 then if my ADCIN was exactly 5.00V the ADC result would give me 1024, however I am giving a ADC of 2.54 I should get a value in the variable of 520? however I am displaying a single digit "2" on the LCD with the code above, not sure how to do the math on this.
    Last edited by Bobbo_ZA; - 30th March 2010 at 20:56.

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