Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20636

BASCOM-AVR : strange biniary output : REPLY

$
0
0
[quote:6e4298e463="albertsm"]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.[/quote:6e4298e463] Mark, without changing any pin/port definition or hw-wireing the decimal formatted output is correct while hex and bin failes. [quote:6e4298e463="albertsm"]you have a remarkable error. [/quote:6e4298e463] How do I have to understand this? [b:6e4298e463]Do I make[/b:6e4298e463] the remarkable error? [quote:6e4298e463="albertsm"]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[/quote:6e4298e463] I allways try to keep my code as simple as possible. Your suggestion seems to be a workaround however - if one can make it simple one will do it simple - not knowing the consequences and beeing in the dark [quote:6e4298e463="albertsm"] then you can test :[/quote:6e4298e463] ok Mark there are plenty way of doing it however I sought I did it a short and white-bread way as many of us would do it

Viewing all articles
Browse latest Browse all 20636

Trending Articles



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