Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Trying to create a Digital Thermometer

Status
Not open for further replies.

jhunt315

Junior Member level 1
Joined
Dec 2, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,408
I am trying to build a Digital Thermometer using a LM34 temperature sensor, PIC16F917, couple resistors, seven segment display and a couple transistors that act as switches for the seven segment display. I am using the program MPLAB IDE so i need a C code to make my thermometer work. I am just wondering if anyone has a C code to make a digital thermometer in my case where it will display the degrees on my seven segment display.
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,187
Helped
1,141
Reputation
2,301
Reaction score
1,116
Trophy points
1,403
Location
Brazil
Activity points
53,385
If the application of uC is not a constraint, you can use the 7106 or 7107 IC.
These A/D provides direct driving control do display with no need to program any code.
The only work required to you is connect the sensor to input ( oviously regarding proper voltage range scaling ).

+++
 

jhunt315

Junior Member level 1
Joined
Dec 2, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,408
I wish i could, but i have to use C Code for this project.
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,273
Trophy points
1,413
Location
Southwest, USA
Activity points
62,490

jhunt315

Junior Member level 1
Joined
Dec 2, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,408
Is there a difference in the code for using PIC16F instead of a PIC18F as they use in these examples?
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,348
Reputation
4,690
Reaction score
2,273
Trophy points
1,413
Location
Southwest, USA
Activity points
62,490
The top example use a PIC16F688. However, the difference between C code for 16F and 18F is mainly SFR and Config settings.

Use the top example as a template and build upon it with the other two.
 

jhunt315

Junior Member level 1
Joined
Dec 2, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,408
ok, you don't by any chance have actual C Code for my problem do you?
 

klystron

Advanced Member level 4
Joined
Jul 11, 2002
Messages
1,014
Helped
192
Reputation
384
Reaction score
180
Trophy points
1,343
Location
South Africa
Activity points
4,515
You need to write code for the the following functions :
Read the analogue LM34 voltage (A2D)
Convert the reading to temperature
Convert the temperature value to BCD ( 2 digits)
Convert the BCD to 7 segment code
Refresh the 7 segment displays
Re do the loop
Your school require you to write the code to demonstrate that you have the necessary skills to past your course
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top