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.

LM35DZ PIC16F877 Led Dot mAtrix

Status
Not open for further replies.

akem90

Junior Member level 1
Joined
Apr 14, 2010
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Malaysia
Activity points
1,374
Hi guys. I'm new to this C programming language. is it possible to display the temperature that measured by LM35DZ to LED DOT matrix display? i cant find the tutorials everywhere. Attached the LED dot matrix datasheet.
 

Attachments

  • 300347_DS.pdf
    97.5 KB · Views: 103

Of course it is. Here is a link for the datasheet, look at page 111 http://www.futurebots.com/16f877.pdf
I will give you a run down of the steps and we can go from there.
1.) Setup analog read ports for the LM35DZ before the main loop
-> ADCON1 register (Select the result format and the reference voltages)
-> ADCON0 register (Select clock speed, select channel, turn on A/D)
2.) Configure the interrupt if you want to use that
3.) Main loop
->Set the Go/Done bit
->Wait for the bit to be cleared
->Your result is in the ADRESH and ADRESL registers
->Map your LED matrix to ports and print the numbers
->Add wait delay before next acquistion
 
  • Like
Reactions: akem90

    akem90

    Points: 2
    Helpful Answer Positive Rating
I am also using a LM35 as a temperature sensor. It has the great property of linearity. Just to echo what cl10greg has said, set up the ADC IAW your data sheet then save the readings for manipulation. For me each bit of the concatinated ADRESH/ADRESL (2*8bit registers combined to make 10 bits - left or right justified) register equals 4.88mV. So if I read a temperature of 35 degress Celsius thats an LM35 output of .35V. with the resolution at 4.88mV.
.35/4.88m = 72 (approx). If you then multiply that by 49 you get 3528. You can then display the 2 msb which alleviates having to deal with float values. Giving you an output of 35. Of course you may encounter quantisation error but it can only affect your readings by 0.5 degree.

You can of course use an op-amp to amplify the readings before you ADC them, but be careful on your op-amp choice. You don't want to go near the rail voltage and ruin the linearity.
 

I am also using a LM35 as a temperature sensor. It has the great property of linearity. Just to echo what cl10greg has said, set up the ADC IAW your data sheet then save the readings for manipulation. For me each bit of the concatinated ADRESH/ADRESL (2*8bit registers combined to make 10 bits - left or right justified) register equals 4.88mV. So if I read a temperature of 35 degress Celsius thats an LM35 output of .35V. with the resolution at 4.88mV.
.35/4.88m = 72 (approx). If you then multiply that by 49 you get 3528. You can then display the 2 msb which alleviates having to deal with float values. Giving you an output of 35. Of course you may encounter quantisation error but it can only affect your readings by 0.5 degree.

You can of course use an op-amp to amplify the readings before you ADC them, but be careful on your op-amp choice. You don't want to go near the rail voltage and ruin the linearity.

thanks! i will try this.

- - - Updated - - -

Of course it is. Here is a link for the datasheet, look at page 111 http://www.futurebots.com/16f877.pdf
I will give you a run down of the steps and we can go from there.
1.) Setup analog read ports for the LM35DZ before the main loop
-> ADCON1 register (Select the result format and the reference voltages)
-> ADCON0 register (Select clock speed, select channel, turn on A/D)
2.) Configure the interrupt if you want to use that
3.) Main loop
->Set the Go/Done bit
->Wait for the bit to be cleared
->Your result is in the ADRESH and ADRESL registers
->Map your LED matrix to ports and print the numbers
->Add wait delay before next acquistion

thanks for the reference! i will try to do it. thanks!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top