Quote Originally Posted by skimask View Post
Guess what? Free help! Deal with it.

Code:
'dcd channel selection
low g_dcd

for i=0 to 15
	portb = (portb & %00011111 ) | ( ( i rev  3 ) << 5 )
	portc = (portc & %10111111 ) | ( i << 3 )
next i
OR don't ADD
to get rid of the i lower bits for portC ...

i would have used

Code:
portc = (portc & %10111111 ) | ( i.3 << 6 )
but, it's me ...

Alain