loufoque
Junior Member level 1
shift_right ccs
Hi
Can you help me with the following function.
Void Rx_Temp_16Bits()
{
for (i=0;i<16;++i)
{
set_tris_a (0);
output_low(PIN_A0);
delay_cycles(3);
set_tris_a (1); // 4k7 pullup to PIN_A0
delay_cycles(10); // 10 us moin les 2 us de la lecture
b = input(PIN_A0); // 2 us
shift_right(&Temp_16Bits,2,b);
delay_cycles(60);
output_high(PIN_A0);
set_tris_a (0);
}
}
When i try to run it on my 16f628, Temp_16Bits is always = 0 ?
Thanks in advance for your collaboration.
Loufoque
Hi
Can you help me with the following function.
Void Rx_Temp_16Bits()
{
for (i=0;i<16;++i)
{
set_tris_a (0);
output_low(PIN_A0);
delay_cycles(3);
set_tris_a (1); // 4k7 pullup to PIN_A0
delay_cycles(10); // 10 us moin les 2 us de la lecture
b = input(PIN_A0); // 2 us
shift_right(&Temp_16Bits,2,b);
delay_cycles(60);
output_high(PIN_A0);
set_tris_a (0);
}
}
When i try to run it on my 16f628, Temp_16Bits is always = 0 ?
Thanks in advance for your collaboration.
Loufoque