Has anyone had any luck with bit angle modulation.
I have read the forum post that discribes it and come up with the folowing code.

define osc 4

ANSEL = %00000000
CMCON0 = %00000111

TRISA = %00000000
PORTA = %00000000
TRISC = %00100000
PORTC = %00000000

led VAR PORTC.0
bc var byte
ch1 var byte

bc = 1
ch1 = 0

Main:

if ch1 <255 then ch1 = ch1 +1

Gosub leddrive

GOTO Main

leddrive:
for bc = 1 to 8

select case bc
case 1
led = ch1.7
pauseus 5000
case 2
led = ch1.6
pauseus 2500
case 3
led = ch1.5
pauseus 1250
case 4
led = ch1.4
pauseus 625
case 5
led = ch1.3
pauseus 312
case 6
led = ch1.2
pauseus 156
case 7
led = ch1.1
pauseus 78
case 8
led = ch1.0
pauseus 39
end select
next bc
bc = 1
return

end

This works fine for static values but when ramping up the led flickers as the level increments until after value 128. Any Ideas.

Thanks