| Author |
Message |
pjc30943
Joined: 02 Dec 2005
|
|
Posted: 17 July 2008, 21:26 PM Post subject: PWM channels swapped? |
|
|
On a 1280n, based on the documentation the following should output PWM on L.3, L.4:
| Code: |
OpenPWM 7, SERVO_REFRESH_RATE, zxCorrectPWM
PWM 7, SERVO_PWM_CENTER_PERCENT '0.0625
PWM 8, SERVO_PWM_CENTER_PERCENT |
However the outputs are on H.3, H.4.
Perhaps the documentation is incorrect in the pins shown in the system library (pg.191)?
EDIT: the important thing is knowing which timers are used for channels 7,8: is it TMR5 associated with port H, or TMR4 associated with port L? |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Location: Portland, OR
|
|
Posted: 17 July 2008, 22:53 PM Post subject: Re: PWM channels swapped? |
|
|
| pjc30943 wrote: | | the important thing is knowing which timers are used for channels 7,8: is it TMR5 associated with port H, or TMR4 associated with port L? | The ZBasic documentation is incorrect. Channels 7-9 are associated with Timer4 and output on Port H while channels 10-12 are associated with Timer5 and output on Port L. The table should read:
| 7 | 8 | 9 | 10 | 11 | 12
| | 15, H.3 | 16, H.4 | 17, H.5 | 38, L.3 | 39, L.4 | 40, L.5
|
|
|
| Back to top |
|
 |
|