]> oss.titaniummirror.com Git - rgblamp.git/log
rgblamp.git
12 years agoRun at 2 MHz
R. Steve McKown [Tue, 6 Dec 2011 18:43:40 +0000 (11:43 -0700)]
Run at 2 MHz

* PWM at 1.95 kHz
* 25 ms max loop processing time, out of a desired 32 ms.

12 years agomplabx file updates
R. Steve McKown [Tue, 6 Dec 2011 18:40:25 +0000 (11:40 -0700)]
mplabx file updates

12 years agoAdd debug pin
R. Steve McKown [Tue, 6 Dec 2011 18:38:34 +0000 (11:38 -0700)]
Add debug pin

* Debug on pin 1 of DIP18 package, RA2.
* Set pin high when processing in the loop.  Low during wait or sleep.

At 4 MHz, we see that processing within the loop is at most 12 ms, and
we have a loop period constraint of 32 ms.  We could run at 2 MHz too...

12 years agoRun at Fosc = 4MHz
R. Steve McKown [Tue, 6 Dec 2011 18:36:13 +0000 (11:36 -0700)]
Run at Fosc = 4MHz

* Run on internal oscillator at 4 MHz
* Get rid of the RUNAT32MHz definition
* Adjust PWM for ~ 1 kHz frequency, at Fosc = 4 MHz
* Loop processing <= 12 ms, out of a period of 32 ms

12 years agounused_init() properly configures unused pins
R. Steve McKown [Tue, 6 Dec 2011 16:34:52 +0000 (09:34 -0700)]
unused_init() properly configures unused pins

PortA unused pins are set as output high.
PortB can have unused pins as input with weak pull-ups enabled.

12 years agoUse internal uc pull-ups for IO pins.
R. Steve McKown [Tue, 6 Dec 2011 16:30:47 +0000 (09:30 -0700)]
Use internal uc pull-ups for IO pins.

This allows removal of the three external pull-up resistors in the circuit.

12 years agoHave 4 speed modes
R. Steve McKown [Tue, 6 Dec 2011 02:50:27 +0000 (19:50 -0700)]
Have 4 speed modes

12 years agoUse pushbutton rising edge for state change
R. Steve McKown [Tue, 6 Dec 2011 02:39:16 +0000 (19:39 -0700)]
Use pushbutton rising edge for state change

12 years agoTiming as const arrays
R. Steve McKown [Tue, 6 Dec 2011 02:18:15 +0000 (19:18 -0700)]
Timing as const arrays

For some reason, holding the pushbutton goofs up things...

12 years agoFix fading
R. Steve McKown [Tue, 6 Dec 2011 01:48:06 +0000 (18:48 -0700)]
Fix fading

12 years agofade is working
R. Steve McKown [Tue, 6 Dec 2011 00:09:22 +0000 (17:09 -0700)]
fade is working

12 years agoFading isn't working
R. Steve McKown [Mon, 5 Dec 2011 00:03:47 +0000 (17:03 -0700)]
Fading isn't working

12 years agoMinor changes on startup
R. Steve McKown [Sun, 4 Dec 2011 23:41:28 +0000 (16:41 -0700)]
Minor changes on startup

12 years agoCloser to a full featured setup
R. Steve McKown [Sun, 4 Dec 2011 22:57:55 +0000 (15:57 -0700)]
Closer to a full featured setup

Rocker switch is power switch.

* Off: lamp is off, PWM off, CPU in sleep
* On (right): Random time to fade between colors, with a random time
  staying in each color.
* Off (left): No fade between colors, with a random time in each color.

The push button speeds up fade and incolor times by a factor of 8.

12 years ago4 channel PWM with sample color changing
R. Steve McKown [Sat, 3 Dec 2011 02:55:50 +0000 (19:55 -0700)]
4 channel PWM with sample color changing

12 years agoFix comments about port assignments
R. Steve McKown [Thu, 1 Dec 2011 19:04:40 +0000 (12:04 -0700)]
Fix comments about port assignments

12 years agoAlter PWM in small increments
R. Steve McKown [Wed, 30 Nov 2011 23:49:33 +0000 (16:49 -0700)]
Alter PWM in small increments

* Use unsigned char, as unsigned short is a 16-bit value
* Increment and decrement PWM value by 1 instead of 16
* Alternate fixed LED state based on increasing/decreasing PWM duty
* Ignore /funclist file

12 years agoInitial commit
R. Steve McKown [Wed, 30 Nov 2011 23:37:12 +0000 (16:37 -0700)]
Initial commit