26.07.2014 Views

proposta de utilização do sistema operacional windows ce ... - UTFPR

proposta de utilização do sistema operacional windows ce ... - UTFPR

proposta de utilização do sistema operacional windows ce ... - UTFPR

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

APÊNDICE 2<br />

PROGRAMA IMPLEMENTADO NO MICROCONTROLADOR PIC<br />

#inclu<strong>de</strong> <br />

// Configura o compila<strong>do</strong>r para conversor A/D <strong>de</strong> 10 bits<br />

#<strong>de</strong>vi<strong>ce</strong> adc=10<br />

#use <strong>de</strong>lay(clock=4000000)<br />

#fuses XT,NOWDT,PUT,NOBROWNOUT,NOLVP<br />

#inclu<strong>de</strong> <br />

#inclu<strong>de</strong> <br />

#inclu<strong>de</strong><br />

long int newCo=0;<br />

//Converte <strong>de</strong> char para int<br />

int Conv_char_int(char temp)<br />

{<br />

if(temp=='0')<br />

return(0);<br />

if(temp=='1')<br />

return(1);<br />

if(temp=='2')<br />

return(2);<br />

if(temp=='3')<br />

return(3);<br />

if(temp=='4')<br />

return(4);<br />

if(temp=='5')<br />

return(5);<br />

if(temp=='6')<br />

return(6);<br />

if(temp=='7')<br />

return(7);<br />

127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!