Jump to content
43oh

Recommended Posts

<p>Hello,</p>

<p> </p>

<p>For a certain experiment I need to do, I need to generate some pulses, as fast as possible.</p>

<p> </p>

<p>For beginning I need a square wave, basically, so I wrote the following code: (which does not work, according to my scope)</p>

<p> </p>

<div>#include <Energia.h></div>

<div>#include "inc/lm4f120h5qr.h"</div>

<div>#include "driverlib/gpio.h"</div>

<div> </div>

<div>void setup() {</div>

<div>  GPIOPadConfigSet(GPIO_PORTA_BASE, 0xff, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);  </div>

<div>  GPIODirModeSet(GPIO_PORTA_BASE, 0xff, GPIO_DIR_MODE_OUT);</div>

<div>}</div>

<div> </div>

<div>void loop()</div>

<div>{</div>

<div>  GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_6, LOW);</div>

<div>  GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_6, HIGH);  </div>

<div>}</div>

<div> </div>

<div>Basically I want to turn on and off gpio_pin_6 as fast as possible?</div>

<div> </div>

<div>Any ideas/recomendations/help greatly appreciated,</div>

<div> </div>

<div>Best regards,</div>

<div>C.A.</div>

<p> </p>

<p> </p>

 

View the full article on Stellarisiti. 43oh pulls Stellarisiti Energia posts, so that members do not miss out questions. Please bear with this arrangement for now. Thanks!

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
×
×
  • Create New...