Newsgroups: comp.robotics
Path: brunix!news.Brown.EDU!noc.near.net!MathWorks.Com!europa.eng.gtefsd.com!gatech!swrinde!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!mksol!strohm
From: strohm@mksol.dseg.ti.com (john r strohm)
Subject: Re: Pulse Width Modulation
Message-ID: <1993Nov3.151403.3056@mksol.dseg.ti.com>
Organization: Texas Instruments, Inc
References: <wgpp3ee00iV1AIDy5z@andrew.cmu.edu>
Date: Wed, 3 Nov 1993 15:14:03 GMT
Lines: 27

In article <wgpp3ee00iV1AIDy5z@andrew.cmu.edu> Christopher Kristof <ck3i+@andrew.cmu.edu> writes:
>    I'm looking for a chip to do pulse width modulation.  I'd like
>something that is easily interfacable to an HC11 and which requires a
>minimum of extra parts.  Also, the ability to do more than 1 channel per
>chip would be great.  Can anyone recommend a chip?  I was given the
>number of a Nat'l Semiconductor part (LM3524N-ND / LM3524DN-ND) but know
>nothing else about it.  Information on it would also be appreciated.

Depending on how many channels of PWM output you need, and what kind of
pulse widths and rep rates are involved, there are two approaches.  Approach
#1, if you only need one or two channels, is to use the onboard programmable
timer modules in (I think) Output Compare mode and generate PWM directly.
Approach #2, if you need three to eight outputs, is to use one of the parallel
ports and generate the PWM in software, using a timer interrupt to count the
rep rate and a software loop to time the pulses.  Example code for the latter
is available in I-can't-remember-which-directory on cherupakha.ai.mit.edu: it
is set up for R/C servo PWM (which wants a 1-2 msec pulse at about 20 Hz rep
rate).

Either way, you can do PWM directly with the processor with NO additional
parts.

There was also a project in one of the popular press electronics magazines
a while back that used two PICs to build an 8-channel PWM board controlled
by a serial link.

Hope this helps.
