PDA

View Full Version : self diagnostic problem 16F819



wilfrieds
- 7th October 2007, 22:22
Hello there

I'm working on a "yellow metal" LCD display dashboard, it took me a very very long time so far ( years ) and is finally ready for a test ride.

In order to improve on the hardware diagnostic ( broken wire warning etc ...)
I still remain with a problem that has me shaking my head.

When the microcontroller is started without a connection to the tempval = adin 1
see tempcalc: then it does not display the results from adin 2 and adin3
namely the battery voltage and the oil pressure warning light.

I would like to improve the program so it can diagnose and display all hardware problems
as much as possible

tempcalc:
tempval = Adin 1 ' Read portA.1 to tempval
If tempval > 1000 then goto tf ' faulty connection
If tempval > 415 then goto cold
if tempval > 320 then goto calc1
If tempval > 241 then goto calc2
If tempval > 157 then goto calc3
If tempval > 112 then goto calc4
If tempval < 113 then goto tf ' faulty wiring or sender - short to ground.

the program and hardware connections:

www.skidloaders.co.za/pic/LCDDv21.bas

a picture when all goes well

www.skidloaders.co.za/pic/LCDdash1.JPG

a picture when wire of temperature gauge is not connected

www.skidloaders.co.za/pic/LCDdash2.JPG


It's getting late so - to all - goodnight
Wilfried

mackrackit
- 7th October 2007, 22:45
Try something like


If tempval = 0 then go someplace else


Or do an IF THEN ELSE at the end of the tempval block.

It looks like the program is stuck waiting on "tempval".

nomad
- 7th October 2007, 22:56
after all the calc routines theres goto tempdisp but for the tf routine you have goto loop. never gets to temp display.

wilfrieds
- 8th October 2007, 10:31
Thanks guys

Acetronics2
- 8th October 2007, 12:43
Hi,


Vade Retro ... Satanas !!!

" written in proton+ 2 by Wilfried Smekens "

What does proton+ 2 really mean ???

Alain

wilfrieds
- 11th October 2007, 16:11
Bonjour Alain

Proton Plus version 2

Similar Pic Basic pro language as microcode. ??

I actually bought microcode in the belief that is was the newer version of Proton.
I still have not used it but will probably will once the 18F series become more used.

Kind regards
Very wet South Africa. ( we needed the rain real badly )
Wilfried