Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 9th May 2008, 06:53 PM   #1 (permalink)
Experienced Member
 
 
Join Date: Jan 2007
Location: Norway
Posts: 110
johankj is on a distinguished road
Default Multiple PWMs, how?

I've seen various projects that have programmed a PIC to have multiple independent(maybe?) PWM outputs, even thought the chips only have one in hardware (did I see one with none?).

Does anyone know how this is done?
johankj is offline   Reply With Quote
Old 9th May 2008, 06:56 PM   #2 (permalink)
Experienced Member
 
 
Join Date: Jan 2007
Location: Toronto, Canada
Posts: 4,121
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

How many do you need?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 9th May 2008, 07:00 PM   #3 (permalink)
Experienced Member
 
 
Join Date: Jan 2007
Location: Norway
Posts: 110
johankj is on a distinguished road
Default

Erch... I dunno... At least 3 for an RGB idea I have (moodlight-thing), but the more the merrier.

BTW, that was hella-fast!
johankj is offline   Reply With Quote
Old 9th May 2008, 07:03 PM   #4 (permalink)
Experienced Member
 
 
Join Date: Jan 2007
Location: Toronto, Canada
Posts: 4,121
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

For LEDs a simple software PWM is plenty.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 9th May 2008, 07:05 PM   #5 (permalink)
Experienced Member
 
 
Join Date: Jan 2007
Location: Norway
Posts: 110
johankj is on a distinguished road
Default

Yarh, but how? Does it have nothing to do with the hardware PWM then? And doesn't it tie up all the processing time?
johankj is offline   Reply With Quote
Old 9th May 2008, 07:07 PM   #6 (permalink)
Experienced Member
 
 
Join Date: Jan 2007
Location: Toronto, Canada
Posts: 4,121
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

It can be all interrupt driven. Lots of code samples on the net I'm sure.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 9th May 2008, 07:09 PM   #7 (permalink)
Experienced Member
 
 
Join Date: Jan 2007
Location: Norway
Posts: 110
johankj is on a distinguished road
Default

AAAHH!! I find it, I find it! No worry.

There is a technical document from Microchip themselves. AN1074 - Software PWM Generation for LED Dimming and RGB Color Applications.
johankj is offline   Reply With Quote
Old 9th May 2008, 07:09 PM   #8 (permalink)
Experienced Member
 
 
Join Date: Jan 2007
Location: Norway
Posts: 110
johankj is on a distinguished road
Default

Looks like I answered my own question...
johankj is offline   Reply With Quote
Old 9th May 2008, 07:32 PM   #9 (permalink)
Experienced Member
 
 
Join Date: Jan 2007
Location: Toronto, Canada
Posts: 4,121
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

The App notes are really handy.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 9th May 2008, 08:15 PM   #10 (permalink)
3v0
Moderator
 
Join Date: Jul 2006
Location: USA
Posts: 2,568
3v0 is a name known to all3v0 is a name known to all3v0 is a name known to all3v0 is a name known to all3v0 is a name known to all3v0 is a name known to all
Default

If you want several hardware PWM's look at one of my favorites the 18F1330. It also has a PLL that works with the internal 8MHz clock that bumps it up to 32MHz.
__________________
To control the world from your PC with USB I suggest USB Bit Wacker

3v0's Tutorials for ABSOLUTE BEGINNER
C, PIC 18F, MPLABŪ and MCC18 Compiler
3v0 is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Latest
Run multiple motors off a single power source? & Slow them down? Skara General Electronics Chat 16 22nd April 2008 09:49 PM
Multiple Transmitters To One Reciever cyprio7 General Electronics Chat 11 22nd April 2008 04:19 PM
single voltage source equivalent of multiple voltage sources sstimuluss General Electronics Chat 29 31st January 2007 09:33 PM
Microcontroller interfacing multiple Relays prevravanth Micro Controllers 6 14th December 2006 04:07 PM
PIC and multiple serial devices Oznog Micro Controllers 14 26th May 2005 08:18 AM


All times are GMT. The time now is 02:19 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0 (Unregistered)