Jump to content

fyaman66

Members
  • Content Count

    4
  • Joined

  • Last visited


Reputation Activity

  1. Like
    fyaman66 got a reaction from Fmilburn in analogWrite() precision question   
    Hello,
     
    Thanks alot. I found the solution 
     
    this worked for me:
     
    #include <wiring_analog.c>
     
    void setup() {
         pinMode(PL_4, OUTPUT);
         PWMWrite(PL_4,1000,50,50); // PWMWrite(PINnumber, number of steps, dutycycle, frequency);
    }
  2. Like
    fyaman66 reacted to L.R.A in TM4C1294XL PWM for BLDC Motor without delays   
    I don't get why you are even using delays.

    Could you please explain a bit on that? Maybe with a time diagram of the signals?
  3. Like
    fyaman66 reacted to Fmilburn in TM4C1294XL PWM for BLDC Motor without delays   
    @@fyaman66
     
    You do not appear to be using analogWrite correctly.  The general form is analogWrite(pin, value) where value is the duty cycle from 0 (off) to 255 (always on).  When you specify HIGH you are making the value 1 or barely on.  It may be you meant to use digitalWrite to create PWM.  As LRA says, using delay doesn't make much sense here.
     
    Read this thread and see if it does what you are trying to do:  http://forum.43oh.com/topic/5765-analogwrite-precision-question/
×
×
  • Create New...