Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Yes!! this is just what i was needing... thanks a lot for your help.
  2. I am doind a DC-AC inverter, and i need to toggle two pins at the same time, but i need a 1us accuracy, but for example, there is a 3us delay between a HIGH and a LOW for Q1 and Q2, thar are always complementary. This is my code: //Primer semiciclo //2)Q1 y Q4 digitalWrite(Q2,LOW); digitalWrite(Q3,LOW); //Q2 y Q3 apagado //delayMicroseconds(td); //Tiempo muerto digitalWrite(Q1,HIGH); digitalWrite(Q4,HIGH); //Q1 y Q4 ENCENDIDO delayMicroseconds(duty); //Duracion del semiciclo (T/4) //1)Q2 y Q4 digitalWrite(Q3,LOW); digitalWrite(Q1,LOW); //Q1 y Q3 apag
  3. Oh!! i didn't know about that... i was planning to use all p2.x ports to get analogwrite... After i took a look into the link and the pin capabilities... i have a new question. For my project, i use a l293D, with 4 lines controlling two dc motors. When i want to run straight, i put two pins in analogWrite(pinX,128) and other two in 0, when i want to turn, i change one motor to 255 and other to 128, but in a brief experiment, i see that all p2.x have the same pwm, the same duty cycle... is there any way to get a different PWM in some pins of the same port?
  4. Hi! i am making an small robot, i'm using 2 DC motors and 2 servo motors. Now, i want that the DC motors get a 20Khz PWM signal, but, in the default operation mode it is about 490Hz. I was looking into the wiring_analog.h to see if there was any chance to modify some code to get this PWM frequency. And my other question is: if i want to drive two servos (with servo.h) is there any "interference" or warning to use it at the same time that "analogWrite"? Thanks a lot for your help.
  5. Hi. I'm new in this forum... and i want to know if Energia can work with the MSP430G2253 in PW28 version, so i can get more I/O pins... thanks for your help. :thumbup:
  • Create New...