hi everyone...i need any help suggestion, example codes and any other information regarding my pic project as im new to pic and neeeeeeeeeeeeds alot help.im doin in assembly language
input:- a rotary switch/encoder
output:- 3 led, red green blue
the pic must read the rotary switch and vary the leds to generate different colors according as been preset
im tryin to built a simple RGB controller and drive the red blue green leds using software pwm as the device i hv supports only 1hardware PWM.after goin thru alot net surfs, i plan to use TMR0 TMR1 TMR2 as the period registers for the pwm and change the TMR0 TMR1 TMR2 value to varying the generated colors. i must hv a rotary switch/encoder were i use it to select the preset colors which i want. approx 20 colors. i plan to read the rotary switch in the main prosess and assign values to the TMR0 TMR1 TMR2 and thn wait for interupt myb!!. whn the interupts occurs,il reset or set the leds on shedule one by one. after tht il go bck to the main processing. as example tmr0 overflow will set/reset red led , tmr1 overflow will set/reset green led/ tmr2 will set/reset blue led. wat im having difficulties is how and where do i write the updated values of tmr0 tmr1 tmr2 in main process or in THE ISR, how to reload the new values into the tmr0 tmr1 tmr 2......or if i use one timer only is it possible to vary the RGB leds to generate different colors...i thought of reading the rotary switch and thn place 3 look up tables for the 3 timers and get the values from the look up table one by one and write into the timer registers to set the periods in the main processing.but i dont noe how to make it happen in assembly. im still in flow chart process but im stuck in middle coz im not sure am i doin it the right way or is there any better and easier way. i hav to update the timers registers according to the rotary switch/encoder and thrn generate the desired output...hope u al can get wat im tryin to meant and pls if hv any suggestion and no matter wat suggestion,or any example codes on generatimg software pwm and ant related releven example i would glady want it.!!! thanking al in advance
ANNIYAN