پاسخ : مشکل با ال سی دی و Avr
به فیزبیتها ربط نداره؟portC رو استفاده کردی ولی نگفتی از چه AVRی استفاده می کنی!
به فیزبیتها ربط نداره؟portC رو استفاده کردی ولی نگفتی از چه AVRی استفاده می کنی!
$regfile = "M8def.dat" $crystal = 1000000 Config Portc = Input Config Portb = Output Config Adc = Single , Prescaler = Auto , Reference = Avcc Config Lcd = 16 * 2 Config Lcdbus = 4 Config Lcdpin = Pin , Rs = Portb.2 , E = Portb.3 , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 Dim Result As Word Dim Volt As Single Deflcdchar 0 , 3 , 3 , 32 , 14 , 16 , 16 , 16 , 14 Cursor Off Cls Start Adc Do Result = Getadc(0) Volt = Result * 4.88 Volt = Volt / 10 Locate 1 , 1 Cls Lcd " temp=" ; Volt ; Chr(0) Waitms 500 Loop Stop Adc End
دیدگاه