Can a DC motor be controlled with PWM while micro controller execute other operations?

Discussion in 'Embedded Systems and Microcontrollers' started by thar07, Mar 5, 2015.

  1. thar07

    Thread Starter Member

    Jan 3, 2015
    71
    0
    Can a DC motor be controlled with PWM while micro controller execute other operations?


    I want to run the DC at a constant speed ( Using PWM,30% duty cycle while micro controller doing other things.
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Yup.


    If you want to ask if a specific microcontroller can generate a PWM signal in hardware, thus freeing the processor to execute other instructions, a part number is in order - or, you can do what the rest of us will do and look at the datasheet.
     
  3. thar07

    Thread Starter Member

    Jan 3, 2015
    71
    0
    how?
    Can I do with it 8051 ?
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,381
    I am more familiar now with the Picmicro line, they have ECCP modules which are specific to PWM motor control, where several other modules or processes can operate simultaneously.
    Max.
     
    thar07 likes this.
  5. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Arduino can. PIC can.
     
    thar07 likes this.
  6. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,073
    3,856
    The 8051 does not have an on board Pwm module. You will have to find a different Microcontroller or bit-bang a Pwm. If you use the timers on the 8051, you can have a few hundred instruction lines between interupts to adjust the Pwm delays.
     
    thar07 likes this.
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,381
  8. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    It looks like some 8051 implementations have hardware PWM modules, but the basis 8051 doesn't.
     
    thar07 likes this.
Loading...