program voltmetre
Dim ch as char
Dim volt as word
Dim a as char[10]
main:
adcon1=$80
Trisb=0
Trisa=255
lcd_init(portb)
lcd_cmd(lcd_cursor_off)
a="Gerilim="
lcd_out(2,1,a)
do
volt=adc_read(2)
volt=volt*5
ch=(volt div 1000) mod 10
lcd_chr(2,9,48+ch)
lcd_chr(2,10,".")
ch=(volt div 100)mod 10
lcd_chr(2,11,48+ch)
ch=(volt div 10) mod 10
lcd_chr(2,12,48+ch)
loop until false
end.
Eğer farkettiyseniz ADCON komutu ile mikrodenetleyicimizin analog-dijital dönüştürücüsü aktif hale getirilmiştir.Çünkü A portuna gerilim değerleri analog olarak gelmekte ve lcd ekranda dijital olarak gösterilmektedir.Program ve devre sağlamdır,herkese başarılar.
The casino floor is packed, but not too crowded,
YanıtlaSilThe poker 오산 출장샵 room is crowded, and even when not the biggest poker room 김해 출장샵 in town is there There 청주 출장샵 are also slot machines, 평택 출장마사지 roulette, 시흥 출장샵 poker and more.