Stable ADC readings


Closed Thread
Results 1 to 40 of 91

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    10k for pull up external.
    i have only two wires to tie at right and two wires to tie ar left of steering wheel.
    So 12 buttons in fact .
    If i tie like the thread you provided , so many wires and this is the first part of entire PIC system .
    i am not sure there are enough wires after this.
    I have 25 inputs/outpouts tie to PIC .(without components reserved operation )
    Perhaps the eight outpouts/input reserved to LCD (for test before FIS tachometer connected) .

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


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    The link I provided was about the OUTPUT not the input. It show how to connect your resistor and how to code it.

    your whole system to the car should be more than 6 wire... but 3 of them should already be GND or +5v/+12V.

    Plug the steering wires, push on each button, for each button you have a diffferent ADC reading.

    OR use a multimeter and measure the resistor value when you push on a single button.... also when you don't push on any button. From there we can also work out a solution.

    Also, we still have NO information about your radio, no brand, no model no nothing. At least do you know the resistor value needed for each function?
    Last edited by mister_e; - 26th August 2011 at 00:32.
    Steve

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

  3. #3
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Yes i tried last month , i have the value.
    I have already put schematic.
    my radio is pioneer 6900IP , only a jack remote input.

    My intension is to keep the wires buttons .
    With more wires , i have to change all connections.

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


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    I know the input... how about the output?

    BTW, as per the service manual, this radio seems to use a stereo Jack... maybe you need a resistor on the tip, another on the ring? Whatever, the method on the previous link will work for the OUTPUT section.

    Name:  Part1.jpg
Views: 1968
Size:  85.7 KB

    Name:  Part2.jpg
Views: 1917
Size:  118.1 KB
    Steve

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

  5. #5
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    I try assembler but i have some errorsName:  assembleur bmf.jpg
Views: 1874
Size:  145.5 KB

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


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Assembler, C, Fortran or Pascal will not solve the problem here. The problem is not the ADC reading, it is what you do with.
    Steve

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

  7. #7
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    the soft ? picbasic pro ?????
    i have the same error with mplab
    thanks to be explicit .
    it is an example from a guy - it works for him !
    it is not easy to spend all days to arrive ( only ADC) to nothing !

    Herve

  8. #8
    Join Date
    Nov 2011
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Hello Mazoul72
    I think that you will be the one who can help me in this particulary issue. With all the respect for the experts of this great forum, but most of the users use so tecnical language that i don't understand. My formation is in philosophy...
    Behind my radio i have the k line, althrought my car is not can bus. As far as i understand the communications protocol is 3LB.
    Some months ago i've bought all the wiring for the multifunction steering wheel of the golf4, the relay 452 and the buttons (left and right). But i'm trying to make more buttons enable, because on the Golf4 MFSW there are only 4 buttons for control the radio and 3 buttons for cruise control. At least i would like to have six buttons to radio (volume up and volume down, next and previous track, next and previous source).
    I'm very frustrated because it all remain the same and i have a gorgeous multifunction steering wheel without functions...
    Perhaps you are kindness and maybe you could make one interface for me. If you want so, i can send you the money for the materias. I don't mind to take a change and i feel that i can trust you.

    Regards
    Karlos

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


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Post #44
    Quote Originally Posted by mazoul72 View Post
    10k for pull up external.
    I guess it's an omission on it's schematic. At least I hope
    Steve

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

  10. #10
    Join Date
    Aug 2011
    Location
    Guadalajara, México
    Posts
    28


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    That's right Master mister_e, he mention the 10k pull-up before, but I want to be sure he is assembling his circuit properly (just to have peace of mind)

    By the way Master, I'm new to this forum as well to picbasic and since I first read your posts you became my "Personal Jesus"
    Regards!

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


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Don't do that, Depeche Mode have some Copyright on that quote

    Welcome aboard!
    Steve

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

  12. #12
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Hello,
    First many thanks to your answers .

    OK, please answer the following question:

    Q1: The Resistor attached to the button are built-in the remote/Steering and you can't modify anything in right?

    A1:_Yes , it is too little inside because it is cms components .

    Q2: You have a 10K pull-up On RA0, and another on RA1... true?

    A2: Yes , it is an omission but it is 10Komhs for test ( 3.96 Volts with no action)

    Q3: If so, assuming you don't push on any button, Between GND and RA0 AND between GND and RA1 with your multimeter you should read something like 1.4Volt RIGHT?

    A3: No , i read 3.96 Volts on 10K resistors and RA0,RA1.

    So , (3902/(3902+10000))*5 = 1.403 .
    i will verify if there is another resistors but i see 3902 ohms (i am sure) , perhaps an error . I will tell you about.

    I don't understand : TRISB = ((DCD i) << (ADCChannel*3)) ^255

    Name:  bmf.JPG
Views: 1787
Size:  40.9 KB

    Best regards
    Hervé
    Last edited by mazoul72; - 28th August 2011 at 21:20.

  13. #13
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Name:  IMG_6708.jpg
Views: 1697
Size:  131.8 KB

    i don't know why 3.96 V and not 1.4 V ....

  14. #14
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Look again at the photo of the circuit board. That resistor near the top right is 39K ohms, NOT 3902 ohms!
    Remember, the last digit is a MULTIPLIER. It tells how many zeros to add after the other digits.
    Last edited by Byte_Butcher; - 16th September 2011 at 03:06.

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


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    3902 is actually 39K, so the other resistor are also bad... ok then. So be it.

    modify what's in red
    Code:
    '
    '       Software Variable
    '       =================
            ADRes       VAR WORD    ' ADC Reading
            BTN         var byte    ' Data to be sent to PORTB
            i           VAR BYTE    '
            ADCChannel  VAR BIT     '
            ADCButton   VAR WORD [3]'
    '
    '       Software constant
    '       =================
            ADCSafety   CON 10              ' min/max range for ADC Reading
                                            '
            ADCNone     CON 814 - ADCSafety ' 
            ADCButton[0]  = 90              ' button 1 or 4 
            ADCButton[1]  = 164             ' button 2 or 5 
            ADCButton[2]  = 270             ' button 3 or 6
    should work

    This is Why I asked to measure with your ohmmeter a couple of post back... and nope I'm not going to decipher a PCB

    You have everything on hand....
    Last edited by mister_e; - 28th August 2011 at 22:17.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    I don't understand : TRISB = ((DCD i) << (ADCChannel*3)) ^255
    Check your manual about DCD, logical and bitwise operators. It's all there

    Anyone wants to explain it?

    Yes I've put some black magic in
    Steve

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

Members who have read this thread : 2

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