Hi, This is about the lighting circuit ive been making with LEDs. Im using PWM to fade the LEDs. With this being DC im just flashing them really fast (no zero crossing or anything like with 240V AC). The problem i have is when i send serial data to it it has to spend a few milliseconds processing the data. Thats causing the lights to flash. I dont think i will ever get rid of it completely but i want to minimize it as much as possible.

Would someone be kind enough to tell me how long these things take please?
Copy 1 byte from RCREG into a variable
Copy 1 byte from a variable to another variable
If statements with 1 condition (EG "if aByte=255 then")
Passing a set value to a variable (EG "aWord=3000")
Bit masking (EG "temp & %11111100")
Bit shifting (EG "temp >> 2")
SELECT CASE. Does this take longer for matches further down the list?
Clearing serial buffer problems (cant remember which problem) RCSTA.4=0 / RCSTA.4=1

I know i asked about 1 or 2 of those before but i cant remember which and i cant find the thread. If i know how long it takes for each thing then i can spread them out more evenly and add more pauses in when no data is arriving to balance things out a little.