Go Down

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

janost

#15
Mar 11, 2014, 09:44 pm Last Edit: Mar 11, 2014, 09:47 pm by janost Reason: 1
1-bit PDM DAC on the LPC.
16-bit 44100Hz resolution.

Nemas problemas :)

Yes, you can do this on ATmega but there won't be any CPU time left over to update the samples.


mrburnette

Quote
1-bit PDM DAC on the LPC.
16-bit 44100Hz resolution.


Impressive.  What's next?
I still think that for the traditional Arduino dude and dudett out in the Ether, that the Catweazle needs to be tied into the Arduino world via a mini-shield or I2C and used as a co-processor... I/O over on the Arduino side and the LPC doing something that would put the Arduino into a deep sweat.  I betcha a really decent MP3 decoder could be a reality.

Ray

janost


Quote
1-bit PDM DAC on the LPC.
16-bit 44100Hz resolution.


Impressive.  What's next?
I still think that for the traditional Arduino dude and dudett out in the Ether, that the Catweazle needs to be tied into the Arduino world via a mini-shield or I2C and used as a co-processor... I/O over on the Arduino side and the LPC doing something that would put the Arduino into a deep sweat.  I betcha a really decent MP3 decoder could be a reality.

Ray


Nice idea.
I'll think of something.

janost

#18
Mar 15, 2014, 04:08 pm Last Edit: Mar 15, 2014, 04:13 pm by janost Reason: 1
Now with the PDM mainloop written in assembly the bitstream runs at 3.6MHz

Still with a 44.1KHz samplerate and 16bit resolution.

Code: [Select]

asm volatile(
"        mov r0,r3 \n"
"        mov r1,#0xA0 \n"
"        lsl    r1,#24   \n"   //r1=0xA000
"        mov r2,#0x10   \n"
"        lsl    r2,#8    \n"
"        add r2,#0x0C   \n" //r2=0x100C
"        add    r1,r2     \n"  //r1=0xA000100C LPC_GPIO_PORT->W0[3]
"        mov r6,#0xFF   \n"
"        lsl    r6,#8    \n"
"        add r6,#0xFF   \n" //r6=0xFFFF
"        mov r5,#0x01 \n"
"        lsl    r5,#16   \n"   //r5=0x00010000
"loop%=: ldrh   r7,[r0,#0]   \n"
"        add r2,r7 \n"  //r2=phacc
" mov r4,r2 \n"
"        and r4, r5 \n"
" str r4, [r1] \n" //LPC_GPIO_PORT->W0[3]
"        and r2, r6 \n"
" b loop%=        \n"
: [dac] "=m" (DAC)
);

janost

#19
Mar 15, 2014, 05:00 pm Last Edit: Mar 15, 2014, 05:34 pm by janost Reason: 1

Quote
1-bit PDM DAC on the LPC.
16-bit 44100Hz resolution.


Impressive.  What's next?
I still think that for the traditional Arduino dude and dudett out in the Ether, that the Catweazle needs to be tied into the Arduino world via a mini-shield or I2C and used as a co-processor... I/O over on the Arduino side and the LPC doing something that would put the Arduino into a deep sweat.  I betcha a really decent MP3 decoder could be a reality.

Ray


It could be done in 2 ways.

Either you upload code the LPC shield through the ISP interface in which case it will remain between boots.

Or create a sketch on the LPC that uploads code to the 1K SRAM and executes it.
In that case you could have some reduced instruction set DSP code to just do your task and return the result.

SInce I've sacrificed the reset pin for an extra GPIO, the only thing that can reset the chip is toggling the power.
So it may be better to run code in the internal sram?

mrburnette

Jan,

Or, a third, the Arduino and the LPC could share a common structure connected via the I2C; said structure hosting the verb, the variables, and the return results. The Arduino would load the structure, send it to the LPC, the ARM would do whatever, and the results would be returned within the same structure for the Arduino to fetch.  So, in the case of MP3, a few verbs would only be necessary.  In the case of a numeric co-processor, we would concoct verbs for floating point routines that would free the Arduino from needing anything but integer math... thus, performance is increased and the overhead of the Arduino doing floats would be eliminated... at least in a hypothetical brain exercise.

Ray

PaulRB


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.



Hi janost,

Just stumbled across this thread. Very interesting. Something like a Pro Mini but with LPC810 or LPC812 would be amazing. Absolutely in agreement that the keys to success would be integration with the Arduino IDE and low price.

Paul

janost

#22
Mar 17, 2014, 02:41 pm Last Edit: Mar 17, 2014, 03:21 pm by janost Reason: 1


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.



Hi janost,

Just stumbled across this thread. Very interesting. Something like a Pro Mini but with LPC810 or LPC812 would be amazing. Absolutely in agreement that the keys to success would be integration with the Arduino IDE and low price.

Paul


I already have a premade PCB for the LPC812.
Its about the size of the pro mini, 39x23mm.

fungus

#23
Mar 17, 2014, 03:30 pm Last Edit: Mar 17, 2014, 05:22 pm by fungus Reason: 1
There's some on OSH park as well...

eg. https://oshpark.com/shared_projects/KhRpkfcU



No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

PaulRB

#24
Mar 17, 2014, 11:45 pm Last Edit: Mar 18, 2014, 12:55 am by PaulRB Reason: 1

I already have a premade PCB for the LPC812.
Its about the size of the pro mini, 39x23mm.


What are the other features of your board? I guess the 4 pin header on the right is for serial comms/programming. What is the 8 pin IC on the left side for? EDIT: sorry, you did say before, its for the 2MB flash.

PaulRB

#25
Mar 18, 2014, 12:01 am Last Edit: Mar 18, 2014, 12:13 am by PaulRB Reason: 1

There's some on OSH park as well...


I guess that's just a standard 16 pin SMD breakout board. But that's all you need, really. There's not much else I would like to put on a small board. As separate serial comms header, like janost's board. A 3.3V regulator to allow flexibility for external power, and to provide regulated power for other components. Maybe LEDs for power, Rx & Tx. A reset button. And a DTR connection on the serial header to implement auto-reset for re-programming. All that familiar Arduino stuff.

I wonder if someone out there, maybe on eBay, offers a SMD build process and would be able to supply LPC812 soldered to a breakout board? Soldering SMD is beyond my skill & eyesight.

Is the LCP812 available in a DIP package? EDIT: no, but LPC111xL is. 28 pin 0.6" width...

Someone must have implemented Wiring in ARM code. It would just need tweaking for the LCP chips.

Then all I would need is to think up an application to use all that processing speed!

PaulRB


And it runs 30MHz on its internal oscillator without external components.

The stuff I just read on nxp's site says 12MHz on the internal oscillator. So if you are doing something that benefits from 32 bit processing, then much faster than ATmega. But otherwise could be slower?

Paul

janost

#27
Mar 18, 2014, 08:43 am Last Edit: Mar 18, 2014, 09:29 am by janost Reason: 1
The 8pin header is for a 2Mbyte SPI flash.
Used for storage or paged code.

There are pads for the ISP jumper or button.and the standard LED on GPIO0_2 (LCPs variant of LED13).

The LPC812 is not available in DIP so I used SOIC 1.27mm.
Smaller but still hand solderable.

I wrote the IO and delay definitions for wiring.
That makes it possible to use pinMode, digitalWrite, digitalRead and delay in Arduino style.

The bootloader runs at 12MHz default to be able to work from 1.8-3.6v
The sketch runs at 40MHz at 3.6v and 30MHz at 3.3v

You can calibrate the internal oscillator like on the ATmega but it uses a PLL and can run up to 240MHz.
Anything higher than 40MHz requires waitstates on the internal flash.

Most of the instructions on ARM are single cycle and the GPIO is single cycle so its really 39DMIPS.
With 32-bits arithmetic that is really DSP power on a small chip.


janost

Yes, I'm selling it premounted with the USB/Serial programming cable.

But you know this site? This will probably get removed.


Go Up