I am just getting started with PIC/GCBASIC so forgive me if I am missing something here. When I attempt to use HPWM16 on a 16F17114 I receive the error
Chip cannot support PWM16 commands. Either chip is not supported, or, not validated with this chip
I checked and CHIPPWM16TYPE is not listed in the dat file at all but the Microchip website lists 2x 16-bit PWM with Dual Outputs under the features.
Any help would be appreciated!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You should try using the 16Bit PWM demo file as your starting point. There is a 16Bit PWM demo of a chip in the same family. Do a search in GCCODE, open the Demo folder and look for the 16F171 demo folder. I can look the actual demo tomorrow if you cannot find it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is the 16bit process as defined in many of the 16bit PWM solutions in the demo pack.
Change your chip, change the PPS, change the Port Constants and give it a go.
Evan
// Setup all the registers. This is shown the demo with good documentation.// You must toggle PWM1CON to set the new paramaters// Create an alias to the PWM1 duty registerDimPWMvalaswordaliasPWM1S1P1H,PWM1S1P1LDoforPWMval=0x00to0x3E8wait1msPWM1CON=0x00PWM1CON=0x80Nextwait2sforPWMval=0x3E8to0x00Step-1wait1msPWM1CON=0x00PWM1CON=0x80Nextwait2sLoop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am just getting started with PIC/GCBASIC so forgive me if I am missing something here. When I attempt to use HPWM16 on a 16F17114 I receive the error
I checked and CHIPPWM16TYPE is not listed in the dat file at all but the Microchip website lists 2x 16-bit PWM with Dual Outputs under the features.
Any help would be appreciated!
it seems as though there's only 10-bit PWM hardware on this chip range...sneaky!
Thank you so much! I totally missed that.
You should try using the 16Bit PWM demo file as your starting point. There is a 16Bit PWM demo of a chip in the same family. Do a search in GCCODE, open the Demo folder and look for the 16F171 demo folder. I can look the actual demo tomorrow if you cannot find it.
Hi Anobium, I was not able to locate that 16F171 demo folder but I would be very interested in taking a look if you have the time. Thank you!
C:\GCstudio\gcbasic\demos\Vendor_Boards\Great_Cow_Basic_Demo_Board\16F17126_chiprange_demonstrations
Specifically,
250_pwm16bit_variable_modes
This is the 16bit process as defined in many of the 16bit PWM solutions in the demo pack.
Change your chip, change the PPS, change the Port Constants and give it a go.
Evan