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.

Can someone help me find a schematic and codes about a digital thermometer...

Status
Not open for further replies.

kensquall

Newbie level 5
Joined
Nov 16, 2010
Messages
10
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,333
Can someone help me find a schematic and codes about a digital thermometer using a LM35 and 7 segment display(0 - 150.5 degree celcius)..the code must be picbasic???...plz..tnx
 

hey did you read data sheet of lm35 ? if no then read it .actually if the temperature is above 100 c you have to change sensor like ptc type (example ). you can't request for a code here this is ed aboard rule . but we can discuss on your code if you have written . thanks
you have to search just type Google and type pic thermometer
 
Last edited:

Hi,
I can provide codes with LM35 for 0 to 150'C with LM35 using mikroBASIC and either PIC/AVR. I don't use PICBASIC, but if you can use mikroBASIC, I can help with the code and circuit diagram.
 
  • Like
Reactions: khizar

    khizar

    Points: 2
    Helpful Answer Positive Rating
hello sir tahmid...can you give me the code and circuit diagram?if thats ok to you...because i tried to program using picbasic and i failed to get the correct program...wrong dispaly to my segment..tnx
 

post your code , we can correct that
 

Hi,
Here it is:
Code:
program DigThermo

'Programmer: Syed Tahmid Mahbub
'Compiler: mikroBASIC PRO for PIC v3.20
'Target PIC: 16F88 - 18pin DIP
'Configuration: XT OSC, PWRTE OFF, WDT OFF, RA5 - MCLR OFF, BOR OFF, LVP OFF, CP OFF, CPD OFF, DEBUG OFF, CKMNE OFF, INTEXTSW OFF

dim data7, num7 as byte
dim temperature as longword
dim digit as byte[3]

sub procedure send7 (dim value, seven as byte) 'Common Anode Displays (2 7segments)
    PORTA = 0
    select case value
           case 0 data7 = $C0
           case 1 data7 = $F9
           case 2 data7 = $A4
           case 3 data7 = $B0
           case 4 data7 = $99
           case 5 data7 = $92
           case 6 data7 = $82
           case 7 data7 = $F8
           case 8 data7 = $80
           case 9 data7 = $90
    end select
    PORTB = data7 'send temperature
    select case seven
           case 1 num7 = 2
           case 2 num7 = 4
           case 3 num7 = 8
    end select
    PORTA = num7 'choose which 7segment
end sub

sub procedure GlobInit
    TRISA = 1
    TRISB = 0
    PORTA = 0
    PORTB = 0
    ANSEL = 1 'AN0 analog
    CCP1CON = 0 'PWM off
    CMCON = 7 'Comparator off
end sub

sub procedure delay2ms
    delay_ms(2)
end sub

main:
     GlobInit
     while true
           temperature = (ADC_Read(0) * 500) >> 10
           digit[0] = temperature div 100
           digit[1] = (temperature div 10) mod 10
           digit[2] = temperature  mod 10
           send7(digit[0],1)
           delay2ms()
           send7(digit[1],2)
           delay2ms()
           send7(digit[2],3)
           delay2ms()
     wend
end.
Circuit:
58_1293084189.png


Provided you understand how the code works, you can easily change it to suit any PIC.

Hope this helps.
Tahmid.
 
Last edited:
thanks a lot sir...im gonna try this...
 

please i want software that sends a ADC value in mikrobasic
to other PIC 16F877A via ht-12e and ht-12d connected to RF module

i've 4 ADC and i want to send them from first PIC to pc using serial port how to do it plz
please send me urgent
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top