hpwm motor driver datasheet ?

Jeremy Leach

Senior Member
I might be thick, but the manual says under hpwm " see
hpwm motor driver datasheet for more details"

But I can't seem to find that datasheet ....:confused:
 

hippy

Ex-Staff (retired)
Staff member
It is one of those documents which is on the way but hasn't been published yet.

The Microchip datasheets for PICmicro devices which support Enhanced Caputure / Compare / PWM are probably the best reference; the 18F2520 (28X2) is one.

If there are specific question on HPWM; ask away.
 
Last edited:

hippy

Ex-Staff (retired)
Staff member
I don't recall there being any intent to add "dead band delay". That's only available in half-bridge mode and not on all devices, but can probably be achieved by appropriate Poke/PokeSfr commands. The dead bad delay is measured in 'instruction cycle times' so between 0uS and 127uS at 4MHz is my understanding.
 

BeanieBots

Moderator
I don't recall there being any intent to add "dead band delay".
From Manual 2 page 70. (hpwm)

HPWM mode, polarity, setting, period, duty

...setting is a variable/constant which specifies a specific setting
...half mode - dead band delay (value 0-127)

Previously this had been reported as not working.
Is there no intent to make it functional?
 
Last edited:

hippy

Ex-Staff (retired)
Staff member
Aha, hadn't rembered that, nor recalled any bug report about it. Found the 14M bug report which should have been fixed and the workround there ( Poke $16,setting ). Will investigate.

Added : tested ...

14M Okay
28X1 Okay
28X2 Not supported
28X2-3V Okay
40X1 Okay
40X2 Okay
40X2-3V Okay
 
Last edited:

Jeremy Leach

Senior Member
Ok, thanks Hippy - I justed wanted to make sure I had all the available documents to hand ! No specific questions yet. I'm just catching up on the X2 device capabilites - I can see why people were getting excited now :)
 

hippy

Ex-Staff (retired)
Staff member
If you haven't got it already, the X2 product brief is a very useful reference to have to hand ...

http://www.rev-ed.co.uk/docs/picaxex2.pdf

In my experience it's really the move from Number to Port.Number and related changes which are the ones to get used to, while ADC channels are a bit more 'all over the place', plus remembering Peek/Poke and PeekSfr/PokeSfr are separate commands ( though most hardware can be controlled by PICAXE commands so not a lot of need for them on the X2 for most people ).

It doesn't take too long to get used to the X2 and, once you have, the flexibility of what's on offer is impressive and useful. Some things are tied to particular pins ( ADC, Hardware Interrupts, Servo Outputs ) so that has to be remembered and it's not as perfect as everyone would like but that's unavoidable given we cannot change the Microchip pinout !

My long-time favourite, the 18X, has been pushed into second place by the 28X2, and there's still the 20X2 to come !
 

BeanieBots

Moderator
I agree about the poor old 18X.
It was my favourite but the 28X2 really is something else!

Shame about HPWM on the 28X2:(
 

BCJKiwi

Senior Member
Re X2 command format port.number,

Asked previously (and not seen any reply) if this format could be introduced for the complete range of chips.

Surely this is simply a PE issue, i.e. nothing to do with the chip firmware/hardware.
 

hippy

Ex-Staff (retired)
Staff member
It's possible - and is a PE/Compiler issue - but it would add confusion as non-X2's use the same pin numbers for input and output, so A.0 and B.0 may be ambiguous. Consider the following for 18X ...

HIGH B.0
SERIN A.0, N2400, b0

HIGH A.0
SERIN B.0, N2400, b0

b7 = A.0 ' or b7 = B.0
HIGH b7
SERIN b7, N2400, b0

Because A.0 and B.0 can be used interchangeably, it's very easy to imagine that any pin can be used for input or output as per X2's and I'm sure someone's going to do that then get very confused when the chip does something other than expected.

You can use "Symbol A.0 = 0" etc to add the port.number if you wish.
 
Last edited:
Top