Best Microcontroller Projects


XML RSS
What is this?
Add to My Yahoo!
Add to My MSN
Add to Google

Home
LCD-KEYS OnePort
Digital Downloads
C Course
State Machines
Interrupt Secrets
Schematic Tool
PIC Introduction
PIC Programming
PIC Programmers
PIC Compilers
PIC Projects
Tips & Techniques
Store
My SECRET
Oscilloscopes
Contact Me
About Me
Terms of Use
Search This Site
Freebies
Articles
Problem?-Solution
MicroBlog
Books
Resource Links
Site Map
Your Projects
Video du Jour
Rant/Rave
Privacy Policy

I use and
recommend Firefox
for the best internet
browsing experience. Click below for your
free copy today:

CLICK THE IMAGE:


Note: I find it faster
and easier to use and
it has great plugins.  

It even imports all your current
browser settings!

There's no risk as your existing browser is not affected in any way - you can just choose which one to use.


Find Out How This
Site Works
Like any engineering problem with the right tools it's Easy.
CLICK HERE 

Social Bookmarking
Click & Add:
add to BlinkBlink
add to Del.icio.usDel.icio.us
add to DiggDigg
add to FurlFurl
add to GoogleGoogle
add to SimpySimpy
add to SpurlSpurl
Bookmark at TechnoratiTechnorati
add to YahooY! MyWeb
Find out Why social bookmarking is
Useful For You.

Readers comments

"I wanted to thank
you so so so much
for all the information
you have provided in
your site it's

SUPERB and FANTASTIC."


- Ranish Pottath


"This site really is
the best and my favorite.
I find here many useful
projects and tips."

- Milan

bursach<at>gmail.com

Learn PIC C Now
Wondering how to program your next project using C and need a great start?


"Awesome site,
very, very easy and nice
to navigate!"


- Matt
matt_tr<at>
wolf359.cjb.net


"I am a newbie to PIC
and I wanted to say
 how great your
site has been for me."


- Dave

de_scott<at>bellsouth.net

Learn Microcontrollers
"Interested in
Microcontrollers?"


Sign up for The
Free 7 day guide:

FREE GUIDE : CLICK HERE

"Your site is a great
and perfect work.
congratulations."


- Suresh

integratredinfosys<at>
yahoo.com

"I couldn't find the correct
words to define
yourweb site.

Very useful, uncovered,
honest and clear.

Thanks so much for
your time and works.
Regards."


- Anon





Interrupt Generated PWM

This page shows you how you can create an interrupt generated PWM signal using internal timer peripherals.

PWM is Pulse Width Modulation : for more pwm pic notes click here.

"PWM PIC Interrupt"



You can create a software PWM signal if you have run out of internal PWM peripherals or your microcontroller does not have a built in PWM peripheral.

There are two methods both using timers:

 1.Using one timer.
 2.Using two timers

First Method

The first method uses a timer to time the resolution periods of the PWM so if you needed a PWM signal with 20 distinct states (representing the duty cycle) then 1/20% duty cycle would have the time period measured by the timer.

This method uses lots of processing power and produces a fairly poor PWM signal - but if you only have one timer available it does work.  

Performance is not good but the performance you need depends on the application e.g. for a light dimmer - this method works as well as any other.

Note: For this interrupt generated pwm method the maximum frequency of the PWM is low and you can not increase it too much as the timer period becomes too small and the processor begins to spend all its time processing the interrupt.

Click here for a source code example of the single timer: interrupt generated pwm.

Second method

The second method is more useful as it does not place such a load on the processor but it does use up two timer resources.

The basic idea is to time the PWM period by using the first timer to measure clock cycles for this period and then generate an interrupt.

When this interrupt fires the output is set high (start of the PWM signal).

At this point the second timer is setup (to define the duty cycle of the PWM signal) and then its interrupt enabled.  

when the second interrupt fires the output is set low.

This generates the PWM signal with minimal processor loading.

Click here for a source code example of the double timer:  interrupt generated pwm.


Don't forget to Sign Up for your

Microcontroller Newsletter

With "Essential tips and techniques",

..."New Site Info" and more...

Including a free project :

How to drive an LCD and 12key keypad using "Only One 8 Bit Port" with no interface logic!...

(Works for any microcontroller)

This costs you : Nothing...
Just fill out the form below and you'll get full C source code and project schematic and description.



Email

Name

Then

Don't worry -- your e-mail address is totally secure.
I promise to use it only to send you MicroZine.
Google
 
  Best Microcontroller projects.