PDA

View Full Version : Decimal / Hex


ddlawrence
12-03-08, 11:30 AM
Hi. Things are going well. I've decided to work entirely in HEX
rather than switching back & forth. I can't figure out why the
PWM commands on TA0 no longer function the same in HEX.
I am sure it is my problem. Is there a DECIMAL - HEX explanation in the
documentation somewhere?

thanks....don

RMDumse
12-03-08, 03:13 PM
Remember PWM commands usually come in sets of two.

So if you had a DECIMAL version with

32767 PWM-PERIOD
1500 PWM-OUT

You'd want a HEX one to look

7FFF PWM-PERIOD
5DC PWM-OUT

And don't forget, you can do these outside a definition in a download, but if you're making a stand alone version, you'll want these actions inside a definition as well, so they get run at startup, and not just set at download to be lost when you have the program in flash.