Latest update, LEDs have arrived.
I thought I'd enhance things a bit, using Hippy's code (above) as the main 4-channel PWM. I I wrote some very particular PWMOUT commands for one of the pins, to create a nice flickering "boot-up" series of flashes and fades. This is on pin C.5 of the 20X2, which is the typical pwm pin. It works fine. This is at 8MHz.
I thought I'd add this piece of code just before Hippy's code, where it sthen witches to 32MHz. The idea was then it would just carry into the fading in and out for the four sets of LEDs, looping happily.
Hippy's original code assigned the LEDs to pins c.0, c.1, c.2, c.3. I changed the c.0 one to c.5, because that's where the PWM pin on the 20X2 is. My thinking was once the initial work on the single set of LEDs was finished, it would carry on to the loop, where c.5 is just one of the four sets of LEDs.
BUT!
My code on c.5, by itself - works fine.
Hippy's code on c.5, by itself - works fine
My code, then Hippy's - my bit works , his no longer does!
Really odd. I use setfreq m8 to do mine, then switch to m32 after it's done.
Any ideas?
thanks as always!
I thought I'd enhance things a bit, using Hippy's code (above) as the main 4-channel PWM. I I wrote some very particular PWMOUT commands for one of the pins, to create a nice flickering "boot-up" series of flashes and fades. This is on pin C.5 of the 20X2, which is the typical pwm pin. It works fine. This is at 8MHz.
I thought I'd add this piece of code just before Hippy's code, where it sthen witches to 32MHz. The idea was then it would just carry into the fading in and out for the four sets of LEDs, looping happily.
Hippy's original code assigned the LEDs to pins c.0, c.1, c.2, c.3. I changed the c.0 one to c.5, because that's where the PWM pin on the 20X2 is. My thinking was once the initial work on the single set of LEDs was finished, it would carry on to the loop, where c.5 is just one of the four sets of LEDs.
BUT!
My code on c.5, by itself - works fine.
Hippy's code on c.5, by itself - works fine
My code, then Hippy's - my bit works , his no longer does!
Really odd. I use setfreq m8 to do mine, then switch to m32 after it's done.
Any ideas?
thanks as always!