J
jccsantos
Guest
Ciao, ho questo codice.
Codice:
void main ()
(Float di temperatura;
setup_adc_ports (NO_ANALOGS);
setup_adc (ADC_OFF);
setup_psp (PSP_DISABLED);
setup_timer_0 (RTCC_INTERNAL | RTCC_DIV_1);
setup_timer_1 (T1_DISABLED);
setup_timer_2 (T2_DISABLED, 0,1);
setup_comparator (NC_NC_NC_NC);
setup_vref (FALSE);
printf ( "inicio. \ r \ n");
init_max ();
delay_ms (100);
Set_device ();
Power_mode (true);
Decode_mode (0x0F);
Scan_Limit (0x03);
Set_intensity (0x3f);
Input_Config (0x4F);
test (true);
delay_ms (1000);
test (false);
Print_display (0,0,0,0);while (1) (
ds1820_read temperatura = ();
printf ( "TEMP:% 3.2f \ r \ n", temperatura);
/ / delay_ms (2000);
))
Codice:
void main ()
(Float di temperatura;
setup_adc_ports (NO_ANALOGS);
setup_adc (ADC_OFF);
setup_psp (PSP_DISABLED);
setup_timer_0 (RTCC_INTERNAL | RTCC_DIV_1);
setup_timer_1 (T1_DISABLED);
setup_timer_2 (T2_DISABLED, 0,1);
setup_comparator (NC_NC_NC_NC);
setup_vref (FALSE);
printf ( "inicio. \ r \ n");
init_max ();
delay_ms (100);
Set_device ();
Power_mode (true);
Decode_mode (0x0F);
Scan_Limit (0x03);
Set_intensity (0x3f);
Input_Config (0x4F);
test (true);
delay_ms (1000);
test (false);
Print_display (0,0,0,0);while (1) (
ds1820_read temperatura = ();
printf ( "TEMP:% 3.2f \ r \ n", temperatura);
/ / delay_ms (2000);
))