Hardware PWM

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

Post Reply
richardb
Posts: 309
Joined: Tue Oct 03, 2006 8:54 pm

Hardware PWM

Post by richardb » Sat Oct 07, 2006 10:48 am

Is there likely to be a hardware PWM module?
Hmmm..

JackOfVA
BETA Tester
Posts: 16
Joined: Tue Oct 03, 2006 9:04 pm
Location: Clifton, VA USA
Contact:

Post by JackOfVA » Sat Oct 14, 2006 11:29 pm

It's pretty easy to control the HWPM module and it should not take you more than a couple hours to write your own module.

Have you tried rolling your own HPWM module?

Jack
Jack, Clifton VA

richardb
Posts: 309
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Sun Oct 15, 2006 10:03 am

I Have now but its specific to the 18f458, but thats not the point.


Most if not all the 18f series have pwm included but the number and port location varies, i dont have the abilitiy the write a module that will abstract the hardware nicely.

Many people coming to this compiler will be hobbiests or will have migrated from another pic basic compiler. It will put them off if they see there are obvious things missing.

The point of a high level language is to make it fast to develope the software.


Richard

PS if its so fast to write a module for the HW PWM why isnt there one included.?
Hmmm..

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Sun Oct 15, 2006 11:54 am

I Have now but its specific to the 18f458, but thats not the point.
I'm glad you have managed to put something together. As you say, the advantage of a high level language is that it makes it faster to develop software.
Most if not all the 18f series have pwm included but the number and port location varies, i dont have the abilitiy the write a module that will abstract the hardware nicely.
That's true - to cover all devices takes a lot of time. Post your code here or on the wiki - perhaps we can use it as a basis for a new module that can evolve over time
Many people coming to this compiler will be hobbiests or will have migrated from another pic basic compiler. It will put them off if they see there are obvious things missing.
I see your point and would hope it wouldn't put people off. I've had to make some decisions on what was available in the release, given resources available and time constraints. I just cannot do everything.

As jack pointed out, PWM for a single device is a fairly trivial task but other modules (such as GLCD, USB etc) are a little more tricky and I feel it would be better if I spent my time on these type of modules.

gramo
Registered User
Registered User
Posts: 200
Joined: Tue Mar 20, 2007 6:55 am
Location: Australia
Contact:

Post by gramo » Sat Apr 28, 2007 2:13 am

Just wondering if there has there been any progress with the HPWM modules?

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Sat Apr 28, 2007 8:14 am

Slightly Off-Thread; Is there a 'place' where people have put their home-brew modules so that other people can have a look and pick'n'mix?
(I'm hopiing to find one on T6963 controller).

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Sat Apr 28, 2007 10:04 am

Yout could try here

http://www.sfcompiler.co.uk/wiki/

more specifically

http://www.sfcompiler.co.uk/wiki/pmwiki ... er.Modules

Look at the way people have implemented the drivers (and let the GLCD module do most of the higher level rendering work). If you can read C, there is some useful looking stuff here...

http://www.picant.com/c2c/examples/t6963/t6963.h.html
http://www.picant.com/c2c/examples/t6963/t6963.c.html

which shows things like initialisation sequence etc...

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Sat Apr 28, 2007 10:25 am

Thanks David.

Post Reply