PWM channels swapped?

Discussion specific to the ZX-1281 and ZX-1280 microcontrollers as well as the ZX-1281 and ZX-1280 Dev Boards.
Post Reply
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

PWM channels swapped?

Post by pjc30943 »

On a 1280n, based on the documentation the following should output PWM on L.3, L.4:

Code: Select all

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?
Paul
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: PWM channels swapped?

Post by dkinzer »

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:
[table][row]7[col]8[col]9[col]10[col]11[col]12
[row]15, H.3[col]16, H.4[col]17, H.5[col]38, L.3[col]39, L.4[col]40, L.5
[/table]
- Don Kinzer
Post Reply