Page 2 of 2

Re: LM34 Temp sensor

Posted: Sun Jan 19, 2014 1:39 am
by medelec35
Hi Bill.
Issue with flowchart is you have left the osc speed set to 19.66MHz, yet internal osc will only run at:
Internal osc frequencies.png
(54.29 KiB) Downloaded 2049 times
So there is a mismatch.
This means that your microcontroller is running very slow, so delay will take much longer than the 200ms value
I'm surprised that LCD was working at all!

The Clockout is an output function and only produces a waveform of clock/4
so if clock is set at 8MHz then at clockout pin you should see 8MHz/4 = 2MHz

The flowchart I posted in the above post should work on the fastest speed (8MHz).
How I derived osccon (placed at the very top of Main macro) value of:

Code: Select all

osccon=0x70;
See :
http://www.matrixmultimedia.com/mmforum ... 29&#p28829
Although its for a different target device, the principle will still be the same.

Martin

Re: LM34 Temp sensor

Posted: Sun Jan 19, 2014 9:57 pm
by Bill Felker
medelec it works fine now ,thanks for the lesson on the clock. :lol: Bill

Re: LM34 Temp sensor

Posted: Sun Jan 19, 2014 10:02 pm
by medelec35
Your welcome Bill.
Glad its working for you.
Thanks for letting us know.

Martin