0% found this document useful (0 votes)
8 views1 page

Program Sentempv

Uploaded by

veralopez92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Program Sentempv

Uploaded by

veralopez92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

program SENTEMPV

dim lcd_rs as sbit at rb0_bit


lcd_en as sbit at rb1_bit
lcd_d4 as sbit at rb2_bit
lcd_d5 as sbit at rb3_bit
lcd_d6 as sbit at rb4_bit
lcd_d7 as sbit at rb5_bit

lcd_rs_direction as sbit at trisb0_bit


lcd_en_direction as sbit at trisb1_bit
lcd_d4_direction as sbit at trisb2_bit
lcd_d5_direction as sbit at trisb3_bit
lcd_d6_direction as sbit at trisb4_bit
lcd_d7_direction as sbit at trisb5_bit

sub procedure move_delay()


delay_ms(250)
end sub

dim tempC,tempF, valor, x as float


dim conversion,conversion1 as string [10]
main:
trisa= 1
portb=0
trisc=1
adcon1= %00001110
inicio:
lcd_init()
lcd_cmd(_lcd_clear)
lcd_cmd(_lcd_cursor_off)
lcd_out(1,4," TEMPERATURA")
Dos:
valor=adc_read(0)
x = (5/1023)* valor
tempC= (1000*x)/ 10
delay_ms (100)
floattostr(tempC,conversion)
lcd_out(2,4,conversion)
lcd_out_cp("C")
tempF = (tempC * 1.8) + 32
floattostr(tempF,conversion1)
lcd_out(3,4,conversion1)
lcd_out_cp(" F")
goto Dos
end.

You might also like