Jump to content
43oh

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:
  //analogFrequency(FREQ);
  pinMode(PF_3, OUTPUT);
  pinMode(PF_2,OUTPUT);
  Serial.begin(9600);
} 

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

  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;
  Serial.print(brightness);

  // 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    
  delay(30);                            
}
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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...