P89LPC932 CCU tutorial

Mar 06, 2006 5 Replies

I am trying to get my head around the plethora of registers in the 932's CCU so I can get a couple of PWM outputs going. The data sheet is not very clear and the Keil code example I have found helps a bit but I am looking for a deeper understanding and clearer description of the CCU. Anyone know of a tutorial or heavily commented code examples?



Ian


Hello Ian,

there is a code generator tool called code architect that you can find at

formatting link
This generates simply code and helps to get started.

Schwob

Ian Bell wrote:

Thanks for that but I already knew about that and tried it. Not much use I am afraid.

Ian

Hi Ian, I've been in a similar situation over the last few weeks. I got mine working today after many hours/days/weeks of frustration.

Have you checked the errata sheet for the '932? There are several issues with the CCU that will stop it working as per the datasheet. I found that the order of initializing registers is important as well. Are you using Timer2 in basic or sym/asym mode?

I'd be happy to exchange code snippets if you like. I'm no expert with the '932 or 'C', just a very determined old hack.

Cheers John

I am hoping to use it in sym/asym mode to produce PWM to drive a couple of DC motors

I found an errata sheet from around 2004 which as you say mentioned several problems with the CCU, but I can no longer locate it on the Philips web site - good job I downloaded it.

I have emailed Philips tech support specifically about setting up the 10 bit prescaler and today I finally got a reply - which they cannot answer the question and I should phone my nearest sales office!

I would love to trade code snippets. I am a dyed in the wool assembler man myself as far as the 8051 is concerned but I use C for PC based projects so that would be fine too

Ian

Hi Ian, I have sent an email direct to you, wasn't sure about the attachment rules for this ng.

John

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required