A
aduri
Guest
Ciao,
Questo codice (mikroBASIC) converte un valore analogico in un binario per un controllo della frequenza radio.Questo è il codice:
Codice:
cod_fine:
byteAdcbin1 = Dec2Bcd16 (ValoreAdc1) 'decimale conversione da uno binario
if (ValoreAdc1 = 0) allora PortB = 255 'portato o Contraves sui pin 32-40
altro
if (ValoreAdc1 <100) then PortB = non byteAdcbin1
end if
end ifif (ValoreAdc1> 99) allora ValoreAdc1 = 99 '
end if
if (ValoreAdc1 <10) allora LCD_out (1,11, "0") '
end if
bytetostr (ValoreAdc1, txt1)
LCD_out (1,10, txt1)
Questo codice (mikroBASIC) converte un valore analogico in un binario per un controllo della frequenza radio.Questo è il codice:
Codice:
cod_fine:
byteAdcbin1 = Dec2Bcd16 (ValoreAdc1) 'decimale conversione da uno binario
if (ValoreAdc1 = 0) allora PortB = 255 'portato o Contraves sui pin 32-40
altro
if (ValoreAdc1 <100) then PortB = non byteAdcbin1
end if
end ifif (ValoreAdc1> 99) allora ValoreAdc1 = 99 '
end if
if (ValoreAdc1 <10) allora LCD_out (1,11, "0") '
end if
bytetostr (ValoreAdc1, txt1)
LCD_out (1,10, txt1)