Quantcast
Viewing all articles
Browse latest Browse all 20637

BASCOM-AVR : strange biniary output : REPLY

sda/scl : you use portC pins which have an alternative function. you always need to check the function and see if the port pins behave the same. in your case : portc.4 and portc.5 are used. try swapping them with other pins, if possible portb or portd pins. you have a remarkable error. there are various way to discover the problem : instead of : Do Cls Locate 1 , 1 : Lcd "pw " ; Bin(pwm1a) Locate 2 , 1 : Lcd "pw " ; Bin(pwm1a) Locate 3 , 1 : Lcd "IC " ; Bin(icr1) Locate 4 , 1 : Lcd "IC " ; Bin(icr1) Wait 4 Loop try dim buf as string * 20 buf=bin(icr1) Do Cls Locate 1 , 1 : Lcd "pw " ; Bin(pwm1a) Locate 2 , 1 : Lcd "pw " ; Bin(pwm1a) Locate 3 , 1 : Lcd "IC " ; buf Locate 4 , 1 : Lcd "IC " ; buf Wait 4 Loop it would be real odd if that prints differts. then you can test : dim buf1 as string * 20,buf2 as string * 20 buf1=bin(icr1) buf2=bin(icr1) Do Cls Locate 1 , 1 : Lcd "pw " ; Bin(pwm1a) Locate 2 , 1 : Lcd "pw " ; Bin(pwm1a) Locate 3 , 1 : Lcd "IC " ; buf1 Locate 4 , 1 : Lcd "IC " ; buf2 Wait 4 Loop

Viewing all articles
Browse latest Browse all 20637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>