Jump to content
43oh

Ananthan

Members
  • Content Count

    9
  • Joined

  • Last visited

About Ananthan

  • Rank
    Noob Class

Profile Information

  • Interests
    Electronics
  1. Hi, I think that some of my pins are ruined. I am not getting the output from them. I am pretty sure that the code is not faulty since when I saw it was not working in Keil, I tried the code in Energia and as you know there is not much room for error in that. void setup() { pinMode(PA_5,OUTPUT); } void loop() { digitalWrite(PA_5,HIGH); } This is not working. I replaced PA_5 with PA_2, and connected the wire from PA5 to PA2, and did nothing else to the hardware. Working. Is there ANY other explanation than a ruined board? also the same thing with PB_7. these are the two that I no
  2. Yes that was the trouble. Thanks.
  3. Thanks a lot for your answer. I'll take care that I provide with more information for all the future posts.
  4. Hi, I am trying to use the analog write function on energia and am having trouble. When I use the function on the inbuilt LEDs everything is working fine but when I use it on external circuits, if I use analogWrite(255)(the maximum) the led is staying on with the maximum brightness as it supposed to but for any other values, its off. In the example codes there is one which increases and decreases the brightness of the led periodically. For the in-built LED its working fine but for others, when the brightness is supposed to be maximum, the LED is staying on and all other time its off. Any help
  5. Actually I think that should be there. The statement says to wait till the data register turns either 1 or 0 as set by the sensor.
  6. I enabled DEN and all but I didn't DR2R registers. I'll try it. Thanks for replaying.
  7. Hi I am trying to connect an ultrasonic sensor to the launchpad but am having trouble writing the program in Keil uvision This is the code is Energia and this is working perfectly. pinMode(pingPin, OUTPUT); digitalWrite(pingPin, LOW); delayMicroseconds(2); //setting low o/p for sometime to ensure a clean burst digitalWrite(pingPin, HIGH); //sending a pulse of 5u Sec delayMicroseconds(5); digitalWrite(pingPin, LOW); pinMode(pingPin, INPUT); duration = pulseIn(pingPin, HIGH); Now this is equvalant code I wrote in c for Keil. GPIO_PORTB_DIR_R |
  8. Hi I am new to programming with Energia and have trouble with analogWrite(). I am using TI's LM4F Stellaris board if I write the code like this, void setup() { pinMode(PF_2,OUTPUT); } void loop() { analogWrite(PF_2,125); } As I understand it, the built-in LED should turn on with a moderate brightness, right? but for all the values expect 0 the LED is staying on with a constant brightness(even for 10). Is there something wrong with the code, Should I do some additional setup before I can use the LED or something? Thanks
  9. Hi I am new to programming and am a bit confused with pulseIn function used for the ultrasonic sensor.I am unging texas Instrumesnts LM4F. The statement is duration = pulseIn(PB_0, HIGH); what does this command do? as in stores the time taken to turn the PB_0 to become high or stores the time PB_0 stays in the high mode? Thanks.
×
×
  • Create New...