• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

microcontroller thermometer

Status
Not open for further replies.

HSter

New Member
Hello everyone!:)

I would like to build a microcontroller based thermometer to measure the temperature in 3 different places. So, I came across the site on the net.

Has anyone built this project? Does it work? Does anyone have had any experience with this project?

5 channel digital thermometer reader

Thanq
 

HSter

New Member
Thanks for your reply dknguyen.

how do you know this pls? can you kindly advice me on this project?
What i meant by a different compiler is not a standard C compiler. I meant a PIC C compiler. eg. MC30 of Microchip.
Thanks
 
Last edited:

dknguyen

Well-Known Member
Most Helpful Member
"Standard C" does not apply to embedded programming very much because almost all of it is modified in some way to have syntax and definition specific to the hardware it is running on, and every compiler does it differently. Compilers all use different definition files for the hardware the code is supposed to run on and they all have different syntax features. Unless two compilers were designed to compile each other's code, there is a near 100% chance that they will not compile. It makes little difference whether two compilers are standard C or not.

High-level C++ in windows is not dependent on the hardware and has code portability in mind and it still doesn't compile well with other compilers. This is embedded C, where the code is very dependent on the hardware that is running it, and compatibility is even less of a concern.
 
Last edited:

DirtyLude

Well-Known Member
Is ds1807.c and ds1307.c part of delivered CCS or is there a more code on that page somewhere? He's including those in include statements but the source isn't posted.

Doing a search I found this code, which looks more low level:
ds1307

Usually you try to keep all low level hardware access to seperate routines, when writing code, that way porting to another chip or compiler means all you should have to do is worry about the specific hardware library calls, rather than the main logic of your program.
 

Diver300

Well-Known Member
Most Helpful Member
I don't know if this will help.

I made a boiler control circuit that measured the temperature in 3 different places, using DS18B20 temperature sensors.

In my circuit I wired all three temperature sensors in parallel. The individual ones can be resolved and the three temperatures measured separately, as each DS18B20 has a unique serial number.

The biggest problem is working out which sensor is which. In my application, all three were in one water tank, so the highest temperature had to be at the top.

If you wired the sensors to three separate pins, you don't have to resolve the serial numbers and the wiring tells you which temperature is which.

The PIC that I used was a PIC24FJ32GA002. The temperatures are displayed on an SLR2016

The code is attached.
 

Attachments

Status
Not open for further replies.

EE World Online Articles

Loading
Top