Go Down

Topic: The Catweazle (Read 26986 times) previous topic - next topic

janost

I have built most of the things one could build on the AVR platform.
Besides being a really good learning start I've reached the roof.

It can work as a PLC and do step by step control of anything.
It can do audio realtime processing. With good programming it can do a realtime filter.

It can do video in realtime.
I've done it in color without difficulty.

But it still has a limit, speed.

So I'm currently doing the same with an NXP LPC812 ARM Cortex M0+ MCU
Thats in the same size as the 328. 16K flash, 4K SRAM, 18 GPIO.

But it's a 32-bit CPU doing a 32x32 multiplication in a single cycle.
And it runs 30MHz on its internal oscillator without external components.

So I put together the Catweazle.

So far it has run all of my projects posted on the Arduino forum without problems.

It ran Mike's 6502 emu code at 4MHz unmodified.

It is as simple as the Arduino to work with but with so much more features.

CrossRoads

And it can make the Kessel Run in less than twelve parsecs. 8)


Got a picture or anything?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

janost


And it can make the Kessel Run in less than twelve parsecs. 8)


Got a picture or anything?


http://www.hackster.io/janost/catweazle-mini?offset=11&ref=explore&ref_id=recent_
but I hate to put it here since I fear it will be removed.

I don't have anything against the Arduino.
I'm even using the 328 as a GPU/IO controller so I think is has a place here.

janost

Don't be afraid to use something else than the Arduino.
I bet all of you use C or C++ and none Assembler.

So using any platform is easy.

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

janost


So few IO tho.


Yes, everyone wants lots of IO.
For what?

The Arduino has 14 digital IO.
The LPC812 has 18.

CrossRoads

Your little chip only has 6 IO. First thing every will need to do is add some external parts to read buttons, drive LEDs or motors or displays or whatever.

Arduino has 20 digital, 6 of which may also be analog inputs.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

janost


Your little chip only has 6 IO. First thing every will need to do is add some external parts to read buttons, drive LEDs or motors or displays or whatever.

Arduino has 20 digital, 6 of which may also be analog inputs.


Yes, the LPC810 is like an ATtiny with its 6 GPIO.
The LPC812 is like an ATmega328 and has 18 GPIO.

Both MCUs have a switch matrix so any GPIO pin can be SPI, I2C, UART or any other of the onboard functions.


fungus

I've done a bit of assembler...but usually C++ is good enough if you mess around a bit and look at the disassembly.

The next step up in "Arduino" world would be a Due. There's also things like the teensy, but they're all very expensive compared to Pro Minis, etc.
Advanced Arduino

mrburnette

Jan and I had this discussion via email over a week ago and I must admit that I was pretty frosty to the idea too... but, I have soften some over the past few days re-thinking the concept.

Essentially it is a 32-bit 'tiny'.  As with the 8-pin tiny85, I/O is always a premium, but I still find myself pulling out one every now and then because it is the right chip for the work.

With the 8-pin ARM chip, one has to consider "code density" and the efficiency that could be gained.  This does not mean that every program will benefit from the 32-bit instruction set, but in some cases the under $1, this little chip may be just right.  I am definitely going to get a few to play with... like Momma always said, "If you don't taste your food, how'd you know you don't like it?"

Ray

janost

Yes, these chips are fun to play with and doesnt reqire an ISP programmer.
Plain UART works with the internal bootloader.

Its also 5v tolerant even if it runs at 1.8 - 3.6v

The only pain is the LPCXpresso IDE that runs Eclipse which can be a bit overvelming.

I would like to add the LPC to the Arduino IDE to make it a bit more simple.
It already has support for ARM compiling because of the DUE.

The blink demo compiles to 764bytes including the wiring.h to be able to use Arduino style IO.
So the 4K flash can contain quite a bit of code.

fungus


The only pain is the LPCXpresso IDE that runs Eclipse which can be a bit overvelming.


One of the big problems with those chips is the toolchain, yes.
Advanced Arduino

janost

#12
Mar 09, 2014, 10:10 pm Last Edit: Mar 09, 2014, 10:49 pm by janost Reason: 1
I changed the internal core clock to 40MHz.
And the core runs stable at Vdd=3.3v

The internal flash access time is 24nS and can run with zero waitstates at 41MHz core clock so its technically not overclocking but it might require the Vdd to be 3.6v

A 32-bit MCU at 40MHz is a quite powerful platform.



janost

Since my Catweazle protoboard (yes, I have ordered PCB :) ) will contain a 2Mbyte flashchip I'm going to prove the raw DSP and processingpower of the NXP LPC8xx.

I'll write an analog synth and sampleplayer on the chip with filters and envelopes.

It could be done on the ATmega aswell but it's much easier with 32-bits and 40MHz.

janost

I coded a simple Delta-Sigma 44.1KHz 16-bit DAC on a single digitalpin with an RC-filter on it.
It can even do stereo 16-bit on 2-pins without a sweat.

It's coded as a reverse state machine.
Main() is used to run the PDM DAC at 1.3MHz and a 44.1KHz ISR is updating the sample data.

Code: [Select]

while(1) {
       if(DAC >= err) {
       digitalWrite(3,HIGH);
       err += 65535-DAC;
         }
       else
         {
       digitalWrite(3,LOW);
         err -= DAC;
         }
       }

Go Up