Hackster.io is the community for hardware hackers. Learn, build and share your projects. Learn more.

Think this is a cool project? Join to receive news about it and hundreds of others: GithubGoogle+ or

Catweazle Mini
Featured on March 04, 2014

The smallest ARM Cortex M0+ board in the world

Showcase

The smallest ARM platform in the world

This is the Catweazle Mini, a Trinket type embedded platform.

The main difference to the AVR Trinket is that this one runs an NXP LPC810 ARM Cortex M0+ MCU at 30MHz.

Yes, that is a real 32-bit ARM platform and the LPC chip costs only $1 !!!

The Catweazle Mini has 6 general purpose IO, 4K flash, 1K SRAM, 2 Timers, SPI, I2C and UART.


The built in bootloader enables flash programming with a serial FTDI cable. A jumper sets it in ISP mode.
The board also contains a 3.3v LDO regulator and a red LED for that blinky test.

Yes, it runs at 3.3v but the IO ports are 5v tolerant.

The development IDE is the LPCXpresso or my personal favorite the mbed online compiler.
The mbed compiler requires no installation on your PC and runs entirely online.

To upload hex-files to the Catweazle you can use the Flash Magic Tool and a FTDI type USB TTL Serial cable.

This is a DIY version built on perfboard that you can put together yourself.
It has pinheaders under the chip for easy breadboarding.

I'm going to sell the Catweazle Mini and the larger Catweazle (16K flash, 4K SRAM, 18 GPIO) as prebuilt boards on my website.

The schematic

Uploading code

Uploading code to the board is done with the free Flash Magic found at www.flashmagictool.com

This program uploads an Intel HEX file to the board over a FTDI USB/TTL Serial cable using only the Rx and Tx lines.

Choose the COM port for the cable, 115200baud as the speed and 12MHz for the oscillator.
The bootloader runs at 12MHz default.

The bootloader jumper needs to be bridged before powering the board to set the MCU in bootloader mode. 

It has a Von Neuman architecture so it can run code uploaded to SRAM and testing does not have to be flashed.

Flash Magic

Not Wiring

The code example is not really Arduino code but an LPCXpresso C++ project with definitions to make the Arduino Blink code example compile.

The compiled code is about 750bytes.

It's still smaller than the Blink compiled on an AVR platform.
This is because the 32-bit ARM has a more efficient code than the 8-bit AVR.

The Catweazle can run code at a blistering speed compared to an AVR making it a great option for DSP or speed demanding applications. It can do a 32x32bit multiplication in a single clockcycle !!!

Sure, It does not have an onboard ADC converter for analog signals but it has an analog comparator that can do delta/sigma conversations in higher a resolution than any AVR chip is capable of. At CD-Audio speed.

The Arduino Blink example

  Upload code file
//**************************************************************************/
//    CatWeazle main.c with Arduino style definitions
//**************************************************************************/

#include "LPC8xx.h"
#include "gpio.h"
#include "mrt.h"
#define INPUT 0
#define OUTPUT 1
#define HIGH 1
#define LOW 0

void pinMode(uint8_t pin, uint8_t mode) {
 if (mode==1) {
	 LPC_GPIO_PORT->DIR0 |= (1 << pin);
 }
 else {
	 LPC_GPIO_PORT->DIR0 &= (0xffffffff-(1 << pin));
 }
}

void digitalWrite(uint8_t pin, uint8_t mode) {
	if (mode==1) {
		LPC_GPIO_PORT->SET0 = 1 << pin;
	 }
	 else {
		LPC_GPIO_PORT->CLR0 = 1 << pin;
	 }
}

void delay(uint32_t millis) {
	mrtDelay(millis);
}



//-------------------------- Arduino section --------------------------------
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
 */

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 2;

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

//-------------------------------------------------------------------------------------------



int main(void)
{
  /* Initialise the GPIO block */
  gpioInit();
  /* Configure the multi-rate timer for 1ms ticks */
  mrtInit(__SYSTEM_CLOCK/1000);
  LPC_SWM->PINENABLE0 = 0xffffffffUL; //All 6 GPIO enabled
  setup();
  while(1)
  {
      loop();
  }
}
The updates you made will appear after you refresh the page.
//**************************************************************************/ // CatWeazle main.c with Arduino style definitions //**************************************************************************/ #include "LPC8xx.h" #include "gpio.h" #include "mrt.h" #define INPUT 0 #define OUTPUT 1 #define HIGH 1 #define LOW 0 void pinMode(uint8_t pin, uint8_t mode) { if (mode==1) { LPC_GPIO_PORT->DIR0 |= (1 << pin); } else { LPC_GPIO_PORT->DIR0 &= (0xffffffff-(1 << pin)); } } void digitalWrite(uint8_t pin, uint8_t mode) { if (mode==1) { LPC_GPIO_PORT->SET0 = 1 << pin; } else { LPC_GPIO_PORT->CLR0 = 1 << pin; } } void delay(uint32_t millis) { mrtDelay(millis); } //-------------------------- Arduino section -------------------------------- /* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 2; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second } //------------------------------------------------------------------------------------------- int main(void) { /* Initialise the GPIO block */ gpioInit(); /* Configure the multi-rate timer for 1ms ticks */ mrtInit(__SYSTEM_CLOCK/1000); LPC_SWM->PINENABLE0 = 0xffffffffUL; //All 6 GPIO enabled setup(); while(1) { loop(); } }
the_arduino_blink_example.cpp

Blink

The Catweazle

The larger board, The Catweazle, made it's first blink today.

It has 16K flash, 4K SRAM, an external 2Mbyte flash memory and 18 GPIO on the same small board size as the mini.
It uses the 32-bit NXP LPC812 ARM Cortex M0+ MCU at 30MHz.

The 2Mbyte extra flash makes it possible to store and run very large code for logging and RTOS applications.

Very fun toys to develop on.



The Catweazle vs. Mini

The most fun thing

I have found a PCB manufacturer in Sweden that will make my boards. Karlstad actually
Thanks Sebastian at PCBmanu.com

That is really great.

Made in Sweden full out and not in China.


The Catweazle PCB

Here is the SMT PCB for the Catweazle.

Its in Nano-style for use on a breadboard.
It also has an onboard 2Mbyte flash for code and loggingdata.

I haven't done it in the Uno footprint yet because I need to know the interest in it before ordering PCBs.

I plan to sell this pre mounted for $25.

That will include the USB/FTDI cable.


The PCB

Buy the Catweazle

I'm proud to announce that you can now buy the Catweazle Premounted PCB or kit with all the components including a USB-TTL Serial cable.

You can also preorder the Catweazle Mini and have it shipped when the PCB is available.
The Mini also includes the USB-TTL Serial cable.

The prices includes international shipping.

Buy the Catweazle

Order the Catweazle

The kit contains the chip and supporting components. Shipping is included in the price.

Preorder the Catweazle Mini

Order the Catweazle

Preordering the Catweazle Mini includes the PCB, the LPC810, the components and a USB-TTL Serial cable. Shipping is included in the price.

Now runs at 48MHz

With one waitstate on the flash it now runs at 48MHz on the internal oscillator like the Teensy.

I tried it at 72MHz and it runs but the SRAM and IO sometimes return false bits.
There is no way to add waitstates to the internal RAM.

IRL

Mounted and tested

Metadata

Created on 2014-02-27
Users who respect this project

Comments and feedback

omar
omar

So small with so many possibilities in 1 second!

9 months ago
Wellington Sales
Wellington Sales

Very good job!

9 months ago
ProjectsPlatformsHacker spacesResources Add projectSign up / Login

Share

Embed the widget on your own site

Add the following snippet to your HTML:

Catweazle Mini

Catweazle Mini

by Jan Ostman

The smallest ARM Cortex M0+ board in the world


4.5k 8 2