Easypicv7, PIC18F45K22-I/P, Temperature sensor (LM35)

General discussion on mikroElektronika website & forums.
Post Reply
Author
Message
yhteh96
Posts: 5
Joined: 06 Oct 2019 17:18

Easypicv7, PIC18F45K22-I/P, Temperature sensor (LM35)

#1 Post by yhteh96 » 06 Oct 2019 17:39

I am using the exact hardware mentioned in the subject and using MikroC Pro for PIC,
So i run the example provided by mE under this directory:
Documents\Mikroelektronika\mikroC PRO for PIC\Examples\Development Systems\EASYPIC7\LM35

But i get extreme reading on my LCD screen
43-45C

Things i have done:
*I have moved power supply jumper to USB and 5V as i am using my laptop usb
*Changed VREF value to 5
*Placed jumper25 in RE1 position

I also notice one weird thing, When i cover the development board with cardboard to shield it from ceiling light the temperature reading instantly drop by around 10C as if the development board is sensitive to light
I know it might be the heat in the light source but i tried covering just the PORT areas from light but completely exposing the LM35 to
the same light but the drop in temperature reading is exactly the same

I however have once placed the LM35 in the wrong side and later i read in the manual that "If you accidentally connect the sensor the other way, it can be permanently damaged and you need to replace it with another one."

So is it my LM35 sensor that is spoiled or could it be my development board that is spoilt.
Any tips is welcomed and appreciated!

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: Easypicv7, PIC18F45K22-I/P, Temperature sensor (LM35)

#2 Post by jovana.medakovic » 08 Oct 2019 13:44

Hello,

Can you please check if you set configuration bits correctly?
In the attachment, you can find an LM35 example. I tested it and it works fine with both VREF (3.3V and 5V).
Also, when I cover the development board with cardboard, I got the same temperature.

Please, try to run the LedBlinking example to check if your development board and MCU work well.

Kind regards,
Jovana

yhteh96
Posts: 5
Joined: 06 Oct 2019 17:18

Re: Easypicv7, PIC18F45K22-I/P, Temperature sensor (LM35)

#3 Post by yhteh96 » 08 Oct 2019 16:22

Hi,

Thank you for your reply! :)
I am very sorry i do not know what configuration bits are and where to set them. However, i tried downloading the latest mikroc pro for pic and reinstalling it so that the examples i am using is 100% untouched. Changed the VREF to 5 and loaded it but still have the same results.

When i run the LedBlinkling example, RA7 RA6 RE3 RE1 does not blink
After removing LM35 and removing jumper 25, RE1 blinks

In the past I have placed the LM35 on the other way and could that have ruined the sensor?
I am waiting for a new one to arrive..
Attachments
mcu settings.PNG
mcu settings.PNG (913.83 KiB) Viewed 2176 times

yhteh96
Posts: 5
Joined: 06 Oct 2019 17:18

Re: Easypicv7, PIC18F45K22-I/P, Temperature sensor (LM35)

#4 Post by yhteh96 » 09 Oct 2019 06:17

Hello!

Today the new LM35 sensor arrived and it worked fine! I either ruined my previous sensor or bought a wrong one.
I did not buy from mE but local shop.

Thank you for your reply!! : :D

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: Easypicv7, PIC18F45K22-I/P, Temperature sensor (LM35)

#5 Post by jovana.medakovic » 09 Oct 2019 08:48

Hi,

I'm glad that your problem is solved.

Kind regards,
Jovana

Post Reply

Return to “Website & Forums General Discussion”