Hi,
The project I am currently undertaking is an RGB pool light.
Inputs: 3 buttons, one for left, one for right and one for enter.
Display: LCD screen
PIC chips = 2 x PIC16f628a
So basically when you turn the thing on the LCD welcomes you with a screen saying "pool light now on" and it immediatly switches on all three led's. It has a five second delay and then the LCD screen switches to "please press enter to continue" you push enter and the screen changes to "choose option with 8 numbers below it 1-8 and an arrow initially pointing at 1. when enter is pushed the arrow dissapears and reappears with a slight delay in between. when left or right is pushed the arrows moves to the corresponding number.
I want numbers 1-4 when pushed to change the lights to different constant colours.
I want numbers 5-7 when pushed to change the lights to different fading colour combinations.
Number 8 changes the lcd screen to a manual setting where you can individually change the R,G,B led's.
Any way at this point i've got the lcd screen working fine that is running off of one PIC16F628a.
I've got all the PWM colour changing and such working fine individually on another PIC16F628a.
The problem i'm having at the moment is that when I toggle through the numbered options the lights will have a flicker which seems to be a couple of ms long. Then when I push enter on various options it works for like 1-7 sometimes but then will mess up pretty quickly and when I push enter on 4 it will do what it should for 1 and when I push 7 it will do what it should for 3 and that sort of thing.
I'm polling the inputs and not using interrupts. I might give interrupts a go tonight and see how I go. But i'm also wondering if I should debounce my switches as I havn't done that at the moment.
Hopefully that will fix the numbers from messing up when I push left and right but I'm not sure that this will fix the flickering.
Any thoughts would be much appreciated.
I will add more when I get home and have my code handy.
Cheers
Brent
The project I am currently undertaking is an RGB pool light.
Inputs: 3 buttons, one for left, one for right and one for enter.
Display: LCD screen
PIC chips = 2 x PIC16f628a
So basically when you turn the thing on the LCD welcomes you with a screen saying "pool light now on" and it immediatly switches on all three led's. It has a five second delay and then the LCD screen switches to "please press enter to continue" you push enter and the screen changes to "choose option with 8 numbers below it 1-8 and an arrow initially pointing at 1. when enter is pushed the arrow dissapears and reappears with a slight delay in between. when left or right is pushed the arrows moves to the corresponding number.
I want numbers 1-4 when pushed to change the lights to different constant colours.
I want numbers 5-7 when pushed to change the lights to different fading colour combinations.
Number 8 changes the lcd screen to a manual setting where you can individually change the R,G,B led's.
Any way at this point i've got the lcd screen working fine that is running off of one PIC16F628a.
I've got all the PWM colour changing and such working fine individually on another PIC16F628a.
The problem i'm having at the moment is that when I toggle through the numbered options the lights will have a flicker which seems to be a couple of ms long. Then when I push enter on various options it works for like 1-7 sometimes but then will mess up pretty quickly and when I push enter on 4 it will do what it should for 1 and when I push 7 it will do what it should for 3 and that sort of thing.
I'm polling the inputs and not using interrupts. I might give interrupts a go tonight and see how I go. But i'm also wondering if I should debounce my switches as I havn't done that at the moment.
Hopefully that will fix the numbers from messing up when I push left and right but I'm not sure that this will fix the flickering.
Any thoughts would be much appreciated.
I will add more when I get home and have my code handy.
Cheers
Brent