Search the Community
Showing results for tags 'digitalWrite'.
-
Hello, For a certain experiment I need to do, I need to generate some pulses, as fast as possible. For beginning I need a square wave, basically, so I wrote the following code: (which does not work, according to my scope) #include <Energia.h> #include "inc/lm4f120h5qr.h" #include "driverlib/gpio.h" void setup() { GPIOPadConfigSet(GPIO_PORTA_BASE, 0xff, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); GPIODirModeSet(GPIO_PORTA_BASE, 0xff, GPIO_DIR_MODE_OUT); } void loop() { GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_6, LOW); GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_6, HIGH); }
-
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