32 bit Microcontoler

See ZPUino.

Might fit your needs. :slight_smile:

From what I've seen, the first things you run up against when getting advanced with Arduino is RAM, flash memory, and GPIO lines. I feel like the Sanguino is a good next step.

I don't know if I've even HEARD OF a project in the Arduino universe that was primarily constrained by CPU data bus width.

I don't know if I've even HEARD OF a project in the Arduino universe that was primarily constrained by CPU data bus width.

I shows up mainly in overuse of flash memory when doing 32 bit math. For example, the "timer0_overflow_count++" in the arduino timer interrupt code takes about 38 bytes of flash memory. I can't see it taking more than about 14 bytes on a typical RISC processor (without being totally familiar with ARM instructions, which are sometimes weird.) Also in other limitations; the gcc C compiler for AVR isn't currently capable of dealing with all the program space in a mega2560 for reasons mostly related to the 16bit-ness of pointers.

westfw:

I don't know if I've even HEARD OF a project in the Arduino universe that was primarily constrained by CPU data bus width.

I shows up mainly in overuse of flash memory when doing 32 bit math. For example, the "timer0_overflow_count++" in the arduino timer interrupt code takes about 38 bytes of flash memory. I can't see it taking more than about 14 bytes on a typical RISC processor (without being totally familiar with ARM instructions, which are sometimes weird.) Also in other limitations; the gcc C compiler for AVR isn't currently capable of dealing with all the program space in a mega2560 for reasons mostly related to the 16bit-ness of pointers.

Ups...
And does it address the entire space on the external memory bus?

Have you got a bit more info on this? I'm planning on building a board with that processor, and if it doesn't run the complete 256k of space, it's gonna suck. :frowning:

Is this helpful?
http://www.cbxdragbike.com/arduino/new/

no; the issues I remember were in the compiler, not the bootloader...

Actually... I can't find a definitive statement on the current state of large code in avr-gcc. There are some comments that function pointers are handled by "trampolining" in newer versions of gcc, which may mean that the only known bug is in C++ constructors.

In case you don't feel that ZPUino is as easy to work with as Arduino is, here's a small example I just uploaded, which interacts with an LCD, a rotary encoder, and some LEDs:

http://www.alvie.com/zpuino/examples.html

Stay tuned for a music player (44100Hz, 2-channel, Stereo, from SD card [wav], 99% in pure software) which I'll be releasing soon. And guess - no external devices needed, the two 16-bit internal SigmaDelta DAC modulators just do the job (and way better than PWM).

Alvie

I can't see it taking more than about 14 bytes on a typical RISC processor (without being totally familiar with ARM instructions, which are sometimes weird.)

@bubulindo: Here's how it goes with ZPU:

im variableaddress ; 1 to 5 bytes, depending on address
loadsp 0 ; Duplicate that address in stack
load ; Load variable value
im 1 ; Load 1 into stack
add ; Add to value
loadsp 4 ; Load saved address 
store ; Store to variable again

That's 11 bytes, worst case, 7 bytes best case.

Álvaro

I think you got the wrong guy... :wink:

KE7GKP:

The maple board is the closest thing I've seen in a 32bit design that trys to duplicate both the Arduino layout and arduino commands.

And along similar lines: much faster CPU and Arduino form-factor (hardware) compatibile:
FEZ Panda II http://www.ghielectronics.com/catalog/product/256
Netduino: http://www.netduino.com/netduino/
And other generally similar microcontroller board products. But none of them are going to be code-compatible with Arduino.

How can those be faster if they use the same core, Arm Cortex M3 and have a super hyper mega huge overhead introduced by the super stupid .Net framework?

I can go to the Maple store and buy it, I can download its IDE and compile code, so, how can I not use it?
In fact actually in working with 80Mhz PIC32's, so its a wee little faster than all those 72Mhz ARMs lol

You're right, that was meant for @westfw. :slight_smile:

Alvie

You're right, that was meant for @westfw.

So the FPGA implementation of the ZPU is essentially a 32bit CPU that interprets an 8bit instruction stream? Interesting. At 4 or more clocks per instruction, it's going to have a difficult time competing with even an AVR, except when the 32bit-ness improves things a great deal...

The problem I usually have with FPGA based CPUs is that their power-consumption really sucks compared to a dedicated microcontroller. The spartan 3e series needed here runs 75+ mA quiescent ?! (I couldn't figure out from the datasheet how much it would dissipate in "typical" operation; I guess that's too complicated for an FPGA. ("use XPower Estimator or XPower Analyzer that is part of the development environment.")

Well, ZPUino Premium Core (which is published right now) uses mostly 2-clock cycles per instruction, and ZPUino Extreme will do mostly 1 cycle/instruction.

See this post ZPUino: ZPU core comparison for a core overview.

Also don't forget it is able to run at significant higher speeds even in low-end FPGA (right now 96MHz).

And yes, power consumption varies a lot, and you have to take special care about it. Gated clocks are a solution (ie, disable parts of the design when you don't use them). I'm not paying yet attention to that, but power optimizations are in my to-do list.

Also you have the power to put dedicated hardware inside the FPGA, thus saving on external components (and in some scenarios even power).

Álvaro

Can you get arduino-like PWM or serial on "any" pin (up to ~20 pins, anyway) by dynamically changing the definition of the logic on each pin? That would be neat. I've been looking at Cypress's PSoC chips with similar ideas... ANY arduino-specific hardware customization would be ... interesting. (PWM output is a good example. Implementing 20 pins worth of arduino-style analogWrite functionality ought to be MUCH easier than implementing 20 pins worth of general purpose timer/counter module. (to start with, you'd only need one counter!)

Can you get arduino-like PWM or serial on "any" pin (up to ~20 pins, anyway) by dynamically changing the definition of the logic on each pin?

Yes. Most IO devices (timers, SPI, ADCSPI) can be bound to any pin. This is very similar to microchip PPS.

Álvaro

I meant 20 PWM pins simultaneously. Also moving a limited number to your choice of pins is also an interesting idea.

I meant 20 PWM pins simultaneously

Yes, a single device output can map to more than one pin. Basically each "device input" has a muxer which selects the input pin, and each output pin has a
muxer which selects the "device output".

What's more interesting is that you might change this in runtime, without need to rebuild anything.

Álvaro

http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,719,895&Prod=CHIPKIT-MAX32
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,719,896&Prod=CHIPKIT-UNO32
8)
p.