I'm using as single bit, not array. And changing only upper 4 bit.
For this PBP will generate 4 asm instruction per PBP line, and execute 2 or 3 of them.
In worst case scenario 12 asm instruction are executed.
Compared to any PBP math function size, and speed are better in this case.
Maybe using logic you can get same result. You can try it if you want.
Let me explain little more...
Control=2
LATB.4=Control.0
LATB.5=Control.1
LATB.6=Control.2
LATB.7=Control.3
Bit 4 of LAT register is set to 0, bit 5 of LAT register is set to 1, bits 6,7 of LAT register is set to 0.
Bits 0,1,2,3, are unaffected.
PS
Array would be Control[i]...
Bookmarks