LPC810 Breakout Board

LPC810 DIP

This basic Arm Cortex-M0+ NXP LPC810 breakout board features a FTDI programming header, USB (mini-B) connector for power only, a LM117-3.3v voltage regulator, power LED, ISP and Reset buttons and a standard 2×5-pin 0.05″ SWD debug connector. All pins are brought out to the edge of the board. Three PCBs from OSHPark.com cost me $6.55 USD delivered via the USPS. Eagle board package and BOM can be downloaded below.

Breakout board running a LED blinky program while powered via USB:
LPC810 BoB v1.00

Eagle Schematic:
LPC810s

Eagle Board:
LPC810BoB

Download the Eagle schematic and board file here.

LPC810BoB BOM
#  description            part#           package
1  microcontroller        LPC810M021JN8   DIP8
2  voltage regulator      LM117-N-3.3     SOT223
3  usb mini-b connector   UX60SC-MB-5ST   ---
4  cortex debug connector 3220-10-0100-00 ---
5  (2) 10uF ceramic cap   ---             0805
6  (2) 10k resistor       ---             0805
7  470 resistor           ---             0805
8  LED                    ---             1206
9  (2) smt tactile switch 147873-2        SMD
10 (3) pin header         ---             1x4, 1x4, 1x6
11 (optional) socket      ---             DIP8

Simple LED Blink program (compiled to 701 bytes):

//----------------------------------------------------------------------------
// Name:    LPC810_Blink.c
// Purpose: LED Flasher
// pin #8 set for LED
//----------------------------------------------------------------------------
#include <stdint.h>

//registers used for gpio & systick setup
#define GPIO_NOT             (*((volatile unsigned int *)(0xA0002300)))
#define GPIO_DIR             (*((volatile unsigned int *)(0xA0002000)))
#define SYSCON_PRESETCTRL    (*((volatile unsigned int *)(0x40048004)))
#define SYSCON_SYSAHBCLKCTRL (*((volatile unsigned int *)(0x40048080)))
#define NVIC_ST_CTRL         (*((volatile unsigned int *)(0xE000E010)))
#define NVIC_ST_RELOAD       (*((volatile unsigned int *)(0xE000E014))) 
#define NVIC_ST_CURRENT      (*((volatile unsigned int *)(0xE000E018))) 
#define SCB_SHP1             (*((volatile unsigned int *)(0xE000ED20)))

//our systick interrupt handler
void SysTick_Handler(void) {
  GPIO_NOT = (1<<0); //toggle led pin
}

int main(void) {
  //enable AHB clock to the GPIO domain
  SYSCON_SYSAHBCLKCTRL |= (1<<6);
  //reset gpio peripheral control
  SYSCON_PRESETCTRL &= ~(1<<10);
  SYSCON_PRESETCTRL |= (1<<10);
  //make gpio #0 pin an output (physical pin #8)
  GPIO_DIR |= (1<<0);

  //set systick clock interrupt reload count
  NVIC_ST_RELOAD = (1200000UL & 0xFFFFFFUL) - 1;
  //set SysTick IRQ to lowest priority
  SCB_SHP1 = 0xC0000000;
  //reset the counter
  NVIC_ST_CURRENT = 0;
  //enable the IRQ and go
  NVIC_ST_CTRL = 0x07;

  //loop forever
  while(1)
    asm("wfi"); //wait for interrupt
}
Advertisements

About Jim Eli

µC experimenter
This entry was posted in Uncategorized and tagged , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s