Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Microcontroller /LM35 to sense temperature from 0 to 120degC?

Status
Not open for further replies.
T

treez

Guest
Newbie level 1
Hello,

I wish to connect an LM35 temperature sensor into the ADC of a PIC12f675.

I wish to read the temperature once per second, and if the temperature is higher than the previous reading, then store the temperature reading as an eight bit byte in EEPROM of pic12f675.

If the temperature ever goes negative then it will put a negative voltage into the pic12f675, so i will have to add a resistor in series between pic adc and LM35.

10K should be ok?

Is writing to eeprom of pic12f675 just a case of movlw b'00011111' then movwf eedata ?

Because i hear that writing to eeprom is not an easy task, is this true?

The data must still be in eeprom even if the pic power supply is removed for a day, then switched back on again.
 

Hi,

A LM35 temp sensor is a good project to get going with and you say you want to measure from 0c to 120c which is fine.

The basic setup for the LM35 as a Positive temp sensor is very straight forwards as shown in the LM35 datasheet, some connect it directly to the Pic ADC pin or use a 2k series resistor.

To measure negative temperatures becomes much more complex as you must provide the LM35 with positive and negative voltages.
This also creates problems for the Pic as it cannot accept negative voltages.

I would suggest you simply use the Lm35 in its standard Positive mode from 0c upwards.
Once you get the project fully working then possibly look at negative readings once you have more experience of the Pic.

The 12F6875 Datasheet provides the basic assembly code for reading and writing to Eeprom, if you get stuck post your code so we can see where things have gone wrong.

Have fun ...
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top