Check this thread, seems you want to do something really alike
http://www.picbasic.co.uk/forum/showthread.php?t=15229&
Check this thread, seems you want to do something really alike
http://www.picbasic.co.uk/forum/showthread.php?t=15229&
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
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) .
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 01:32.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
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.
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.
![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
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.
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!
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.
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
Best regards
Hervé
Last edited by mazoul72; - 28th August 2011 at 22:20.
i don't know why 3.96 V and not 1.4 V ....
3902 is actually 39K, so the other resistor are also bad... ok then. So be it.
modify what's in red
should workCode:' ' 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
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 23:17.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks