Thanks Melanie, the actual output of the HPWM goes to the gate of a 35A Mosfet (via a buffer) which is a known working arrangement. We were using the same output configuration with a different PIC which did not have Hardware PWM (using the PWM command). Our output from the Mosfet is loaded with a quantity of fairly high wattage light bulbs used as a dummy load, and we are measuring the average output with an AVO 8 analogue meter which evens out any PWM due to the weight of the needle. On re-reading my post I perhaps did not explain myself very well. When I turn my Pot. slowly from 1 end to the other, the average output from the HPWM goes from 0, ramping up to full output, then suddenly back to 0 and ramping up again, repeating this process 16 times in total, till the end of the pot is reached, with the output ending on full on. I appears to be a mathmatical problem rather than an electronic one. Just to add some more detail, here are the defines at the top of my program.
DEFINE LCD_DREG PORTF
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTC
DEFINE LCD_RSBIT 7
DEFINE LCD_EREG PORTC
DEFINE LCD_EBIT 6
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
DEFINE ADC_BITS 8
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
GoTo MAIN
Bookmarks