Or run it on a lenth of wire to just behind (if space?) the little grill bit in the dash, to the left of the "glory hole", to the right of the top of the glove box..?Driver+Passengers wrote:I've now permanently disabled SW1/2 on Bob's unit by removing resistors R23, R27 and R28, and fudged the ADC return value for AN11 (pin 12) to 0x3:0xFF (to simulate pull-up to 5V with both switches 1 and 2 open).Driver+Passengers wrote:...I'm going to disconnect switches 1 and 2 to use the pin as an output to driver the buzzer, and hard code it in software to always display degC.
Fine so far. Next, I want to run the output from the PIC through a resistor to an NPN transistor, emitter to ground, collector via buzzer to 12V - for the volume. Though there is (just) enough space in the back of the unit to fit the mini-buzzer I've got, I may drill a hole in the back cover and have it poking out a mil' or two, just to get maximum sound pressure out of the unit.
Deconstructing the Sure Temperature Sensor
Moderators: Doone, westonwarrior
Re: Deconstructing the Sure Temperature Sensor
Cheaper by comparison to a race horse...


- Driver+Passengers
- Supreme Being
- Posts: 2019
- Joined: Mon Mar 14, 2011 1:56 pm
- Location: Fife
Re: Deconstructing the Sure Temperature Sensor
jaylee wrote:Rhino-wayne found & posted it up on the "other thread"... http://www.sure-electronics.net/downloa ... 1.0_EN.pdfDriver+Passengers wrote:Instructions?!?Would you be able to forward me a copy of that, for reference... not because I need it...

Ta, that helps.
Re: Deconstructing the Sure Temperature Sensor
I am by no means an electronics expert... But just to point out a a possible potential prob with yer mod, regarding the dip switch...?? (I may be/hope i'm wrong would hate to see a possible oversight on a great project?) Have a look at section 4.2 & 4.2.2?Driver+Passengers wrote:jaylee wrote:Rhino-wayne found & posted it up on the "other thread"... http://www.sure-electronics.net/downloa ... 1.0_EN.pdfDriver+Passengers wrote:Instructions?!?Would you be able to forward me a copy of that, for reference... not because I need it...
Ta, that helps.


Cheaper by comparison to a race horse...


- Driver+Passengers
- Supreme Being
- Posts: 2019
- Joined: Mon Mar 14, 2011 1:56 pm
- Location: Fife
Re: Deconstructing the Sure Temperature Sensor
I think I'm ok - I'm leaving K3 and K4 intact. Sacrificing the ability to display in degF, only K1 and K2 have been disconnected. Unless I've missed something subtle in those sections...jaylee wrote:I am by no means an electronics expert... But just to point out a potential prob with yer mod...?? (I may be/hope i'm wrong?) Have a look at section 4.2 & 4.2.2?![]()
Re: Deconstructing the Sure Temperature Sensor
Yep, i reckon its cool... Providing that K4 isn't set to change from C to F with the ambient brightness thing..? Sorry, i reckon i was fussin over nuffin!Driver+Passengers wrote:I think I'm ok - I'm leaving K3 and K4 intact. Sacrificing the ability to display in degF, only K1 and K2 have been disconnected. Unless I've missed something subtle in those sections...jaylee wrote:I am by no means an electronics expert... But just to point out a potential prob with yer mod...?? (I may be/hope i'm wrong?) Have a look at section 4.2 & 4.2.2?![]()


Cheaper by comparison to a race horse...


- Driver+Passengers
- Supreme Being
- Posts: 2019
- Joined: Mon Mar 14, 2011 1:56 pm
- Location: Fife
Re: Deconstructing the Sure Temperature Sensor


I'm aware that my soldering leaves a lot to be desired. Gnd from gnd pad of the missing R20, nearly 12V from 'safe' side of F1, and signal from the appropriate pins on the PIC side of SW.
Code-wise, had to change the values written to TRISB and ANSELH.
Re: Deconstructing the Sure Temperature Sensor
Some great work on this, and to avoid contaminating this thread in the way jaylee's was, I'll start a new one for my add on.
Regarding a calibration mod, have you decrypted the algorithm used to change voltage (I assume) into temp?
Regarding a calibration mod, have you decrypted the algorithm used to change voltage (I assume) into temp?
- Driver+Passengers
- Supreme Being
- Posts: 2019
- Joined: Mon Mar 14, 2011 1:56 pm
- Location: Fife
Re: Deconstructing the Sure Temperature Sensor
Not yet. I'm working backwards from the digits on the display to see if I can find a register (or pair) containing the numeric temperature. There's a lookup table, and the first entry looks a bit like "-25", and presumably it interpolates as the lookup table only has so many values in it.tallbongo wrote:Regarding a calibration mod, have you decrypted the algorithm used to change voltage (I assume) into temp?
The PIC is configured to use the 8MHz internal oscillator and there is an OSCTUNE register. I don't know if this affects ADC.
Looking into it, though...
Re: Deconstructing the Sure Temperature Sensor
Only if you reduce the Tad time to less than 1.5uS but you can always then divide the clock down by between 2 & 64 to increase it again, there is a longer "limit" 3uS in that they haven't characterised the chips longer than that.Driver+Passengers wrote:The PIC is configured to use the 8MHz internal oscillator and there is an OSCTUNE register. I don't know if this affects ADC.
One thing to watch out on the 16F6xx chips is that earlier versions had some bugs, that are documented in the errata sheets, not sure all have been squashed either!
Geoff
2001 Aero V6, AFT, full side conversion.
2001 Aero V6, AFT, full side conversion.
Re: Deconstructing the Sure Temperature Sensor
Driver+Passengers wrote:Not yet. I'm working backwards from the digits on the display to see if I can find a register (or pair) containing the numeric temperature. There's a lookup table, and the first entry looks a bit like "-25", and presumably it interpolates as the lookup table only has so many values in it.tallbongo wrote:Regarding a calibration mod, have you decrypted the algorithm used to change voltage (I assume) into temp?
That's a shame as it means the B value is unlikely to be buried in the code. However, if you ever decode the complete lookup table we should be able to calculate it (allowing the use of replacement thermistors without altering the code).
Re: Deconstructing the Sure Temperature Sensor
The conversion will almost certainly be done using a look up table, the 16F only supports very basic maths. Unfortunately the look up tables are somewhat obfuscated by each entry being prefaced by the retlw instruction, otherwise they could be run through a simple 2D graphical analyser.
The 3uS on the ADC isn't significant because you're only charging a small cap on the input to the ADC itself, the minimum time is more important because you have to allow time for the cap to charge. The response time of the temperature sensors will be in the order of ms anyway.
The 3uS on the ADC isn't significant because you're only charging a small cap on the input to the ADC itself, the minimum time is more important because you have to allow time for the cap to charge. The response time of the temperature sensors will be in the order of ms anyway.
1995 Ford Freda, 2.5TD, auto, AFT, side conversion.
- Driver+Passengers
- Supreme Being
- Posts: 2019
- Joined: Mon Mar 14, 2011 1:56 pm
- Location: Fife
Re: Deconstructing the Sure Temperature Sensor
Assuming they are all 16bit values, I get 149 values. Not convinced this is an ADC->deg lookup table?


Re: Deconstructing the Sure Temperature Sensor
Can you use a variable resistor to determine the input voltages across the specified temperature range? that will tell you the number of table entries that you're likely to be looking for.
Do you have a debugger? I'm pretty busy for the next few days but towards the end of the week I will try and get the ICD2 hooked up, then I can use breakpoints to see what addresses are being hit. Have you posted the latest disassembly anywhere?
Do you have a debugger? I'm pretty busy for the next few days but towards the end of the week I will try and get the ICD2 hooked up, then I can use breakpoints to see what addresses are being hit. Have you posted the latest disassembly anywhere?
1995 Ford Freda, 2.5TD, auto, AFT, side conversion.
Re: Deconstructing the Sure Temperature Sensor
Is this what you mean?

Drover&Passengers - the data you posted could be the ADC lookup table, but not if the values 1 to 149 are linearly spaced.

Drover&Passengers - the data you posted could be the ADC lookup table, but not if the values 1 to 149 are linearly spaced.
- Driver+Passengers
- Supreme Being
- Posts: 2019
- Joined: Mon Mar 14, 2011 1:56 pm
- Location: Fife
Re: Deconstructing the Sure Temperature Sensor
I've been using PIC Simulator IDE. It's a little slow when running, but does the trick.
It reckons the voltage range on the ADC pins (beyond which I get "OL") is 0.27V-4.48V. The sensing circuit is a voltage divider consisting of thermistor to GND, 10K to 5V.
I'll have another poke at the code... (Rhinoman - email sent)
It reckons the voltage range on the ADC pins (beyond which I get "OL") is 0.27V-4.48V. The sensing circuit is a voltage divider consisting of thermistor to GND, 10K to 5V.
I'll have another poke at the code... (Rhinoman - email sent)