Shop OBEX P1 Docs P2 Docs Learn Events
Odd PWMPAL question — Parallax Forums

Odd PWMPAL question

JonathanJonathan Posts: 1,023
edited 2004-09-01 14:12 in BASIC Stamp
Hi All,

We have been using a PWMPAL to drive the servos on the hydrogen robot. In an effort to save some variable space, I decided to hard code the off time, as it never changes.The usual line of code to send the ontime and offtime to the PWMPAL is as follows:

SEROUT 0,45,[noparse][[/noparse]"!PWMM4", onTime.BYTE0,onTime.BYTE1,offTime.BYTE0,offtime.BYTE1]

Methoughts I would change it to:

SEROUT 0,45,[noparse][[/noparse]"!PWMM4", onTime.BYTE0,onTime.BYTE1,%11001,%0000]

This should send it an offTime of 400. The code works with the drive servos, but not with the pan and tilt servos. Any ideas what could be causing this?

Jonathan

www.madlabs.info


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Sign In or Register to comment.