You are on page 1of 1

Conversin

a/d

1
Set_adc_channel(0);

Retardo_2us

Valor_leido=read_a
dc();
Cor =valor_leido-128;
cor=cor/14
SI
set_adc_channel(1);
delay_us(20);
valor_leido1=read_adc
(); vol=valor_leido1;
vol=vol/50;

N valor_leido>=128
1

N
1

vol>1

SI
vol=vol0.02
SI

vol>2

vol=vol0.02
vol>3

S
vol=vol0.02
vol>4

N
1

vol>5

vol=vol0.02
pot=vol*c
2

vol=vol0.02
S

You might also like