Jump to content

fyaman66

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. fyaman66

    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. Hello, @Fmilburn Thanks alot. I found the solution in the link you posted 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); }
  3. Hi, i use the delays to determine the frequency of 50hz (total delay = 20us -> 1/50hz) and also to determine the duty cycle between 5% - 10% (this is the range where the bldc Motor starts to spin)
  4. Hello, I wrote a very simple PWM Code for my Brushless DC Motor (incl. ESC) and it works very good (I don't use any Potentiometers.): int motorPin = PF_1; void setup() { pinMode(motorPin, OUTPUT); } void loop() { analogWrite(motorPin, HIGH); delayMicroseconds(1000); analogWrite(motorPin, LOW); delayMicroseconds(19000); } I need 50Hz (1/50=20us). The Motor breaks when the first delay is "1000us" and the second is "19000us". The Motor arrives highspeed when the first delay is "2000us" and the second is "18000us" So my dutycycle should be between 5 - 10% What i need is this PWM Signal without any delays. Is there any way to create a PWM without delays? Thank you very much. greetings, Yaman
×