Temperature Meter Telecommunication Technologies Good day today I bring a temperature meter using PIC 16F876
This is a very basic circuit putting the NTC (sensor) directly to a microcontroller input ...
is only for laboratory and to save the note.
The higher the temperature the lower the resistance at the NTC. PTC sensors are also what would be reversed at temperatures greater resistance.
If you want to see the code in C click to read more ->
# include "16f876.h" # device adc = 10 # fuses XT , # use NOWDT delay (clock = 4000000) # include / / Needed for mathematical calculations # include void main () {float tv, tr, temp, y; / / Variables equation int16 value; lcd_init(); setup_port_a( ALL_ANALOG ); setup_adc( ADC_CLOCK_INTERNAL ); set_adc_channel( 0 ); delay_us(10); do { value = Read_ADC(); tv = 5.0 * value / 1024.0; tr = tv * 10000.0 / (5.0 - tv); y = log (tr/20000.0) y = (1.0/298.15) + (y * (1.0/4050.0)); ; temp = 1.0 / y; temp temp = -273.15; printf (lcd_putc, "\\ nT =% 04.2fC", temp) ; } while (TRUE);} |
hope you bail out.
0 comments:
Post a Comment