Reading Temp sensor MCP9801

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
helaas
Posts: 2
Joined: 15 Nov 2019 09:44

Reading Temp sensor MCP9801

#1 Post by helaas » 17 Jan 2020 22:50

I have a problem regarding reading a MCP9801.
It works for the degrees (higher byte), but the lower byte (which is temp after decimal ) returns in all cases all '1' (255 decimal)

Has anyone expierenced this?
What could this cause this problem?
I have a PIC16f1827 microcontroller
I compiled with Mokro Basic Pro 7.6.0.

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: Reading Temp sensor MCP9801

#2 Post by stefan.filipovic » 20 Jan 2020 12:40

Hi,

Here you can find the source code of our library for the Thermo 7 click that carries the MCP9800 sensor, so you can use it as a reference.

Kind regards,
Stefan Filipović

Post Reply

Return to “mikroBasic PRO for PIC General”