]> oss.titaniummirror.com Git - rgblamp.git/blobdiff - main.c
unused_init() properly configures unused pins
[rgblamp.git] / main.c
diff --git a/main.c b/main.c
index 9163c1c77e1a32af312c3d7a90e4b6a94eecb52f..ec3d4257dfc10595522972e879e35f2ca4c7656d 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,7 +1,28 @@
 /*
  * File:   main.c
  *
- * Created on August 16, 2010, 12:09 PM
+ * PWM test program
+ *
+ * PIC resources in use, 18-pin DIP, by pin:
+ * - ( 1) RA2 - unused
+ * - ( 2) RA3 - CCP3 PWM for blu LED
+ * - ( 3) RA4 - CCP4 PWM for wht LED.  ICSP pin 6, PGM/LVP.
+ * - ( 4) RA5 -                        ICSP pin 1, MCLR#/Vpp
+ * - ( 5) Vss
+ * - ( 6) RB0 - pushbutton
+ * - ( 7) RB1 - unused
+ * - ( 8) RB2 - unused
+ * - ( 9) RB3 - CCP1 PWM for red LED
+ * - (10) RB4 - rocker switch position B (right)
+ * - (11) RB5 - rocker switch position A (left)
+ * - (12) RB6 - unused
+ * - (13) RB7 - unused
+ * - (14) Vdd
+ * - (15) RA6 - unused
+ * - (16) RA7 - CCP2 PWM for grn LED
+ * - (17) RA0 - unused
+ * - (18) RA1 - unused
+ *
  */
 
 #define RUNAT32MHZ /* else 16 MHz */
@@ -11,6 +32,7 @@
 #include "picinit.h"
 #include "buttons.h"
 #include "rgb.h"
+#include "unused.h"
 
 #define STEP_SIZE               32 /* ms */
 #define reset_steps()           do { incolor_steps = 1; fade_steps = 0; } \
@@ -57,10 +79,11 @@ int main(void)
     int fade_steps;
 
     pic_init();
+    unused_init();
     buttons_init();
     rgb_init();
-    reset_steps();
 
+    reset_steps();
     if (buttons_on())
       rgb_on();