Next step after ATtiny & ATmega

Go To Last Post
22 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know if this is the best place to put this.

I've been working with the ATtiny25/45/85 and ATmega8/32 for a while doing lots of motion control, lighting, frequency analysis and a little DAQ.

I really like them, but I'm looking for something with a bit more power, I need to do some DSP (I would like ADC & DAC on board min: 12bit) and it needs to be USB compliant (device) it also need to be able to solder them by hand, tqfp etc...

I picked up Xmega128a4u dev board:
http://www.ebay.com/itm/Atmel-AV...

It looks like there isn't lots of guidance on the Xmega series. Would I be better of getting into the 32bit UC3 stuff? or will that be a headache? Can anyone recommend some dev boards if this is a better option?

Then there are also the ARM-based uC's, I assume these may be over my head.

I've working with RPI's and the Teensy 3.0, this stuff is pretty simple and need a platform for industry rather then a hobbyist.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I've working with (..) Teensy 3.0, this stuff is pretty simple

Teensy 3.0 runs ARM Cortex-M4 from Freescale. It is simple but for your "Hello DSP World" I think it is OK.
Quote:
Then there are also the ARM-based uC's, I assume these may be over my head.

Either this is contradictory or you are talking about microprocessors (like iMX), not microcontrollers. There was a topic about iMX in LQFP if you are interested in hand soldering.
k5c12

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It was a little hard to catch onto the xMega chips, but I think I like them. I wonder if I should have skipped them and started using the ARM parts instead.

The largest known prime number: 282589933-1

Without adult supervision.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It was a little hard to catch onto the xMega chips, but I think I like them. I wonder if I should have skipped them and started using the ARM parts instead.

The largest known prime number: 282589933-1

Without adult supervision.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Then there are also the ARM-based uC's, I assume these may be over my head.

You missed a webinar at 3pm GMT this afternoon whichbwas showing that Atmel SAMD20 is just as easy to use ad AVR8. There's a common myth that ARM/Cortex are "too complex" and "out of reach" for 8bit micro developers. Without mincing words this is frankly bollocks. Does anyone here really believe it's more difficult to drive a Ferrari or even a Bugatti Veyron than some kind of Ford compact? To be honest, as someone who drives a Porsche, supercars are actually easier and more fun to drive than some city runabout. Don't believe this nonsense about 32bit being "too complex", you are almost bound to find it more "fun". If you are into numeric processing then favour the Cortex M4 over M0/M3 as it has all the "DSP goodies" onboard.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Being an avid ARM Cortex M4/M3/M0 developer, I happen to fully agree with what Cliff stated above. Learning ARM may have a bit of a learning curve but no more so than any other MCU series. I actually found it harder to learn AVR8 than I did ARM. ARM spoiled me.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Quote:

Then there are also the ARM-based uC's, I assume these may be over my head.

You missed a webinar at 3pm GMT this afternoon whichbwas showing that Atmel SAMD20 is just as easy to use ad AVR8. There's a common myth that ARM/Cortex are "too complex" and "out of reach" for 8bit micro developers. Without mincing words this is frankly bollocks. Does anyone here really believe it's more difficult to drive a Ferrari or even a Bugatti Veyron than some kind of Ford compact? To be honest, as someone who drives a Porsche, supercars are actually easier and more fun to drive than some city runabout. Don't believe this nonsense about 32bit being "too complex", you are almost bound to find it more "fun". If you are into numeric processing then favour the Cortex M4 over M0/M3 as it has all the "DSP goodies" onboard.

Really? I've always had the mentality that the more powerful your micro controller is, the more difficult it will be to deal with. I tend to get steered away if a datasheet is any more then 1000 pages.

Did anyone record this webinar? and what are some good dev boards? Would this be a better option then Xmega?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

larryvc wrote:
Being an avid ARM Cortex M4/M3/M0 developer, I happen to fully agree with what Cliff stated above. Learning ARM may have a bit of a learning curve but no more so than any other MCU series. I actually found it harder to learn AVR8 than I did ARM. ARM spoiled me.

That's awesome, I think I might go this way and skip Xmega all together!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thoughts?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Thoughts?

It's a blue PCB. I can See the words "Atmel" and "X" on there. I'm guessing it's some kind of Xplained board perhaps?

BTW details of the webinar (which @Atmel tweeted about) are here: http://www.element14.com/communi...

As for the 1000 page datasheet thing. You are probably right. A small AVR maybe has 200-300 pages. A complex one has 400-500 pages. An Xmega (when you take both manuals into account) maybe has 500-600. But I just looked at some others and the mega165/325/3250/6450 data is 839 pages, SAM3N is 758 and SAMD20 is 654 though it's true that SAM3X is a whopping 1467.

While these page counts say something about the complexity of the devices the fact is that even with a 250 page tiny datasheet it's pretty unusual to need to read and understand all 250 pages on day one. That's equally true (perhaps more so) for a 1500 page datasheet. The chances are it has got some complex peripherals you may never actually use. Not every Xmega program ever written uses the Event System or DMA for example!

BTW I think your picture is probably the Xplained board for SAMD20 in fact. You could start there but if your motivation for using a "bigger" CPU is computing power then why stop at Cortex M0+? As I said above it's the Cortex M4 that has the powerful CPU functions that in some ways are similar to DSP.

Here's a couple of pictures from this page:

http://www.arm.com/products/proc...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Quote:

Thoughts?

It's a blue PCB. I can See the words "Atmel" and "X" on there. I'm guessing it's some kind of Xplained board perhaps?


We could try to zoom the picture and it might also be a "SAMD20" visible. But that could not be the point. If Shredability actually wanted to ask
"Is the Atmel SAMD20 Xplained board any good"?, then surely he would have typed that instead of pasting a photo of it. Or is he combining his inquiries with his obsession for riddles? :roll:

Yes. It's a SAMD20 Xplained board. It's reasonably priced for its capabilities.

Other uC makers might have ARM Cortex-whatever demo boards in the same price range with a bit more goodies on board.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Other uC makers might have ARM Cortex-whatever demo boards in the same price range with a bit more goodies on board.

Or cheaper ;-) The STM32F4 Discovery has an M4 and a debugger on board and costs $15. Atmel don't, yet, have anything that approaches that kind of price competitiveness though I have the SAM4S16 Xplained board and it's very good (also includes debugger). I think it costs in the region of $50. I got mine when they were having an introductory offer. I think the kit was just $25 at the time. (STM32 board is 168MHz, SAM4S is 120MHz).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So who makes up the silly lists of applications a chip is suited to?

Quote:

Home and commercial building automation

Human-Machine Interface (HMI), Machine-to-Machine (M2M)

Point-of-Sale (POS) terminals

Medical equipment

White goods

The largest known prime number: 282589933-1

Without adult supervision.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I've always had the mentality that the more powerful your micro controller is, the more difficult it will be to deal with.

That is why Freaks love tn4.

Quote:
if a datasheet is any more then 1000 pages.

The 1000 page reference manual is a myth - none of ARM Cortex I use goes below 1200 pages*.
But it is not because these are difficult but because there are so many guts inside. You do not want Ethernet, DMA or VGA - you do not read that chapter.

If you take some entry CM0 then RM of STM32F030 (655 pages) is about the size of a comparable XMega family.

*And that is only for peripherals, you won't find a single sentence about the core/core registers or instruction set there.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sice the SAM D20 was brought up above:

The data sheet is 620 pages.

Digital I/O is somewhat more complex, but not very much. Instead of just "PORT, PIN and DDR" (called OUT, IN and DIR) you also for each of those have a ..SET, a ..CLR and a ..TGL register. Looks intimidating but you are not forced to use those. I have not come around to testing what the GCC compiler uses - my assumption is that using the SET/CLR/TGL registers will be atomic per se and not RMW as using e.g the PORT/OUT registers might need. Thus no reason for the compiler or coder to include disabling of interrupts.

I had a look at the serial communications module (i.e. "the USART") a while back. I never really figured out what goes into the baud rate register. Judged from that experience alone the AVR data sheet seems more straight forward to me. Or it just might be that I have forgotten any ordeals when learning the USART of the first AVR on my bench. (But mind you - my previous experience was with the good old USARD chips 8250, 16450 and 16550. Those have great similarities to the AVR USARTS - not only in structure but also in documentation.)

I'm hoping to get some more experiments done with the D20 Xplained card during Christmas holidays!

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
my assumption is that using the SET/CLR/TGL registers will be atomic per se

I doubt it uses SET in arm-...-gcc with:

OUTx|=_BV(y);

the same way as sbi in avr-gcc below:

PORTx|=_BV(y);

I think that requires an explicit SET.
ae2nz

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I probably should have posted more then a word and a picture.

http://ca.mouser.com/ProductDeta...

I'm curious if this is a good starting point.

Edit: Thanks for all the info, I enjoy reading about all this.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I'm curious if this is a good starting point.


Why don't you read the extensive D20 thread in Off Topic?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Here's a couple of pictures from this page:

I have to bite: How can DMIPS/MHz be greater than 1?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Once again you need to ask yourself the question why you are moving beyond tiny/mega. If it's about CPU power then SAM4 (cortex M4) may nbe a better choice than SMAD20 or SAM3. If so then Mouser has each of these at €33.29:

http://de.mouser.com/ProductDeta...
http://de.mouser.com/ProductDeta...
http://de.mouser.com/ProductDeta...
http://de.mouser.com/ProductDeta...

Whether you go for S, L, L8 or N amongst the SAM4 would depend what kind of peripheral functionality you were looking for.

Oh and while looking at some SAM4 details I was reminded that unlike AVR, the datasheets contains the complete opcode manual for the part. That's 100 (very useful!) pages before you even get started. The generic description of the CPU that includes this actually amounts to close on 200 pages of the d/s in fact.

Quote:

Digital I/O is somewhat more complex, but not very much. Instead of just "PORT, PIN and DDR" (called OUT, IN and DIR) you also for each of those have a ..SET, a ..CLR and a ..TGL register. Looks intimidating but you are not forced to use those. I have not come around to testing what the GCC compiler uses - my assumption is that using the SET/CLR/TGL registers will be atomic per se and not RMW as using e.g the PORT/OUT registers might need. Thus no reason for the compiler or coder to include disabling of interrupts.

The adition of SET/CLR/TGL over and above simple DIR/IN/OUT is also seen in Xmega in fact. In the ARM world it's not quite as simple as an atomic SBI/CBI. For example in SAM4S16 I used this code from ASF:

		if (foo) {
			ioport_set_pin_level(MY_LED, false);
			ioport_set_pin_level(OTHER_LED, true);
		}		
		else {
			ioport_set_pin_level(MY_LED, true);
			ioport_set_pin_level(OTHER_LED, false);
		}

Typical of the ASF multi-layered onion these innocuous looking APIs actually invoke several levels of code beneath them but in effect it boils down to:

		if (foo) {
  40097e:	4a11      	ldr	r2, [pc, #68]	; (4009c4 )
  400980:	4b0f      	ldr	r3, [pc, #60]	; (4009c0 )
  400982:	7811      	ldrb	r1, [r2, #0]
  400984:	f44f 6480 	mov.w	r4, #1024	; 0x400
  400988:	f44f 3000 	mov.w	r0, #131072	; 0x20000
  40098c:	b111      	cbz	r1, 400994 
	Pio *base = arch_ioport_pin_to_base(pin);

	if (level) {
		base->PIO_SODR = arch_ioport_pin_to_mask(pin);
	} else {
		base->PIO_CODR = arch_ioport_pin_to_mask(pin);
  40098e:	635c      	str	r4, [r3, #52]	; 0x34
		bool level)
{
	Pio *base = arch_ioport_pin_to_base(pin);

	if (level) {
		base->PIO_SODR = arch_ioport_pin_to_mask(pin);
  400990:	6318      	str	r0, [r3, #48]	; 0x30
  400992:	e001      	b.n	400998 
  400994:	631c      	str	r4, [r3, #48]	; 0x30
	} else {
		base->PIO_CODR = arch_ioport_pin_to_mask(pin);
  400996:	6358      	str	r0, [r3, #52]	; 0x34
		}		
		else {
			ioport_set_pin_level(MY_LED, true);
			ioport_set_pin_level(OTHER_LED, false);
		}
...
  4009c0:	400e1200 	.word	0x400e1200
  4009c4:	200004d4 	.word	0x200004d4

That sets up r2 to hold 0x200004d4 which is the address in RAM of a byte variable called "foo" and r3 to hold 0x400e1200 which is the base address of a bunch of registers erlating to "PIOC".

It then loads r1 with the current "foo" value. The bit masks for my two LEDS (0x00000400 and 0x00020000) are loaded into r0 and r4 and then it makes a conditional branch based on "foo" being 0 or not. This decides whether it stores the mask values to the 0x400E1200 base plus 0x30 and 0-x34. The datasheet says that 0x400E1230 is the address of PIO_SODR (C) and 0x400E1234 is the address of PIO_CODR (C).

One sets bits and one clears bits. So depending on foo one LED is lit and the other extinquished or vice versa.

So, no it's not as simple as a CBI and an SBI but is more like a couple of AVR ST opcodes.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How can dmips /MHz be greater than 1? These are pipelined processors, so you can be doing more than one thing each clock.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
so you can be doing more than one thing each clock.

For example ARMv7M has conditional instructions that do not last at all.
These op-codes are called IT.
lnnk4

No RSTDISBL, no fun!