A personal repository of random information in compensation for a fatigued biological computer
Breaded Electronics / Embedded » Microchip Specific » TCPIP Stack Customisation » 20081112 Slider PWM control
Checked file: C:/MCC18/doc/periph-lib/PWM.htm#_Toc197156989 and the PIC18F4685 has PWM_V7, EPWM_V7 which impacts on the functions available..
In maindemo.c
In declares:
added #include <pwm.h>
added in '// Initialize application specific hardware' section:
CloseEPWM1; // set to know state on powerup so no accidents!
In CustomHTTPApp.c:
/****************************************************************************
My Custom Stuff
***************************************************************************/
added before first function:
#include <pwm.h> // sliders // PWM - track if PWM is on or off |
and in the 'GET Form Handlers' section: (building on previous exercise)
// If it's the SLIDER updater file SetDCEPWM1((char) 0); // CCP2 on PIC18F4685 CloseTimer2; |
Thats it and it works.