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 ....
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 04:06.
it's been said at post 59![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
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.
Check your manual about DCD, logical and bitwise operators. It's all thereI don't understand : TRISB = ((DCD i) << (ADCChannel*3)) ^255
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.
Hello Steve ,
i have some erratic values on BTN result ( BTN = TRISB ) under pic smulator ide 6.91 .
like 1 . 2 . 4 .255 and cycle infinite .
But i will try this evening on led test or resistors.
I note in 16f877x datasheet that with "1" TRISB , we have High Impedance so we can choose whose resistor to be put off .
But with other state bit of TRISB , i don't understand how tie to common +5V of car radio (TIP) to the RB0,RB1,RBx..... ???
We have agree that it is a result of a resistor between common ground (sleeve) and +5V (tip) on jack "grip" .
Hervé.
Bookmarks