Maker Pro
Maker Pro

DMX controlling RGB flexible LED strip.

Hello,
I have made a project for controlling RGB flexible LED strip. It's a three channel DMX controller that i want to put to give some color to my business. It uses a PIC16F628A with a code that i downloaded from the web. It all works perfectly, the only problem is that when the outputs are low, the LEDs flicker a lot, the brightness is not stable. The potentiometer scale of the DMX table goes from 0 to 255. When I move the pot, from 0 to 50 i get the flickering and from 50 and up it's perfect. I have made many test and i know that the problem is with the ASM code but i don't know how to solve it. You can see the attached code.
Any help on how to make this work properly will be really appreciated.

Many thanks, Ana
 

Attachments

  • DMX31.txt
    4.2 KB · Views: 55
I have been doing some test and i found out that the flickering problem is produced by the interrupts. I inserted a loop in the ASM code just after the label "Main" so that one of the outputs will light the LEDs very dim, without having anything to do with DMX and the LEDs still flickers. If i disconnect the interrupts (INTCON,GIE) the LEDs Stops flickering.
Can someone please help me.
Thanks Ana

This is the loop i inserted for testing:
Main
MOVF 1,W
XORWF 255,W
BTFSC STATUS,Z
BSF OUT2
BCF OUT2
GOTO Main
 
Top