lpcware

GPIO Speed

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by dirtyBits on Sun Apr 24 07:26:17 MST 2011
I'm trying to figure out the maximum toggle speed supported by LPCXpresso LPC1343.

Here is my code;

#include "LPC13xx.h"
#include "gpio.h"
#include <cr_section_macros.h>
#include <NXP/crp.h>
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

#define LED_PORT 0// Port for led
#define LED_BIT 7// Bit on port for led
#define LED_ON 1// Level to set port to turn on led
#define LED_OFF 0// Level to set port to turn off led

int main(void) {

GPIOInit();
GPIOSetDir( LED_PORT, LED_BIT, 1 );

while(1)
{
  GPIOSetValue( LED_PORT, LED_BIT, LED_ON );
  GPIOSetValue( LED_PORT, LED_BIT, LED_OFF );
}
return 0 ;
}


and here is the output;

[IMG]http://i53.tinypic.com/33w5k5j.jpg[/IMG]

it's < [B]1 MHz[/B] :confused: [SIZE=2][FONT=Arial Black][B]How to speed this up??[/B][/FONT][/SIZE] :cool:

Regards

PS: It's my first program on LPCXpresso and just exploring it. So plz help me learn!

Outcomes