Have a look here
http://www.picbasic.co.uk/forum/showthread.php?t=3072
Have a look here
http://www.picbasic.co.uk/forum/showthread.php?t=3072
If you pause this in the right places it shows how to turn HPWM on & off with inline asm compiled with the PBP code,
but you don’t even have to do that since PBP can write values to the chip registers itself with it’s own variables.
You do it when you, for example, set CMCON = 7 to turn 16F628 analogue ports digital.
.
Have no access to PBP right now, so construction like this:
FOR A=1 TO 200
CMCON1=A
NEXT
will work?
Yes, it will "work" in the sense of assigning the values 1 thru 200 to CMCON1, one after the other.
If that's actually what you want is another matter.
And back to the topic of HPWM. It's easy enough to control the CCP module directly without using the HPWM command, plenty of examples on that floating around here. And, as have been pointed out, any variable you declare in your PBP program can be accessed from assembly by preceding it with an underscore - subject to bank switching etc.
/Henrik.
Bookmarks