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 LED Component
Moderator: Benj
- Jay Dee
- Posts: 398
- Joined: Tue Aug 18, 2009 6:42 pm
- Has thanked: 121 times
- Been thanked: 154 times
- Contact:
Re: RGB LED Component
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.
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.
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: RGB LED Component
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
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
1 in 10 people understand binary, the other one doesn't !
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: RGB LED Component
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.
Ive attached a simple test program though the interupt time may need fine tuning to match the application.
1 in 10 people understand binary, the other one doesn't !