Jump to content
Sign in to follow this  

PWM Not working in TM4C1294XL

Recommended Posts

I am uploading the fade example of energia to the tiva t4mc1294 connected launchpad but the LED is not fading. It is just blinking.

I have also connected the pwm output to motor drivers but the speed of the motors are not changing. When I check the voltage of the pin with my multimeter, I get 0.66v. 

I have tried the fade example on different pins like PF2, PF3(pins marked for analogWrite in launchpad reference) but the results are same.

Here is the code for the fade example, given as reference.

int brightness = 0;    // how bright the LED is
int fadeAmount = 5;    // how many points to fade the LED by

void setup()  { 
  // declare pin 14 to be an output:
  pinMode(PF_3, OUTPUT);

void loop()  { 
  // set the brightness of pin 9:
  analogWrite(PF_3, brightness);    

  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade: 
  if (brightness == 0 || brightness == 255) {
    fadeAmount = -fadeAmount ; 
  // wait for 30 milliseconds to see the dimming effect    

Share this post

Link to post
Share on other sites

@@sgang007, PF_3 does not support analogWrite() not does any of the pins to which the LED's are connected. You can find out which pins support analogWrite() and possibly other functions by looking them up in pin diagram posted here: http://energia.nu/pin-maps/guide_tm4c129launchpad/

You will see that each pin is color coded with the functions supported for each color listed in the diagram on the right.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this