I'm attempting to create a 3-phase PWM signal, which would generally use 6 dual edge triggered PWMs. Is there a way to do this using 3 single edge PWMs? If so, please point me to some examples; or provide an explanation. Thanks
In what way is your new thread different from the thread you already had? http://www.keil.com/forum/18373
I had forgotten I had posted here prior - sorry. Any thoughts on my question?
Remember that the 23xx have quite capable timers with multiple match registers for every timer, and each match register have its own settings for what action to perform - set, clear, toggle or nothing.
Do you feel the capabilities are not enough?
By the way - how many other forums did you cross-post to?
I'm using the LPC2368, and if I use the 6 PWMs I have none remaining. I've figured a way to save one, by using single edge on the first phase (of the three phases). However, I need a couple more PWMs for other tasks. Maybe there's a way to add delays and invert signals to accomplish the task. I have to think through it some more. At this point, this is a conceptual exercise - I'll worry about implementation once I have a workable plan. Thanks for the response, and do you have any ideas?
I haven't checked the specific pin routing and potential collisions, but are you aware that the LPC23xx don't just have the PWM module but also four quite powerful timers? Each of the four timers supports four match registers, some of which can drive match output pins. Each match can set the match pin high, low or toggle it.
Didn't my previous post make you take a closer look at the timers in the user manual?
Thanks - saw your post. I'm not familiar with the timers, but the LCD requires ac signals for control. Can the timers generate switchable, square wave outputs (in the same manner as the PWMs)?
The match pins can do quite a lot of nice things.
If you read the user manual for the PWM, you'll see these quotes: "May be used as a standard timer if the PWM mode is not enabled." "The PWM is based on the standard Timer block and inherits all of its features, although only the PWM function is pinned out on the LPC2300."
That should give a bit of indication that it is meaningful to also take a look at the four timers.
The timers can, with the match pins, be used for PWM output. And in reverse, the capture registers can be used to instead capture/decode PWM input.
When starting with a new processor, it's always a good idea to read through all sections of the datasheet/users manual, just to make sure that you pick up all relevant parts for your project. This helps you save costs for external hardware. And reduces probability of extra prototype spins because you didn't use the optimal processor pins for different functions.
It's often enough to do the detailed read-through when it's time to write the code, but long before that you should have scanned through all sections to see what important features or notes that relates to your project. With bad luck (or in reality not) you may find a critical problem when scanning through the documentation - a tiny little detail that makes the processor not suitable for the project even if it initially looked promising. It's much more expensive to figure out a need to replace the processor - or redesign the outside hardware - first when you are stuck.
Thanks for the information. Unfortunately the uC was chosen prior to my involvement. I think a majority of the problem is my lack of understanding/experience with utilizing the PWMs/Timers; and maneuvering around an RTOS. I'm not an embedded engineer, but am in a situation where I have to "play one on TV". I'm really enjoying it, though. Do you have any recommendations for improving my knowledge-base (preferably something that is organized and structured)? The user manual has a lot of great information, but the prerequisite for grasping it quickly is a wealth of experience.
You will find specific examples as to how to exploit each peripheral of your processor by download NXP's code bundle (see their site). I must warn you: their code is not top notch, but you can still learn from it, in conjunction with the user manual.
I'm not looking to be spoon-fed. What I am looking for is something that is structured and organized in such a way as to make the process as efficient as possible. When I do it the way you're recommending (which may be the only way), I end up bouncing around from document to document. Thanks for the suggestion, though.