Arduino compatible with lots of IO?

I am currently searching for an Arduino clone with lots of IO. So far I understand that the Arduino Mega and Seeduino Mega would have enough IO. However they have 128k of Flash. This in turn implies that they have slightly different timing for some instructions (e.g. SBIC, SBIS). Since my current project relies on cycle accurate timing this is not really what I want. So I am searching for something like the megas with lots of IO but only 64k Ram. So far I found one board that would match my requirements. However it will cost almost 40 Euros.

http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=26184&flv=1&bereich=&marke=

For the "better" boards with the 128k processors I already found 20 USD boards.

http://www.futurlec.com/ET-AVR_Stamp.shtml

It seems that their old boards featuring a 64 processor would have been what I am searching for. Does anyone know a source where I could get something like the old futurelec boards for a similar price?

  • Udo

This in turn implies that [AVRs with more than 64k of flash] have slightly different timing for some instructions (e.g. SBIC, SBIS).

Does it? I didn't see anything in the datasheet that says that. However, IO registers for your extra IO ports are likely to be beyond the range of ports that SBIS/SBIC can operate on, regardless of the amount of memory, reducing you to LDS/SBRC (2 cycles slower and uses a register.)

There is the RAMP banking registers for accessing RAM or Flash in devices with more than 64k, but that won't affect IO register access on the 1280 since there is far less than 64k of "data" space (The 128k of FLASH is in a separate address space.)

Not really relevant to your question, but the Futurlec board looks cheap compared to this one http://tinyurl.com/y96a3wd

Neither of the 2 boards is an arduino clone (programmable from Arduino IDE and having an arduino bootloader). The closest clones for your needs may be the sanguino http://sanguino.cc/ or duino644 http://timewitharduino.blogspot.com/2009/09/introducing-duino644.html

@florinc With regard to the bootloader: this is true. But this is not really my concern. I could flash the bootloader anytime. However I do CLI arduino because I do not like the IDE. So most of the time I do not use the bootloader anymore. IMHO an ISCP is much more deterministic. So for me Arduino is a nice set of libraries around some AVR boards --> according to my definition almost any AVR board qualifies as an "Arduino" clone.

Right now I use something that would be a "Sanguino" clone. That is it features a 644p. However I am searching for something with more IO but without 128k flash.

@westf With regard to the timing. According to the instruction set manual the SBIS / SBIC timing will be different. I guess this is not due to the register access. However I think it might have to do with the program counter which would need 17 bits. Then again the datasheet says the memory is organized in words, so 16 bits should be sufficient for the program counter. Then my conjecture would be false (and the datasheet unprecise).

So maybe the only way to really find out is to order a board with >128k and test it.

Still I would prefer a 64 or 644 board because migration is always somewhat anoying. Any hints for me?

Looking at the URL printed on the futurelec boards I found the following product:

http://www.ett.co.th/product/03A08.html

So this is ecactly what I would like to have. Does anyone know a distributor for this? Anyway, I will mail them and hope for an answer :slight_smile:

  • Udo

theres a fella who made a shield that has alot of extra pins... forgot the url but he said he had 10 boards made (maybe could get one from him?)

@florinc

By now I figure that

http://jelengar.wordpress.com/2008/11/11/converting-29usd-et-avr-board-to-60-usd-wiring-compatible-board/

implies that these board should be considered Arduino clones even with a more strict definition of Arduino like yours :) This can save quite some cash if you need several boards.

According to the instruction set manual the SBIS / SBIC timing will be different.

I'm still not seeing it. Can you point me to page and section/line numbers or something?

Both the 1280 and 168 datasheet say that SBIS executes in 1, 2 or 3 cycles, and the avr instruction reference says this is for for the don't skip case, skip single-word instruction, and skip double-word instruction cases. A double-word instruction would be something like LDS, containing a full 16bit address, not something dependent on memory size.

@westf:

I refer to http://www.atmel.com/atmel/acrobat/doc0856.pdf

Page 121:

“SBIC – Skip if Bit in I/O Register is Cleared”

Words : 1 (2 bytes)
Cycles : 1 if condition is false (no skip)
2 if condition is true (skip is executed) and the instruction skipped is 1 word
3 if condition is true (skip is executed) and the instruction skipped is 2 words
Cycles XMEGA: 2 if condition is false (no skip)
3 if condition is true (skip is executed) and the instruction skipped is 1 word
4 if condition is true (skip is executed) and the instruction skipped is 2 words

I confess that I do not know the exact definition of XMEGA. But I thought XMEGA is equivalent to >64k flash. If not so, what is the definition of XMEGA? → OK, I looked it up and obviously I was mistaken. So if I get this right an non XMEGA 128 would be OK for me as well.

Perfect.

Then I will order some of the futurelec 128 stamps :slight_smile:

Thanks for this hint. Please correct me if I got it wrong.

-Udo

Version 1 of the Teensy++...

http://www.pjrc.com/teensy/

...used the 90USB646. From the datasheet, the processor looks sort of similar to the 644. They may have a version 1 they're willing to sell.

Just one more question out of curiosity: why should the XMEGAs take one more cycle for this instruction? If it is not size of the adress register, what else would need this extra cycle?

@coding badly: whoa, this one is cool as well. USB included. Maybe I will order one of those as well.

Thanks a lot :)

whoa, this one is cool as well. USB included

The 12Mb/s buffered “Serial” port is nice!

I leave a Teensy dangling from my computer in case I get a hankerin’ to play around with some Arduino code. The thing is exteremely convenient.

By now you have figured out that the "XMEGA" AVRs are more than just the Mega AVRs with more than 64k of memory, and that therefore a "MEGA" Arduino or any of the similar large-AVR based development boards will give you the number of IOs you need without timing penalties.

why should the XMEGAs take one more cycle for this instruction?

One the the Xmega architecture's claims to fame is some sort of independent "io processor" that can operate completely independently of the CPU (even when the CPU is asleep, IIRC.) That implies that there is "stuff" in between the CPU and the IO ports, and it is not surprising that this stuff would slow down normal IO accesses to the ports. (another possibility is that the extra cycle was needed just to allow the faster CPU clock rate. As CPUs get faster, it gets harder to talk to the outside world "at full speed."; a 3GHz Pentium-4 can't toggle an IO pin (even assuming it HAD IO pins) anywhere near 3GHz, and this is actually a common thorn in the side of many of the ARM cpus aimed at the embedded market. Embedded programmers tend to like nice deterministic timing, and the faster CPUs start to add uncertainty in flash access speed, uncertainty in caching of various sorts, uncertainty (or just slowness) in IO port access...)

Aha, sounds reasonable. Until today I was not aware that I can actually have an AVR running at 32 MHz. I have to keep this in mind the next time I run into performance issues. With twice the clock rate I can easily compensate for this cycle :)

Thanks a lot for your helpful hints.

chris mitchell said:

theres a fella who made a shield that has alot of extra pins... forgot the url but he said he had 10 boards made (maybe could get one from him?)

I think you are talking about the Centipede shield that macegr developed?

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1257672398/0

It provides 64 bidirectional I/O using I2C on analog 4 and 5...you can have 64 outputs, or 64 inputs, or any mix of the two.

found it here: http://www.youtube.com/watch?v=E0D8hDt2M60

Nice - but somewhat pointless for me. A bigger controller (as already discussed) will give me the required IO at a better price. And I do not need to stack shields which hopefully makes the whole contraption more reliable.

Thanks anyway, Udo