LSB of Word Variable - how do you move into byte variable?
Mr Diesel Dude
Posts: 13
In the PWM command, the duty_cycle parameter must be a byte. I am feeding this from a word variable; in essence, I am trying to force a word variable into the space of a byte variable. It does not work. I think I need to truncate the word variable·to the LSB, and then move it into the byte variable...? Is this correct? If so, can anybody tell me how to do it?
Comments
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
·
Thanks