New ATTiny Part (ATTiny841)

It appears Atmel have released a new ATTiny and from looking at the datasheet its scarily impressive:

Two Hardware UARTs (!!!)
Hardware SPI
Hardware I2C
64 Channel 10bit ADC
Two Analog Comparators
Two 16bit timers (!!!)
One 8bit timer
6 PWM outputs for which you get to choose which of the 8 PORTA outputs is a PWM pin.

Datasheet:
http://www.atmel.com/Images/Atmel-8495-8-bit-AVR-Microcontrollers-ATtiny441-ATtiny841_Datasheet.pdf

I can't wait until AVR-GCC supports it - if it doesn't already.

No DIP package :frowning:

True, but the 1.27mm SOIC packages are relatively easy to solder and adapter boards can be got for next to nothing on eBay.

Pretty interesting. With more memory and a couple other small details, they could have called it an ATmega.

That's real nice, and with the recent tiny1634 we are getting some real good alternatives to the 85/84/2313s we've had for ever. All good chips in their way but each is missing something that's hard to live without.

64 Channel 10bit ADC

It's 46 isn't it. But either way it's a 20-pin chip max. Eh?


Rob

Graynomad:

64 Channel 10bit ADC

It's 46 isn't it. But either way it's a 20-pin chip max. Eh?

14Pin SOIC chip. There are 46 differential channel options and 12 single channel options and 4 internal sources (internal reference, temperature sensor, both supply rails). So 62 usable channels in total, but its a 6bit mux.

What do they mean when they list some of the differential options as, for example, positive is ADC0 and negative is ADC0 (the pin and itself, listed at the top of p.145)?

I believe those options are used to measure the (internal?) offset for calibration. It's odd the t841 datasheet does not mention anything. I think the ATtiny85 datasheet had a brief note about same channel differential inputs.

Hi, will this new MCU be supported by the Arduino IDE? Thanks.

Saw this post earlier, but also received an email yesterday from Atmel with a link to a press release about the new parts. So I was reading a little more and noticed a couple things I hadn't before.

ATtiny441/841 have a different, "ultra low power" watchdog oscillator that can be programmed to operate between 32kHz and 512kHz. As before, it can also be used as the system clock. Plus, it has its own separate calibration register in addition to the usual one for the internal RC oscillator.

One downside I can see is that the I2C interface is described as a slave interface. Have to wonder whether the hardware could somehow be coaxed into master mode, but haven't looked into it.

I hope they have versions in the pipeline with more memory, I can see running out of flash and SRAM if a person makes use of most of the peripheral features.

I happened across the 841 just yesterday while I was searching for a part with two 16-bit capture peripherals.

I was looking for an ATtiny part to do quadrature decoding on two robot wheels at once. Only problem was that SCL and the capture pin were shared :frowning: But anyway, this is a neat chip. $1.50 in singles, not bad. I love that it has a real TWI peripheral.

Can't be that hard to port the arduino-tiny core to this (or any other chip).

I wonder if anyone would want a breadboard breakout of this? I could put something together in a couple weeks or so and stick it up on my Tindie store with the other ATtiny boards.

Definitely gotta play with this thing.

A breakout might be useful, especially if the Arduino core gets ported across. I see this chip as being a nice 84/85/2313 replacement.

BTW, are you happy with the Tindie arrangement, I might be looking for a sales outlet soon.


Rob

Yip, this new MCU looks great, Arduino could do with a nice low-power option for battery powered applications - I will keep watching with interest. I have used Tindie from the UK before so count me in for a nice 841 low power board :slight_smile:

Yeah Tindie works out pretty good I think, provided you can drum up some decent interest in forums on your blog or whatnot.

If I end up doing a breakout / dip implementation I'll post up.

Thanks.


Rob

Has anyone made any progress on a working core for this? This chip looks great, good bang for the buck.

I had been planning on it but as it isn't supported in the version of avr-gcc used in the standard Arduino IDE, I haven't yet bought one of the chips.

As a start though, I have found that somebody has got AVRDUDE to program them. [Code below sourced from here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1121049 ]
Add this to the avrdude.conf

#------------------------------------------------------------ 
 # ATtiny841 
 #------------------------------------------------------------ 

 part 
 id = "t841"; 
 desc = "ATtiny841"; 
 has_debugwire = yes; 
 flash_instr = 0xB4, 0x07, 0x17; 
 eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, 
 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC, 
 0x99, 0xE1, 0xBB, 0xAC; 
 ## no STK500 devcode in XML file, use the ATtiny45 one 
 stk500_devcode = 0x14; 
 ## avr910_devcode = ?; 
 ## Try the AT90S2313 devcode: 
 avr910_devcode = 0x20; 
 signature = 0x1e 0x93 0x15; 
 reset = io; 
 chip_erase_delay = 4500; 

 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1", 
 "x x x x x x x x x x x x x x x x"; 

 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x", 
 "x x x x x x x x x x x x x x x x"; 

 timeout = 200; 
 stabdelay = 100; 
 cmdexedelay = 25; 
 synchloops = 32; 
 bytedelay = 0; 
 pollindex = 3; 
 pollvalue = 0x53; 
 predelay = 1; 
 postdelay = 1; 
 pollmethod = 1; 

 hvsp_controlstack = 
 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66, 
 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78, 
 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10, 
 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F; 
 hventerstabdelay = 100; 
 hvspcmdexedelay = 0; 
 synchcycles = 6; 
 latchcycles = 1; 
 togglevtg = 1; 
 poweroffdelay = 25; 
 resetdelayms = 0; 
 resetdelayus = 70; 
 hvleavestabdelay = 100; 
 resetdelay = 25; 
 chiperasepolltimeout = 40; 
 chiperasetime = 0; 
 programfusepolltimeout = 25; 
 programlockpolltimeout = 25; 

 ocdrev = 1; 

 memory "eeprom" 
 size = 512; 
 paged = no; 
 page_size = 4; 
 min_write_delay = 4000; 
 max_write_delay = 4500; 
 readback_p1 = 0xff; 
 readback_p2 = 0xff; 
 read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8", 
 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; 

 write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8", 
 "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; 

 loadpage_lo = " 1 1 0 0 0 0 0 1", 
 " 0 0 0 0 0 0 0 0", 
 " 0 0 0 0 0 0 a1 a0", 
 " i i i i i i i i"; 

 writepage = " 1 1 0 0 0 0 1 0", 
 " 0 0 x x x x x x", 
 " x a6 a5 a4 a3 a2 0 0", 
 " x x x x x x x x"; 

 mode = 0x41; 
 delay = 6; 
 blocksize = 4; 
 readsize = 256; 
 ; 
 memory "flash" 
 paged = yes; 
 size = 8192; 
 page_size = 16; 
 num_pages = 512; 
 min_write_delay = 4500; 
 max_write_delay = 4500; 
 readback_p1 = 0xff; 
 readback_p2 = 0xff; 
 read_lo = " 0 0 1 0 0 0 0 0", 
 " 0 0 0 0 a11 a10 a9 a8", 
 " a7 a6 a5 a4 a3 a2 a1 a0", 
 " o o o o o o o o"; 

 read_hi = " 0 0 1 0 1 0 0 0", 
 " 0 0 0 0 a11 a10 a9 a8", 
 " a7 a6 a5 a4 a3 a2 a1 a0", 
 " o o o o o o o o"; 

 loadpage_lo = " 0 1 0 0 0 0 0 0", 
 " 0 0 0 x x x x x", 
 " x x x a4 a3 a2 a1 a0", 
 " i i i i i i i i"; 

 loadpage_hi = " 0 1 0 0 1 0 0 0", 
 " 0 0 0 x x x x x", 
 " x x x a4 a3 a2 a1 a0", 
 " i i i i i i i i"; 

 writepage = " 0 1 0 0 1 1 0 0", 
 " 0 0 0 0 a11 a10 a9 a8", 
 " a7 a6 a5 x x x x x", 
 " x x x x x x x x"; 

 mode = 0x41; 
 delay = 6; 
 blocksize = 32; 
 readsize = 256; 
 ; 
 # ATtiny841 has Signature Bytes: 0x1E 0x93 0x15. 
 memory "signature" 
 size = 3; 
 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", 
 "x x x x x x a1 a0 o o o o o o o o"; 
 ; 

 memory "lock" 
 size = 1; 
 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", 
 "x x x x x x x x x x x x x x i i"; 
 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", 
 "0 0 0 0 0 0 0 0 o o o o o o o o"; 
 min_write_delay = 9000; 
 max_write_delay = 9000; 
 ; 

 memory "lfuse" 
 size = 1; 
 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", 
 "x x x x x x x x i i i i i i i i"; 

 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", 
 "x x x x x x x x o o o o o o o o"; 
 min_write_delay = 9000; 
 max_write_delay = 9000; 
 ; 

 memory "hfuse" 
 size = 1; 
 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", 
 "x x x x x x x x i i i i i i i i"; 

 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", 
 "x x x x x x x x o o o o o o o o"; 
 min_write_delay = 9000; 
 max_write_delay = 9000; 
 ; 

 memory "efuse" 
 size = 1; 
 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", 
 "x x x x x x x x x x x x x x x i"; 

 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", 
 "x x x x x x x x o o o o o o o o"; 
 min_write_delay = 9000; 
 max_write_delay = 9000; 
 ; 

 memory "calibration" 
 size = 1; 
 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", 
 "0 0 0 0 0 0 0 a0 o o o o o o o o"; 
 ; 
 ;

thanks for the breadcrumb!

I got 10 of these in for fun - no bandwidth to get it working with Arduino though..

If anyone wants to add this to the core, I'll mail you a few !!

Alright, how does this look? Can someone do me a big favor and double-check my pinouts / pin functions?

https://bot-thoughts-eezee.googlecode.com/svn/trunk/eeZeeTiny841/eeZeeTiny841_sch.pdf
https://bot-thoughts-eezee.googlecode.com/svn/trunk/eeZeeTiny841/eeZeeTiny841_brd_top.pdf
https://bot-thoughts-eezee.googlecode.com/svn/trunk/eeZeeTiny841/eeZeeTiny841_brd_bot.pdf

Complete repo with Eagle files is here: Google Code Archive - Long-term storage for Google Code Project Hosting.

If it looks good I'll make up a batch, populate, test, and make available on Tindie in the next few weeks.

Looks like it's going have sell at around $12 retail with all SMT populated including xtal, less without xtal. If there's enough interest to where I can justify ordering more, I can drop the cost a bit.

Thanks,
Michael