Philips P89LPC922 PWM

Nov 25, 2003 5 Replies

Hi!



I have some questions concerning the relatively new Philips microcontroller P89LPC922. Can anyone tell me how to make use of the PWM output? Which SFRs do I need to use and which Pin is associated with the PWM outpu? Unfortunatelly, the datasheet isn't of much help.



Thanks Stefan


Stefan schrieb:

Look for the User Manual which should be available at the Philips website. It contains exactly these details.

Dipl.-Ing. Tilmann Reh Autometer GmbH Siegen - Elektronik nach Maß. http://www.autometer.de ================================================================== In a world without walls and fences, who needs Windows and Gates ? (Sun Microsystems)

It doesn't - probably because the chip is quite new?! It even doesn't contain a detailed description of the SFR's...

Stefan

In situations like this, you can try looking at an older family member, like the P89LPC932 users manual ? That can help with the 'educated guess' process :)

Doing this, suggests T0M2..T0M0 = 06H will enable PWM, which it appears auto-enables the PIN T0 as PWM_out. (pin10)

Try

TAMOD := 2#0000_0001; (* T0M2 = 1 *) TMOD := 2#0000_0010; (* M1,M0 10 *)

With a loop to sweep TH0 0..255, and see what happens on T0 Pin. ( shift above left 4 bits to work on Timer 1 )

-jg

urls are here :

formatting link

formatting link

-jg

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required