PDA

View Full Version : [SOLVED !] HPWM 3channel



bastien_moi
30th November 2008, 20:09
hello

is what the last version of PDS supports 3HPWM with a 16F777 or another pic?

I hesitate has to buy the last version of PDS

thank you for your answer

wastrix
30th November 2008, 21:43
HPWM depends on the hardware PWM module, hence the name. Therefore I believe any version of PDS can handle this.

pic-ignorant
30th November 2008, 22:24
If you mean run 3 x HPWM independently I don't think you can, although this is a limitation of the PIC, NOT PDS. Have a look in the datasheet..

Regards

John

bernardj
1st December 2008, 08:10
Hi

Look at the datasheet for the PIC18F1230/1330. It specifies that you can have up to 6 PWM outputs running independently.

The HPWM command in Proton does have a parameter for channel number. While I have not tested it personally, it could potentially be possible to run 3 PWM channels using the HPWM functionality.

The alternative would be to set the PWM channels up using the various registers in the PICs - maybe a little bit more tricky but certainly achievable.

Regards

Bernard

Tim
1st December 2008, 08:35
The HPWM command is designed to allow you to set up the freq and duty on a HPWM port.

No pics I know of let you have more than 2 channels with different frequency's so the HPWM command could never be used.

Were you get more than 2 channels all you are doing is perhaps altering the duty on those channels or turning the channels on and off. Remember that there designed to be used to control Hbridges driving a motor not say 6 servos.

Considering that it takes around 3 lines of code to change the reg's required to control the channels its a simple matter set up each channel your self and should always be the preferred option.

bastien_moi
1st December 2008, 17:13
ok
so, HPWM Channel (1 to .... (max of pic)) , Dutycycle , Frequency, work perfectly with last version of PDS

thank you

Tim
1st December 2008, 18:02
so, HPWM Channel (1 to .... (max of pic)) , Dutycycle , Frequency, work perfectly with last version of PDS

Hmm were did I say that?

I would ask you to read over the posts again until you understand the limitations of the pic PWM system and understand the how they work.

bastien_moi
1st December 2008, 18:22
sorry, english is not my mother tongue, and i don(t understand all :(

16F7X7 have 3 PWM on hardware, then it's possible to use 3HPWM (with same frequency)?
for sample:

HPWM 1, 128,1000
HPWM 2, 255,1000
HPWM 3, 0,1000

still sorry, if I badly understand

thank you

Tim
1st December 2008, 21:17
Proton only supports the real HPWM ports that is the ones with the freq adjustments. That means, that at the most its 2!

It does not attempt to make sense of all the other HBridge drive settings and variations that Mchip has.

Remember that with the PWM system were they have more channels than timers there all different on every chip.

If you want to control what you consider to be channel 4 etc then YOU have to read the data sheet and manipulate a few registers your self.

wastrix
1st December 2008, 23:50
then YOU have to read the data sheet and manipulate a few registers your self.

I think these are the keywords

bastien_moi
4th December 2008, 12:49
thank you