A little article on using PWM with Swordfish...
http://www.sfcompiler.co.uk/wiki/pmwiki ... shUser.PWM
Using PWM
Moderators: David Barker, Jerry Messina
- David Barker
- Swordfish Developer
- Posts: 1214
- Joined: Tue Oct 03, 2006 7:01 pm
- Location: Saltburn by the Sea, UK
- Contact:
David,
This is a very nice module... thanks. I would like to add that you can simplify the math in your PWM.SetFreq() routine for determining MAX_DUTY.
This is a very nice module... thanks. I would like to add that you can simplify the math in your PWM.SetFreq() routine for determining MAX_DUTY.
Code: Select all
MAX_DUTY = Word((PR2+1) << 2)
Does anyone have this library handy?
I'm chasing it down, but the SF wiki is MIA
I'm chasing it down, but the SF wiki is MIA
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.
Australian distributor for the Swordfish Compiler
Australian distributor for the Swordfish Compiler