|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#4
|
|||
|
|||
|
Re: Program digital IO to PWM?
The PIC18F8520 actually has several hardware counter-compare modules which are connected to the first four motor ports. These can be used to generate a high resolution PWM signal from 0% duty to 100% duty at high frequencies (I think I used 40kilohertz). Since hardware is taking care of this, after you set a value your code can continue to do anything else and the signal will continue to be generated until it is told otherwise.
I attached some code that I used to drive an h-bridge motor controller via this method. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trouble with Digital breakout IO PWM | eatbuckshot | C/C++ | 1 | 26-01-2009 23:19 |
| Vic 884 PWM program change?? | Team 1708 Dave | Programming | 3 | 21-12-2008 17:00 |
| HM55B Digital Compass - How do I program the controller to read it? | RyanN | Programming | 12 | 13-03-2008 00:14 |
| Digital out signal speed on off, almost like PWM but at max 60Hz | Generalx5 | Electrical | 2 | 27-03-2007 12:26 |
| Digital Caliper as a Digital Readout on Small Mill | sanddrag | Technical Discussion | 9 | 13-10-2005 22:51 |