Page 1 of 1

RGB LED Component

Posted: Sun Jan 22, 2012 5:43 pm
by JohnCrow
RBG Component (FC5)
Hi
I've been pulling my hair out trying to get the RGB component on hardware.
The Simulation is fine, but on hardware It always has 2 of the outputs high at any time.
Ive tried various configutations. Ive tried having the tick macro in the main loop and calling it as a seperate macro using various timer interupt settings.
But it still wont cycle the 3 basic colours.
RGB_Test_V1.fcf
(7 KiB) Downloaded 302 times

Re: RGB LED Component

Posted: Sun Jan 22, 2012 7:49 pm
by Jay Dee
Hi,
I ran it in V5 , using ECIO 40P and using an LED board, so 3 LEDs rather than the 3+common of an RGB. I got the same 'inverted' logic you saw.
Changed the polarity in the componet properties and got the expected bahaviour. But this I guess would only work with a common anode type RGB, I think :?
J.

Re: RGB LED Component

Posted: Sun Jan 22, 2012 8:22 pm
by JohnCrow
Hi Jay Dee

I initally tried it with a comon cathode RGB LED.
I can get it to cycle correctly if I program it by setting the relevant port bits high or low, but not using the component.
I did try it using the LED e-block and got the same results, i.e. 2 leds on at once.

Just tried your suggestion and set it to active low, and its works :)
Just missed that setting.

Thanks

Re: RGB LED Component

Posted: Sun Jan 22, 2012 9:07 pm
by JohnCrow
it is possible to get it to work by calling the tick macro using TMR0 interupt as well
Ive attached a simple test program though the interupt time may need fine tuning to match the application.
RGB_Test_V2.fcf
TMR0 Tick
(13 KiB) Downloaded 362 times