Digistump Forums

The Digispark => Digispark Project Ideas => Topic started by: n3ikq on June 19, 2013, 09:36:42 am

Title: How about a Digispark for the ATTiny84 series of chips?
Post by: n3ikq on June 19, 2013, 09:36:42 am
I'm sorry if this is not posted to the right place. Hi all, first let me say I'm thrilled to find this family of products! I've been using the ATTiny 84 and 85 for a year now for various fun projects but of course have been forced to solder up the chip and give it power by scratch. While plenty easy to do, this necessary step cuts into the "fun part" of programming and using the chip! Anyway my suggestion is simple and may have already been mentioned before. The extra I/O's of the 84's would be great for a slightly larger project. Thanks!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on June 19, 2013, 10:29:19 am
The Digispark Pro is on my list and the Atiny84 is a top candidate - though I'm considering some of the other chips with a UART on them as well - the form factor would remain very similar with added pins on an additional side, but remaining fully compatible with the Digispark shields.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: airship on June 28, 2013, 12:30:17 pm
my vote = YES!  :)
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 02, 2013, 12:57:12 am
What about attiny87 or attiny861 ?
Both are in the same price region, have 4 pins more (than the 84). All three (84, 87 and 861) are available in an automotive-version, the 84 goes up to 125°C and the two others up to 150°C
Furthermore the 87 has an onboard RTC, an UART, 2SPI channels and 9 vs 6 vs 4 PWM outputs.

It would fit to the concept of the digiX (which is a interface++ arduino-clone) to have an digispark interface++ clone.

I am thinking about, that some 861 or 87 could replace as well PCF8574, 74HC595, lots of other shift-registers and/or logic converters with the right software collection.
It might be the right thing for makers, when you need to have only one kind of controller in stock, flush it with the right code and it will act as an replacement for a missing component in your prototype.

regards

  gogol

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 02, 2013, 03:19:48 pm
87 and 1634 are being considered as well - but they can't produce the 16.5Mhz we need for USB communications internally - which means they'd need an external crystal making them more expensive options- the attiny84a also happens to be dirt cheap (not quite as cheap as the attiny85, but close) - that said - still weighing the pros and cons of each (I'd really enjoy having a hardware uart) - I'm working on a contract project right now that calls for the same line of processors, so that should give me some paid time to evaluate them carefully.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 03, 2013, 12:27:42 am
well let me correct myself the 84 also lacks the PLL clock needed for generating the 16.5Mhz and the 861 has it - so the 861 is looking like the only viable option without adding a crystal


Here is where it gets interesting
Price at Qty 100 (generally indicative of price at 10k as well)
861 (no ext crystal needed) - $1.72
1634 (ext crystal needed) -  $0.97
167 (16k version of 87, ext crystal needed) - $1.10
87 (ext crystal needed) - $0.97
84a (ext crystal needed, not enough pins though when one is added) - $0.72

Crystals run us about $0.35 each with loading capacitors. SO even with a crystal the 1634, 167, and 87 is a better deal.

Just for comparison the attiny85 we use now is $0.66 at Qty 100

The attiny1634 seems to be a winner here except that those prices might just be because it is new, and I do have to look at long term sourcing (or hoard them).

All that said $0.66 and one component to $1.32 ($0.97+$0.35) and three components is a big jump - I had hoped to keep the price of the Pro the same - I'm thinking with that and the extra headers and a few other changes we have up for it it will end up being a buck or two more.

Thoughts and suggestions most welcome!

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: cboden on August 03, 2013, 05:16:23 am
I guess a buck more shouldn't be the problem. Currently i would prefer a external crystal as the internal might be not precise enough in some cases. I'm not sure if this is still the case at the ATTiny's, but for RS232  for example the "big" ATmegas always need external crystals for that reason.

If you think about the PCB design i also have another wish :-) would it be possible to rotate the power pins 90 degrees so that they are opposite to the I/O pins? This would make it easier to use it with breadboards. To be 1:1 compatible to the current shields it would be then requiered to duplicate the power pins of course. But the addional power pins opposite to the I/O pins would be very helpfull from my point of view.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 03, 2013, 10:00:18 am
One argument might me, that all but the 84 and 861 are only available in soic , qfn and other smd-packages, while the others are still available as DIP.

Pro DIP:    there is a bigger maker community behind those devices, as they can be used the "traditional way" and as well from the shop to the bread-board.
                 Thats one of the advantages of the digispark as well, that you can buy the 85 around $1 in a dip, and throw it in small projects
Pro SOIC: Advantage would be, to offer a device to makers, which was out of scope because of limited soldering equipment.
                However for that, the device needs to bring new possibilities or a much better pricing, than others.

the 1634 and 84 lacks PWM out-channels compared to the rest

for all but the 1634 is a robust high temperature automotive version available, interesting for several use cases, which could easily adapted (not necessarily that it is used in the pro)

I think (and that may be only my very own perspective), that one of the big advantages of the digispark is the community, with similar products, like e.g. littlewire, lily-tiny and core chip projects.

just a few thoughts.

I have collected some of the different core features of the five mentioned micros:
Device NameFlash (Kbytes)Pin CountMax. Operating Frequency# of Touch ChannelsMax I/O PinsUARTADC channelsTemp. SensorSRAM (Kbytes)EEPROM (Bytes)picoPowerOutput Compare channelsInput Capture ChannelsPWM Channels32kHz RTCCalibrated RC OscillatorAutomotive Version availablePrice with crystal, if needed Packages
ATtiny16341620121118212No1256Yes224YesYesNo$1.32MLF (WQFN) 20M1 20,SOIC (300mil) 20S2 20,WLCSP 12U1 12
ATtiny167162016816111Yes0.5512No319YesYesYes$1.45MLF (VQFN) 32M1-A 32,SOIC TG 20,TSSOP 6G 20
ATtiny848142061208Yes0.5512No414NoYesYes$1.07MLF (WQFN) 20M1 20,PDIP 14P3 14,SOIC (150mil) 14S1 14
ATtiny86182020816011Yes0.5512No616NoYesYes$1.72MLF (VQFN) 32M1-A 32,PDIP 20P3 20,SOIC (300mil) 20S2 20
ATtiny878201616111Yes0.5512No319YesYesYes$1.32MLF (VQFN) 32M1-A 32,SOIC TG 20,TSSOP 6G 20



regards

   gogol
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 03, 2013, 11:24:31 am
Hi,

comparing the datasheets, I wonder, how the 1634 should be able to create the 16.5MHz. Looks like, that 12MHz is the maximum.

regards

   gogol
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 05, 2013, 10:12:49 am
1634 (ext crystal needed) -  $0.97
[...]

The attiny1634 seems to be a winner here except that those prices might just be because it is new, and I do have to look at long term sourcing (or hoard them).

I agree.  I've been looking at the 1634, and it looks like a great DIY chip too.  The ATmega8's PQFPs are cheap on the grey market (~75c), but soldering 32 .8mm pitch pins is a lot harder than 20 1.27mm SOIC pins.
You should be able to forgo the crystal and run it at 12Mhz or 12.5Mhz (in the high range of OSCCAL and it is supported by V-USB).  It has a temperature controlled clock generator (see datasheet 6.5.4
OSCTCAL0A – Oscillator Temperature Calibration Register A), so I think there's a decent chance it could be stable enough to do USB communications at 12Mhz (i.e. not the more bloated 12.5Mhz version of the v-usb code).
It also has an on-chip, low-power calibrated 32.768khz oscillator - so no need for RTC shields.

I'd also dump the on-board regulator.  When not connected to the computer it's easy to power something like the digispark from a small battery, or a cheap USB charger.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 05, 2013, 10:20:05 am
One argument might me, that all but the 84 and 861 are only available in soic , qfn and other smd-packages, while the others are still available as DIP.
  gogol

Small SOCI -> DIL adapters are available from a number of sources, and soldering a half-pitch 20-pin SOIC isn't that hard.

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 05, 2013, 12:13:17 pm
however the adapters cost at least three times of the attiny ;-) at least when I compare the prices from my usual sources!
The discussed attinys are in the range of 1€ up to 2.5€ per single piece, the adaptors in the range from 5€ to 14€ :-(

I like just now dealing with the attiny85. I bought 10 pieces, and I just plug them into a socket of my  littlewire-driven digispark, to program them.
After that, I plug them into the breadboard for next round of testing.

With soldering adapters, that will not be so much fun.

regards

  gogol
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 05, 2013, 08:42:18 pm

Crystals run us about $0.35 each with loading capacitors. SO even with a crystal the 1634, 167, and 87 is a better deal.


That seems high.  Tayda sells 16Mhz crystals for 10c (qty 1!).
http://www.taydaelectronics.com/crystals-resonators-oscilliators/crystals/16-000-mhz-16-mhz-crystal-hc-49-s-low-profile.html
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 05, 2013, 09:02:23 pm
however the adapters cost at least three times of the attiny ;-) at least when I compare the prices from my usual sources!
The discussed attinys are in the range of 1€ up to 2.5€ per single piece, the adaptors in the range from 5€ to 14€ :-(

80c for the tiny85-20SU and 35c for an SOIC adapter:
http://www.futurlec.com/Atmel/ATTINY85-20SUpr.shtml

For prototyping, I agree going the DIP route is better.
Afterwards, whether you're making 10 boards or a one-off project I like SOIC.
With the tiny 85 you can program the SOIC by holding it on a SOIC adapter with your finger or a small clamp (I think I saw this on hackaday).
Once it's programmed, stick it to the back of a 10c plastic CR2032 holder, and solder your connections directly to the tiny85 leads.  Obviously if you have a lot external parts this doesn't work so well and a DIP would be better if you're not doing a small run custom PCB (or etching your own).

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 05, 2013, 11:25:42 pm
First of all - I'm following and considering all the points here - just don't have time to respond to how each of them fits in against the Pro plans - especially since the pro isn't fully fleshed out yet.


A few specific responses


@cboden - we're looking at rotating the power pins - right now you can already use them most breadboards with power rails - but you loose the VIN pin and they aren't as universal as if we rotate them - if we do we will duplicate them for backward compatibility.


@gogol - thanks for the table - you're right about the 1634 while we could then run it at 8mhz or 12mhz and still be able to do v-usb (with external crystal) - that steers me more towards the 167 where we could run it at 16mhz (16.5mhz is only needed when using an internal oscillator) and therefore make it very compatible with existing Digispark/Arduino code written for 16mhz.


Regarding DIP vs SOIC - I hate to say it but this isn't too much of a consideration anymore - if we put too much weight on that then we will be stuck with the old tech - I'd be more inclined to sell dirt cheap adapters (even pre-soldered ones) then pick a chip just because it is available in DIP.


@CBCracker - to run at 12.8Mhz the chip will have to have an internal oscillator that is user calibrated to 1% (same for 16.5Mhz) - and many of the chips don't have that. To run at 12Mhz an external crystal must be used because greater accuracy is required.


Regarding the 35 cent price of the crystal - 33 cents + 2x1 cent capacitors - sure you can find cheaper crystals but that price is for a SMT (wayyy smaller than the Tayda ones, which are as wide as a Digispark on their own) and not grey market - we carefully select what markets our parts come from, and that has paid off (failure rate remains about 0.2%) - Crystals and Attiny chips always come from reputable, guaranteed suppliers - to combine grey market crystals and super timing sensitive V-USB with production prices would be a bigger headache then I'd ever want to have.




Thoughts on the Attiny167? I really like the idea of 16k which is why I'd prefer that to the 87

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 06, 2013, 07:59:15 am
@CBCracker - to run at 12.8Mhz the chip will have to have an internal oscillator that is user calibrated to 1% (same for 16.5Mhz) - and many of the chips don't have that. To run at 12Mhz an external crystal must be used because greater accuracy is required.

Thoughts on the Attiny167? I really like the idea of 16k which is why I'd prefer that to the 87

The 1634 is the only AVR chip I've found with an internally temperature-controlled oscillator; neither the tiny85 nor the 167 have it; i.e. the internal clock on the 1634 should be more stable than the tiny85.  For now I'll agree that you need an external crystal for 12 or 16Mhz v-usb operation.  I'm working on the v-usb code, and think I can get it to work reliably with the internal clock of the tiny85 as low as 8Mhz.  Here's part of my code from usbdrvasm8.inc to read a bit and store the last bits received in just 6 clocks (at 8Mhz there's 16 clocks for every 3 bits):
    in      x2, USBIN       ;1 [1] sample bit
    eor     x1, x2          ;1 [2] RZI
    ror     x1              ;1 [3] x1[0] -> C
    ror     shift           ;1 [4] C -> shift
    st      y+, shift       ;2 [6]  save received bits

Also because of the 1K vs .5K SRAM (and both with 16K flash) I still prefer the 1634 over the 167.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 06, 2013, 08:54:26 am
Regarding the 35 cent price of the crystal - 33 cents + 2x1 cent capacitors - sure you can find cheaper crystals but that price is for a SMT (wayyy smaller than the Tayda ones, which are as wide as a Digispark on their own) and not grey market - we carefully select what markets our parts come from, and that has paid off (failure rate remains about 0.2%) - Crystals and Attiny chips always come from reputable, guaranteed suppliers - to combine grey market crystals and super timing sensitive V-USB with production prices would be a bigger headache then I'd ever want to have.

I don't know about their reliability, but Abracon crystals are available through digi-key; 15c for qty 1000 (ABLS-16.000MHZ-B4-T).  It is a large footprint surface mount part, but still smaller than the footprint of the digispark's regulator.  At the volumes you're producing the digispark boards (>40K units last I read), you're probably paying < 10c/sq in for PCB, so the bigger footprint for the crystal (4.8x11.5mm) would cost a fraction of a penny for the extra board space.

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 06, 2013, 10:25:58 am
Getting the other values to work with the internal oscillator would be very interesting - and might push me toward 1634 - though having the pro run at 16mhz is still very appealing - while we have many power users probably 75%+ of our customers are beginners with about 50% first time Arduino anything users - so the more compatible, straightforward, and easy to use it is, the better - and one of the goals with the Pro is to make it not just more powerful but easier to use as well


Regarding the crystal - I'm certainly considering some of the larger surface mount crystals - and surely 35 cents was a number to figure by, not a final production number. Board space is never a factor because of cost, as you're right that is completely marginal, simply because the Digispark is partly known for being so small!


Thanks for the great feedback!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 07, 2013, 06:42:20 am
Getting the other values to work with the internal oscillator would be very interesting - and might push me toward 1634 - though having the pro run at 16mhz is still very appealing - while we have many power users probably 75%+ of our customers are beginners with about 50% first time Arduino anything users - so the more compatible, straightforward, and easy to use it is, the better - and one of the goals with the Pro is to make it not just more powerful but easier to use as well

I agree with the compatibility point and keeping it simple.  I'm not sure you'd get away with using the existing digistump code based on a 16.5Mhz clock if you switched to a 16Mhz crystal.  It might be OK for serial (115k might be hard), but timekeeping code would be 3% slower.  Plus you'd also want separate libraries for the pro to take advantage of things like the 32K internal RTC oscillator...

As for the size of an external crystal, I have another suggestion.  The Funduino Pro mini I just ordered from Fasttech just arrived, and I've noticed they use a tiny 16Mhz resonator - just like Sparkfun's Arduino Pro Mini 328 that it seems to be a clone of.  The resonator is even smaller than the 10uF caps on the board!.

I'm also wondering if the reset button is of much use on a USB powered device like the digispark that you can just unplug.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 07, 2013, 09:35:23 am
Resonators generally aren't reliably accurate enough for V-USB - another case of they might work, but not reliably enough for large production.


There will not be a reset button, I'm sure of that - buttons are very expensive, especially in tape and reel form that I need them in to machine place them - to me it isn't worth raising the price just to have a reset button. We'll probably bring reset out to a pin though, so if someone really wants to use it they can attach their own button.


Most Digispark code will work at 16Mhz because most of it was never ported to 16.5!

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: Mark on August 10, 2013, 01:00:34 am
Quote
We'll probably bring reset out to a pin though
If you were very cunning with an earth right next to it, so using a two pin header and a screwdriver or other metallic item, would perform a reset....

just a thought

Mark
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: Bluebie on August 11, 2013, 04:48:38 pm
The more I think about it the more I want a digispark with these properties: Four to six more pins, 3.3v operation via linear regulator (or maybe selectable via solder jumper? but then would still need zenners annoyingly), precise crystal timing, snap off PCB USB plug, ability to run at 16mhz, but default to 8mhz via clkpr = 1 in bootloader. 16kb of progmem would be amazing!


So important to this device is that it can sleep properly if you disconnect the power LED. If there are zenner diodes and 5v support it should be easy to disconnect the zenner's somehow - maybe default on solder jumper. I really like the idea of a digispark which has a built in real time clock. I think that would be really useful for lots of stuff.


If a thing like that exists in the future I would find it so amazingly useful I would definitely contribute open source stuff for it (maintain bootloader, make libraries more compatible, etc..). 3.3v is really important to me. There's so much stuff I try and do with digispark or arduino where I need 3.3v and it's a massive pain. There is comparatively few things that can only communicate with 5v devices. A zenner diode (or maybe linear regulator does it anyway?) to ensure the digispark micro never went above 3.5v or so would allow the internal clamping diodes to handle any devices sending 5v at the spark, so long as you connect them with a resistor and don't mind power inefficiency. Every 3.3v device I've seen a datasheet for supports at least up to 3.5-3.6v within spec, as does usb, so it should be fine.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 11, 2013, 10:29:03 pm
The Attiny167 is looking like the chip.


It has:
16kb of flash! (so likely at least 14k after bootloader - thats over 2X as much)
Internal RTC
max 16 i/o pins - 2 will be used by the crystal, 1 by reset - the plan is to have 6 more pins than the standard digispark fully available for use
11 ADC channels
2 SPI, 1 I2C, 1 UART, 1 LIN


It would be run with a precise crystal at 16mhz


5v vs 3.3v - my plan is to make use a regulator that can supply both and either manufacture both versions (with zeners left out on 3.3v) from the same PCBs or make it switchable with solder jumpers. I'm leaning towards manufacturing it in two versions - with the 5v possibly switchable via solder jumper.


@Bluebie - any input on which pins should be used for the V-USB/Bootloader?


My goal is to have it cost at most $2 more. But I'm thinking maybe to kick it off it would be offered to existing customers or as a pre-order at a discount.


Thoughts?



Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: bobricius on August 12, 2013, 01:07:59 am
How is price difference betwen attiny167 and atmega168, atmega328?
No compactibility problems, no special libraries, UsbAsp bootloader like Metaboard in protected memory.
I think that 1-2$ cheaper chip and couple of days for solving libraries compatibility and chip difference is not good.

And what about stm32f103cbt6? .... 128kb flash, RTC and more. Arduino like IDE (maple) I working on this small boards:)
http://sardravce.sk/tuke/smartstickSTM32.brd (http://sardravce.sk/tuke/smartstickSTM32.brd)
 http://sardravce.sk/tuke/smartstickSTM32.sch (http://sardravce.sk/tuke/smartstickSTM32.sch)
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 12, 2013, 08:18:25 am
The Attiny167 is looking like the chip.

Thoughts?
My vote is still with the ATtiny1634, though I understand the choice of the 167 for the official 16Mhz support.  The 1634 can do 8Mhz at 2.7V, so clocking it to 16Mhz @5V would be no sweat.  It's a bit cheaper too...

If you're going to start at a slower clock like Jenna suggests, perhaps start at 12Mhz/3.3v.  12Mhz is supported by v-usb, and would avoid the kludge of using the zener diodes to clip the USB D+/D- voltages.  A jumper could select 3.3/5v operation for 5v when running at 16Mhz (even though clocking to 16Mhz should be fine even at 3.3v).
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 12, 2013, 10:53:36 am
@bobricius - atmega168 is about 3x the price - $2 extra for a chip comes out to much more than that once it is assembled, shipped, profit is added (though currently we don't make any) - switching to an atmega could take us from a $10-11 (possibly lower) price point to a $13-14 which moves us into a different price bracket of boards and puts us in competition with the sea of clones (and Arduino itself - who we kinda like to leave to their market,afterall they inspired all of this). More importantly, the Attiny is our niche, we think there is something wonderful about them and building devices that do just enough - that is how this all started after all!


Not to say I don't often think about doing an atmega device but that will be a separate product - for now, when I want an atmega device I reach for an Arduino.


I have a strong interest in the ARM board (as evidenced by the DigiX) and the potential to make some very cheap small ones, but that is a MUCH bigger project as I don't feel the Maple is compatible enough at this point and see that project taking the form of direct Arduino compatibility (like the Due/DigiX).


In other words - both great ideas - but the Digispark line will remain Attinys with things more like your suggestions certainly in the works and likely would be compatible with the Digispark form factor (so many projects so little time!)


@CBcracker - I wish the 1634 would officially support 16Mhz - but talking with some folks it seems it doesn't for good reason (after all atmel wouldn't just not support it for the heck of it) and I don't want to base a design on overclocking a chip to a likely unstable rate - it sounds like a 16mhz version may come out, but no word on when.


The clock issue - specifically 3.3v not supporting 16mhz - makes me lean towards producing a 3.3v and 5v version (same PCB with different parts) with 3.3v running at 8mhz (with 8mhz crystal) and 5v at 16mhz (with 16mhz crystal) (why not 12mhz for 3.3v? - when I am converting examples and libraries for the Digispark most for the attinys are written for 8Mhz so that would make them compatible with no changes, and 8Mhz is generally more standard for Arduino code then 12mhz (second only to 16Mhz)) - still very open to input/ideas here.




If the 167 is the chip here are the pins available for USB (need two D+, D-) - PB3, PB6 (which has INT0), PA3 (which has INT1), PA6, PA7
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: Bluebie on August 12, 2013, 10:41:43 pm
I want to get behind the 8 or 16mhz sentiment. Many arduino libraries explicitly support only these two speeds - as far as I know 8mhz and 16mhz are the only two cpu speeds arduino have shipped on their own boards. 12mhz would make timing sensitive stuff harder to adapt, and it would mean getting a 1mhz clock would be much more annoying (can't just use frequency divider hardware). For these reasons 12mhz would make a board way less useful to me.


On the 5v/3.3v thing, I think it makes more sense to standardise. I don't see any reason not to use 16.0mhz crystals on all the boards - it gives users overclocking options, makes your inventory less annoying, maybe helps bulk discounts slightly. The current digispark core includes code at startup to configure the clock prescaler to whatever frequency the user selected in the boards menu. it'd be trivial to have a similar system with big sister digispark. using one standard clock frequency on all of the devices would simplify the clock adjustment code and probably save a few instructions. I'd like 8mhz to be the standard frequency *regardless of voltage*, with 16mhz and 1mhz as options for people who require them.


Here's how 8mhz with 16mhz crystals would work:


Chips are programmed with ckdiv8 fuse, so the chip starts up running at 2mhz (16/8). Bootloader immediately changes the clock prescaler from /8 to /2, switching up to 8mhz. This speed change would take a four bytes or so I think - a number totally dwarfed by the savings of having a precise crystal. Next up the bootloader launches in to the installed program and the program startup code either leaves the clock speed at 8mhz or switches the clock divider again. This code currently attempts to (poorly) detect a bootloader by checking if the device has had it's frequency tuned already by the 16.5mhz calibration, so it makes sensible decisions when the same code is installed on non-bootloaded devices. This fingerprinting could trivially be improved to read the chip fuses and decide if the chip is naturally running on 8mhz or a crystal by looking specifically at the clock source section, then adjust the clock divider by one.


Now I think about it, leaving zenners on 3.3v model wouldn't cause much power wastage - 3.6v zenners wouldn't leak much when the spark is only outputting at 3.3v. It'd be fine to leave them on I think, for simplification - then it'd just mean making the regulator switchable somehow, if you could find a neat one which can do both 3.3 and 5v that'd be super cool, otherwise I guess two models makes sense.


On pins, I don't think it matters?


Why do we want reset pin not to be IO? It seems like there's even less need for it on a chip with more progmem. bootloader upgrade script seems to work great.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 12, 2013, 11:05:24 pm
Why do we want reset pin not to be IO? It seems like there's even less need for it on a chip with more progmem. bootloader upgrade script seems to work great.

A dedicated reset pin means the user can flash it themselves without a high-voltage programmer.  While USBasp is ~$4 and a parallel port programmer (stk200) goes for half that, high-voltage programmers are hard to find for less than ten times that amount.  I've decided to build a fuse resetter (<$5 in parts) then use a regular programmer, but it's a whole lot simpler if you don't need the fuse resetter.
http://www.simpleavr.com/avr/hvsp-fuse-resetter


Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 13, 2013, 02:44:39 am
So it sounds like 16Mhz it is! Thanks for the explanation bluebie - I didn't know 16Mhz crystal was OK at 3.3v even with the divider. Buying one type of crystal will be a big cost advantage (a few cents each) which should allow us a bit more freedom in crystal choice (meaning smaller).


The voltreg idea is already fleshed out - it will be switchable between 5v and 3.3v - with the option to add a shunt jumper to switch it easily (it will come in 5v mode with jumper unsoldered, there will be a surface mount solder jumper or a 0.1" pitch shunt jumper to enable 3.3v - either can be used) - sound good?



I think I'll leave the zeners on - and just give a cutable solder jumper with trace on the bottom so they can be cut and also reconnected.


For which pins for USB I think it comes down to
PB3 & PB 6 - lose some PWM pins, PB6 is INT0 (doesn't that make v-usb easier, no need to use pin change interrupts?)
or
PA3 & PA7 - lose two adc, aref, isrc, PA3 is INT1 (again does that make v-usb easier?)
or
PA6 & PA7 - no INT pins, lose 2 adcs, lose aref, ss


I think the idea behind leaving reset is because it makes it more hackable - I think a HVSP (or your vural method) is easy - but it reboot being readily available encourages fuse changes, bootloader changes, etc - it would be on the header so easy to use either way - just a question of what the factory default is - open to thoughts on this of course
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 13, 2013, 05:55:23 am
Hi all,

it sounds, that the sibling of the digispark gets more and more flesh. I don't understand the reset-discussion, as this could be just one more option in the menu like the frequency!
If you need the IO-pin you go for that option, which disables reset!
As resetting fuses is no problem at all, and this sibling should be the perfect base for my FUSE-resetter (http://digistump.com/board/index.php/topic,1039.0.html)
as it has enough pins!
I like the idea for the cutable solder jumpers for the zeners (when the core digispark gets an upgrade it would be there as well a big advantage!)

regards

  gogol

@cbcracker:  thanks for the futurelec-link. They have also cheap 20pin SOIC to DIP adapters, haven't found so cheap ones up to now!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: dougal on August 13, 2013, 11:49:38 am
For any cuttable traces, it might be nice to have through-holes where we could mount pins for a jumper, in case we might want to re-connect later without soldering the traces directly on the board. Not sure how that affects cost. And I doubt many people would want/need to cut/resolder/recut/etc. anyhow. But the possibility of more easily reconfiguring the board by adding our own jumper could be nice?

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 13, 2013, 01:39:10 pm
I'm in on the thru hole header spots for a jumper for the 3.3v enable - but for the zeners that would mean making a bigger board for a relatively rare use case - if I find there is the room due to other things then I certainly will - but otherwise I'm not sure it is worth it.
If anyone has any ideas on other types of small jumpers/switches that are cheap and small let me know.


@gogl - as you know - once reset is switched to i/o it can't be switched back without a high voltage fuse changer - so it can't just be a menu option - or did you mean have it be an option to get rid of reset and make it an i/o? I kind of like that idea, reset pin is enabled by default, option to change fuse from menu - warning that the change can only be undone with special hardware - but can a fuse be changed from the software side of things? I was pretty sure there was no way to set fuses at runtime - but please correct me if I'm wrong because that would be cool...


Thanks everyone for the input - the excitement around this is pushing it from a project several months out to much sooner!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 13, 2013, 04:15:25 pm

I've been playing with the design of this:


Good news: only about 3mm bigger on one side!

General thoughts: I'm moving more and more toward disabling reset and using it as P5 as it has been on the regular Digispark - that gives 14 pins! - and keeps the pin functions similar between each (P5 having its own rules such as lower voltage, etc).


Hold ups: It is easy to design it so the voltage output of the regulator can be switched between 5v and 3.3v with a single jumper (close it and 3.3v, open and 5v) the tricky part is that if it is connected to USB for power and running at 3.3v then it needs to go through the regulator, if not then it shouldn't go through the regulator - short of adding a second jumper - any ideas how to accomplish both with one jumper and not a bunch of extra components? I think the only solution would be diode/transistor based in which case I'd likely have two jumpers because that would be too much extra cost to avoid a second jumper. It is very likely that you could feed 5v to the regulator whether you had 5v or 3.3v set as the output and still get 5v out - but that is out of spec - but at least if someone bridged the USB to regulator jumper they could use it both ways (by bridging or unbridging the second 3.3v/5v selection jumper) and just be out of spec. Does that make sense?
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 14, 2013, 02:51:03 am
@digistump:

I am completely aware of the restrictions disabling RESET. That is why I started the project, using a digispark as FUSE-resetter (http://digistump.com/board/index.php/topic,1039.html), which is doing its job very well!

Right now there is allready the hidden option in the menu:  Once you use the digispark with littlewire as ISP-programmer and store a bootloader on the target, RESET gets disabled by default (and without any warning or need).

Instead of delivering the upcoming sibling with RESET disabled, I would recommend, deliver it with RESET enabled and give a option in the menu for disabling it (for those, who won't work with the command line tools).

With 13 pins the need for the 14th will be very small, compared to the pin-usage of the digispark, where three pins have other restrictions as well.  So users would have the freedom of using RESET in their applications or use ISP-programmers. If they need the 14th pin, the can just go to the menu!

The other way round it would be much more complicated, as a user, who wishes to use RESET needs at least an FUSE-resetter, which is definitely not a beginner task.
 
regards

  gogol

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: defragster on August 14, 2013, 03:00:26 am
Reading this the other day on minimizing and my thoughts were there - through holes to re-jumper a cut or jumper over power eater diodes would be worth investigating.  Holes show where to edit as well as undo ability.  Will extend the utility from the single part - though perhaps larger in size or cents - larger production & reduced inventory and added 'features' over two alternate versions or lost sales. 

Last notes I saw related to things pulled to a shield and improve the layout/cost - a 'design/test time' connect to protoboard pins / serial port support could be on a programming shield bought once versus many for production boards - fewer led/diodes on core board (maybe empty holes to populate if the design called for them) - maybe the win there for size/parts count wouldn't offset average cost and complexity for the needed connection.  Though perhaps that dev time shield would be replaced with a 'power regulation' unit (digistump 'boost kit' or $4 down volt like seeedstudio #POW00900M) when regulated bench/usb power isn't there so it could run from battery or external supply: <3.3v or <5v or >6v as needed.

.5 k RAM seems restrictive to some tasks - but I suppose getting double size static storage instead could allow lookup tables or other compression techniques to extend the ram.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: Bluebie on August 14, 2013, 05:51:58 am
@Digistump


On Prescaler and 16mhz crystals:


Actually I pulled that idea of using the cpu prescaler to conform to power specs out of the air. I am 95% sure it'd be totally fine and within the spirit of the spec if not the exacting language of it, but it maybe wise to shoot off an email to atmel to confirm. I believe the clock speed issue is this: Each time the CPU steps forward (one full clock transition) a whole tonne of transistors collapse their state, with much of the CPU die becoming effectively a short circuit for a tiny moment. As soon as the chip settles it uses effectively no power at all until the next step forward. This is why attiny require those really low value tiny capacitors right near the power pins - to provide this massive surge of power for some tiny fraction of a nanosecond, and then charge back up for the remainder of the time, giving the overall average power usage of 2ma or whatever. The capacitors are supposed to be as close to VCC and GND as possible to eliminate as much inductance from the wiring as possible, improving the ability to send these sudden jolts of power in to the chip. I think at lower voltages the internal resistance of the chip isn't able to reliably power the entire die at higher clock speeds, so bits can get out of sync and then everything goes horribly wrong. The CPU prescaler would insulate the vast majority of the chip from this higher speed, so the power usage would be almost identical to just using an 8mhz crystal.


The reason I'm so confident it'll be perfectly okay is that all the CKDIV8 fuse does is initialize the CLKPR register to some number other than 0 before jumping to reset vector on power up. This fuse is intended as a way to use the chip at lower voltages than those required for the internal 8mhz oscillator - but the oscillator still runs at 8mhz regardless of everything (except OSCCAL register...)! So atmel are kind of sort of already telling people to use clock prescaler to work around low power requirements.


On Through Holes for zenners:


I don't get what these through holes are for. I can kind of see the usefulness of having through holes for choosing between 5v and 3.3v on the regulator for your usual protoboard spark that you may reuse for prototyping a bunch of different projects, but for the zenners as well? It seems to me that there are only ever two reasons to disconnect the zenners:


In the first case, why would you want to be frequently changing this mode enough to have through holes and jumpers? And in the second case, exactly the same question again? For the majority case just leave the zenners always connected and they wont waste any power when the spark is running on 3.3v and they'll do their job when you set the regulator to 5v.


I strongly oppose making the PCB even half a millimeter bigger for something which doesn't seem to be actually useful. The whole point of the digispark is to be small! I would be perfectly happy not having through holes even for the regulator 3.3v/5v selection, unless it just so happens that your board layout leaves you with spare space to play with. I'd be fine with soldering a couple of wires on to the little surface mount jumper pads and connecting a switch for my prototype board spark. I'd much rather that than having a board be 0.1mm longer. Smallness is so important!


On reset pin fuse:


I'm 99.99999% sure there is no way for an attiny to program it's own fuses. There is no register for the reset pin, so it cannot be changed at runtime. If there is an option in the IDE to set if the reset pin to do GPIO or ISP functionality, it must work by the user plugging a high voltage serial programmer in to their computer, which the software uses in the usual way to change the fuse. The only other solution I can think of is faking it with a bootloader that hooks the reset pin via pinchange register and then implements the ISP upload protocol and pretends to be the AVR obaying the programmer, but that'd be so stupid! micronucleus USB upload go way faster than any of my ISP programmers anyway, and the bootloader still wouldn't be able to make all the progmem available for usage, and you couldn't change any fuses either. Believe me I have looked for this miracle fuse self programming mode again and again. I wish it was a thing you could do. I would be all over that thing!


On the reset pin thing though, keep in mind that I am biased because I love Micronucleus. I invented it explicitly so I could use that elusive reset pin on my attiny85's without danger. It is my fluffy and I will love it and feed it and call it george. I love my reset pin and none of you can take it away from me!!! To me, it seems like a crime to let a reset pin go to waste when we now have this glorious magical technology! All bow before the regal might of Micronucleus!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 14, 2013, 08:13:21 am
@Bluebie:
you are right with the reset pin. That was a shortage in my thoughts, caused by the patched avrdude in the IDE.

When I install a bootloader using littlewire, the original avrdude is running and the fuses are set in ISP mode.  As soon, as I am programming the digispark through the bootloader, the controller has allready started and the micronucleus-binary is talking with its counterpart.

So I have the fuse-option only in conjunction with ISP or HVSP.

So changing the fuse depends in both directions on some additional hardware (which could be in both cases a second digispark).

From that point changing the usage of the reset-pin isn't so trivial, as i thought in my previous post.

So the discussion is only, if the entry-level users of that device are needing reset-capability or another GPIO-pin. 
When reading the datasheet, it looks like, that PB7 with RSTDISBL is a full GPIO (and not one with a weak current, like in the attiny85)

regards

  gogol
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 14, 2013, 02:19:31 pm
The more I think about it the more convinced I am that reset should be disabled by default - so I'm going with that. I think it is better to have a spare i/o to use for the variation of the bootloader that uses an i/o pin to detect if it should go to programming mode - than to have a reset pin that 99% of people won't use.


Re: Prescaler and crystals - that makes sense to me - thanks for the explanation! I will certainly test with a scope when I get a prototype made.


Re; Through hole for zeners - yeah the more I thought about it the more it didn't make sense - I'll put solder jumpers on the bottom that can be cut.


Re: Voltage change - there is extra room for the header pins for that jumper - otherwise I wouldn't put it on.


Overall size is 20mmx20mm plus the USB plug part so only about 2mm bigger than the original


@Bluebie - I'm with you on the reset pin - but I'm equally biased - I think the beauty of the Digispark is that we push the attiny to its limits whereas most projects use way more powerful MCUs than they need - I don't want to lose that spirit and disabling it by default encourages people to use any pin they can.




Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 14, 2013, 03:28:32 pm
I've been looking at the electrical specs some more and I'm back to thinking that you should dump the pullup resistor and the 68Ohm output resistors, and put a ~100pf ceramic cap between the D+ and D-.
Take a look at table 21-1 of the datasheet.  With a Vcc@5v and 10mA of current out, the output voltage is 4.3v.  A 0.7v drop = 0.01A * R; R= 70Ohm  In other words the DC output impedance is 70Ohms.  Adding 68Ohms makes it out of the USB electrical specs.  The 1.5K pullup on D- is needed only for speed detection idle; not for data.  So the D- line can be put in output mode high upon bootup.  When a change is detected on D+, switch to input mode.  After the first transmission the port can be left in input, but with pullup enabled for the USB bus idle state.

Without the pullup and with the capacitor for slew rate control, the voltage swings will be lower.  With lower swings there's a better chance it will work fine without the zeners.  Can you tell I don't like the zeners? :-)

Erik, before you finalize the new digispark I think you should put a scope on the digispark while doing USB communication.  Try it with/without the 68Ohm resistors, with/without the 1.5K pullup, and try it with caps between the data lines.  I'd try one cap between the data lines, and also a separate test with a cap from each data line the way the USB spec states.  If you don't want to do it, send me a 50Mhz storage oscilloscope and I'll do it for you. :-)

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 14, 2013, 03:37:02 pm
@Bluebie - I'm with you on the reset pin - but I'm equally biased - I think the beauty of the Digispark is that we push the attiny to its limits whereas most projects use way more powerful MCUs than they need - I don't want to lose that spirit and disabling it by default encourages people to use any pin they can.

I think was the right choice with the t85; your usable pins goes up 20% in return for giving up the ability to reprogram the t85 with a standard programmer.  On the t167, it will leave you 14 usable pins instead of 13; only an 8% gain.  If you leave it as a dedicated reset pin, users will be able to use one digispark to program another - something I think will be a big benefit for power users.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 14, 2013, 04:57:03 pm
I will try to find time to scope it without the resistors/with caps. I'll have to read those specs in more detail and see the reasoning the v-usb folks gave (after all they might be making up for other things not being in spec, I believe that was brought up before)


Regarding the pull-up - as I said before - if micronucleus supports that (Bluebie has mentioned that it can't I believe) then I'd do it - but Digisparks follow micronucleus in compatibility as far as the usb side of things is concerned. I will certainly have a cuttable trace/solder jumper for the 1.5k pullup though.


Zener's aren't going anywhere - it is more important that the digispark doesn't destroy things (while used properly at least) then it is important that it has less parts. With 14 i/o it becomes more acceptable that the USB pins are limited as well.


As far as the reset pin - the reality is most of our 10k+ users are not power users and a power user could reprogram it with a virial payload reprogrammer like bluebie made or a fuse reseter (we'll have an official one some day, it is already designed, just not enough time yet to produce it) - it might make more sense to enhance the viral payload reprogrammer to the point that it is a drag and drop type tool then to remove a pin from everyone - thinking about this more deeply though there is no reason we can't call it both ways since we'll be building these in house, so that likely makes it a mute discussion - if we do a big survey of our users and think that even 100 people want to buy them with reset enabled then we would produce it both ways - heck we could program them as we pack them possibly (but more likely we'll program entire panels at a time)



Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 14, 2013, 09:09:04 pm
I will try to find time to scope it without the resistors/with caps. I'll have to read those specs in more detail and see the reasoning the v-usb folks gave (after all they might be making up for other things not being in spec, I believe that was brought up before)

Regarding v-usb, Christian is a software guru, not hardware.  The fact that the software work (especially the AVR assembly) is well documented while the electrical side is not supports that assertion.  Jenna suggested they have a reason for not doing it the way I suggested, which seems to be the classic argument from authority logical fallacy.
One of my favorite quotes is from Einstein: "Unthinking respect for authority is the greatest enemy of truth."

Micronucleus could certainly work without the pullup.  If Jenna doesn't want to do it, I'll code the patch myself and test it on a digispark with the pullup trace cut.  If you find the time to check the scope for my suggested interface changes, then you could have a concrete reference to see if changes (such as no pullup) are quantifiably better.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 15, 2013, 12:10:52 am
@CBCracker:
Quote
If you leave it as a dedicated reset pin, users will be able to use one digispark to program another - something I think will be a big benefit for power users.
I believe, that power users have no problems, doing what they want.  For me the pin-restrictions of the digispark were the biggest problem, as four of six pins have different restrictions, causing firsthand unforeseen behaving of applications. 
So I went the way down, programmed core attinys with an disgispark as IS-Programmer with littlewire, which solved all the USB related problems.

As it will be more difficult with the 167 for beginners to program core-chips (as they are not available in DIP-packages) I think, that Eriks statement is right, to give as many as possible PINs without restrictions to the users.  The nice thing is, that at least reading the datasheet, that PB7 is a full GPIO-pin on the 167 and not one, with a weak drive, like in the 85!

That is why I support also your ideas of getting rid of zeners and pullups und the USB side, and from what I was reading in the last month, I see nothing, which contradicts your opinion. If you have patched versions of the bootloader, I volunteer for testing!

regards

  gogol

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 15, 2013, 12:34:18 am
Regarding v-usb, Christian is a software guru, not hardware.  The fact that the software work (especially the AVR assembly) is well documented while the electrical side is not supports that assertion.  Jenna suggested they have a reason for not doing it the way I suggested, which seems to be the classic argument from authority logical fallacy.
One of my favorite quotes is from Einstein: "Unthinking respect for authority is the greatest enemy of truth."


It may be true that it is entirely possible - and it seems you certainly know what you're talking about, so I don't doubt you - like myself and most people here, Bluebie doesn't have any formal training in electronics - so that leaves most of us to follow advice and what resources we can get our hands on - it is  great to have you as one of those resources on the hardware side of V-USB. I'm very interested in seeing it work without the pull up but it seems I can't test that with micronucleus without it being patched - and that falls outside of my expertise, I could and would stumble through it the next time I have time, but that won't be for quite awhile (DigiX production + adding components selection to the webstore is keeping me up all night right now). If you want to submit a patch for it that would be awesome - and then I would test it on the double - not only would I appreciate it - but I bet Bluebie would as well, I know that a lot of people suggest things for micronucleus but only a few (a wonderful few!) actually submit improvements and rarely are those things that would improve the bootloader for everyone (usually they are aimed at a very niche goal). Bluebie doesn't get paid to maintain it or work for Digistump in any way, which is awesome because it keeps us from having control over a bootloader that should be there for any hardware, we (Digistump) do sponsor it when we can with hardware - but otherwise I'm committed to using micronucleus in whatever direction it goes. So if you want to steer it in the direction of not requiring a pullup (if you do - I'd suggest making it a compile time option for backward compatibility) that would be really cool - I'll even send you some early Pros to play with if it works.


Both Bluebie and you are far smarter than me when it comes USB stuff - but I am starting to get the reasoning behind no resistors on the line (because impedance is 70 ohms already) and in my recent work with proper USB devices which keep recommending ~30ohm resistors the ~60ohm ones were starting to seem high - of course I'll scope this and log it to the computer and share it as soon as I get a chance (I'm still new to my current scope - a Rigol DS1102E - so it might take some fiddling (previously had an analog scope... which I often miss). One question on this - isn't USB suppose to have a 90 ohm impedance - so therefore a 20 ohm would be more appropriate than none?


Now a capacitor between the data lines I've never seen on any usb circuit (most of which I look at are atmel examples) proper or v-usb - I do often see the capacitor to ground though - so I'm thinking (with the bit I know) that the idea there is to get away with one cap instead of two since USB data lines are mirrors (twisted pair) so it would work to dampen/control the change in voltage(slew rate). Please correct me if I'm wrong!

On the zeners - am I correct that even with all of this - without them when running at 5v it would be exceeding the USB spec of 3.3v (3.6v) max? If there are solder jumpers to disconnect the zeners, do you still hate them? How about you gogol?


When we sell to retailers we have to say that we didn't knowingly design something that would harm a users personal property - while we interpret that loosely - putting 5v on a 3.3v data line might not be honoring the spirit of that....


Thanks for all the technical input!





Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 15, 2013, 02:19:49 am
Regarding v-usb, Christian is a software guru, not hardware.  The fact that the software work (especially the AVR assembly) is well documented while the electrical side is not supports that assertion.  Jenna suggested they have a reason for not doing it the way I suggested, which seems to be the classic argument from authority logical fallacy.
One of my favorite quotes is from Einstein: "Unthinking respect for authority is the greatest enemy of truth."

[size=78%]It may be true that it is entirely possible - and it seems you certainly know what you're talking about, so I don't doubt you - like myself and most people here, Bluebie doesn't have any formal training in electronics - so that leaves most of us to follow advice and what resources we can get our hands on - it is  great to have you as one of those resources on the hardware side of V-USB.[/size]

Who said anything about formal training?  I'm a university dropout (computer science).  Look how far Bill Gates, Larry Ellison, & Mark Zuckerberg got without a degree!


[/size][size=78%]So if you want to steer it in the direction of not requiring a pullup (if you do - I'd suggest making it a compile time option for backward compatibility) that would be really cool - I'll even send you some early Pros to play with if it works.[/size]
OK, though I probably won't get to it until September.  My first priority is to get the NRF24l01's working with the digistump on 4 wires like I promised you.  For projects I do for fun, I tend to complete them to the point where I solve the tough problems, and then move on to the next challenge.  It might not surprise you that I have ADHD. :-)



[/size][size=78%]One question on this - isn't USB suppose to have a 90 ohm impedance - so therefore a 20 ohm would be more appropriate than none?[/size][/quote
USB termination is a confusing topic, especially since a USB 2.0 host has an active transceiver which switches between voltages and impedances.  We're only concerned with the electrical requirements of low & full speed ports.  I highly recommend reading the Semtech application note I posted last month.  Here it is again:
http://www.semtech.com/images/datasheet/usb_line_termination.pdf (http://www.semtech.com/images/datasheet/usb_line_termination.pdf)
Since the Digistump is normally plugged directly into a USB port, there is no cable impedance to match.  The 45-Ohm PER END termination (90 Ohm total) you refer to is based on a 90 Ohm twisted pair cable between the transceivers.  Some v-usb devices I've seen have a mini-B connector and use a cable to connect to the PC.  I suspect the 68Ohm suggestion from Objective is assuming a cable connection, and also based on a mis-reading of the USB spec requiring 90Ohms per end rather than total for both transceivers.


[/size]

[/size][size=78%]Now a capacitor between the data lines I've never seen on any usb circuit (most of which I look at are atmel examples) proper or v-usb - I do often see the capacitor to ground though - so I'm thinking (with the bit I know) that the idea there is to get away with one cap instead of two since USB data lines are mirrors (twisted pair) so it would work to dampen/control the change in voltage(slew rate). Please correct me if I'm wrong! [/size]
You're bang on there.



[/size]
[size=78%]
[/size][size=78%]On the zeners - am I correct that even with all of this - without them when running at 5v it would be exceeding the USB spec of 3.3v (3.6v) max? If there are solder jumpers to disconnect the zeners, do you still hate them? How about you gogol? [/size]
I'm pretty sure there's not even anything in the spec that says the voltages can't be over 3.6v; in fact I read somewhere (maybe even the USB spec itself) that with 0-3.3V output the signal will swing between -1v and 4.2v with a typical transceiver design. 
The 0-3.3v output drivers are specified to guarantee a minimum "eye" for signal integrity.  Driving at 5V will increase the eye.  The only possible negative is reflexions, but with no cable and at 1.5mbps that is a non-issue.  At ~200cm/ns for electrical propagation speed, a 3M cable would mean a few ns for reflections, which could be enough to cause problems for full-speed.
With jumpers to disconnect the zeners it's not an issue; it's just a business decision for you if you think it's worth the cost.  Personally I'd like to see a digispark plus that is about the same price and size as the original (which I think you could do if you dump the 5v regulator), but I don't imagine you'd want to make your inventory of the current digisparks obselete. :-)

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 15, 2013, 03:20:41 am
I guess it should be a compliment that I thought you were formally trained! at least since I didn't mean it in the "oh he must be an engineer" sense. I have a degree in Economics - I've yet to do anything related to it, except of course run a business, but I was doing that well before the degree.


I'll beat my head against the app note and USB spec some more - it is long over due - thanks for the clarifications, they make far more sense than any spec docs!


The zeners are about 2 cents together - you're right about the 5v reg, it would be a bigger effect, but still only 22 cents (with external parts) - I'd like to do a no regulator version, an onboard led version (with the attiny85), and a version with a mini/micro usb plug - if the no regulator version approaches the price of the Digispark it won't make it obsolete - I'll just make the original Digispark cheaper (which I can do if I bring the next batch of production in house, as I plan to for the pro).


I'll try the capacitor and removing the resistors on the o-scope as soon as things settle down - thanks for helping me to finally really understand all that.


@everyone else - If anyone else wants to patch micronucleus to try it with no pull-up I'd be grateful (and probably send some small gifts), if not I should have time when the DigiX stuff settles down to give it a go if no one else gets to it first


off to continue to buy every sam3x8e in the USA...
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 15, 2013, 05:49:59 am
Hi,

Quote
On the zeners - am I correct that even with all of this - without them when running at 5v it would be exceeding the USB spec of 3.3v (3.6v) max? If there are solder jumpers to disconnect the zeners, do you still hate them? How about you gogol?

Solder jumpers would a big step forward, as it would allow to reuse a digispark again with zeners, after disabling them for some projects. Before I went to program plain attinys, I destroyed the zeners on one spark with a scalpel, which is irreversible.  The solder-bridge would be reversible.

In the meantime, i played with self-constructed USB-adapters, where I used through-the-hole zeners, which made more problems, than the tiny smd-zeners of the digispark. I have now two digisparks, where I removed the (broken) controller. I can use them as well as USB-adapter to core-attinys, and they work in some scenarios, where my own adapters don't work.  However, when I remove the zeners from my adapter, they are working as well.

However, and there comes the point, where I agree with Erik:
I have not tried connecting my adapter without zeners to my workstation and current working notebooks. I tried that only on some 8yr++ computers.

I haven't found up to now clear statements in the USB documentation stating either, that 5V is OK or that there is any danger over 3.3V.

From there I agree with Erik, that you need to be on the safe side, when he is releasing products.  So I think, that we need to find either very clear statements (in addition to the proof of concept) or we have to live with a solution like the solder bridge.

Replacing the pullup with a software solution is form my point of view much higher priority!

As USB will work with cutted zeners (in some cases maybe even better), it will not work with a cutted pullup!  Furthermore the pullup destroys the use of the pin even more, than the zener.

regards

  gogol








Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 15, 2013, 08:22:48 am
off to continue to buy every sam3x8e in the USA...

I know its too late to change the digiX now, but maybe for a "digiX lite" this chip would be worth considering: MK20DX128VLF5.  They're at least half as powerful as the sam3xe for 1/3rd the price (266c/q100 @digi).
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 15, 2013, 10:04:40 am
@gogol - that pretty much follows my thoughts exactly regarding both the zeners and the pull-up and priorities and caution.


@CBCracker - lost of great ARM chips that are much much cheaper than the sam3x - but also a boatload of work to add full arduino support for one and maintain it - and then libraries etc would all have to be ported. The goal of the DigiX was 100% compatibility with the Due so we were stuck with at the very least the SAM3 series. I hope to work with ARM chips more and make more products with them - but those likely would be a departure from "Arduino" as I've been talking with other folks about new IDE options that are more full featured/more user firendly.


To get back on topic - I ordered a bunch of parts to start prototyping the Pro in the next month or so!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 15, 2013, 05:03:43 pm
@CBcracker - one thought I've had about pulling the resistors - we're making the assumption it is usually plugged in directly with no cable - which might be wrong seeing as every Digispark I have attached to a computer right now is on an extension (some several meters long). SO perhaps the resistors need to be there but just a lower value to find an inbetween ground when plugged direct vs on a cable?
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 15, 2013, 06:20:49 pm
@CBcracker - one thought I've had about pulling the resistors - we're making the assumption it is usually plugged in directly with no cable - which might be wrong seeing as every Digispark I have attached to a computer right now is on an extension (some several meters long). SO perhaps the resistors need to be there but just a lower value to find an inbetween ground when plugged direct vs on a cable?

If the termination is not perfectly matched, you'll get reflections; the further it is off, the stronger the reflections.  However as I posed before about electrical propagation delays, it will be way too fast to affect 1.5Mbps communication.  You shouldn't even be able to see the difference (with vs. without terminating resistors) on your 100Mhz scope.  If you add caps for slew rate control, then the resistors *will* make a noticable difference of what goes out to the host USB port; they will be much higher than the ESR of a ceramic cap, and will help the caps dampen the voltage swings.  It should be pretty obvious if you put two scope lines on the t85 pins for D+/D-, and two more scope lines on the USB female connector's D+/D-.
In the end the resistors shouldn't make much difference to what the host sees, since it's transceiver will have series resistors on it, but they'll probably be internal to one of the ICs so you won't be able to trace it on your scope.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: defragster on August 16, 2013, 03:53:21 am
 Just saw this from kick starter fall 2011: http://moderndevice.com/product/extracore/#!prettyPhoto - Yes, I'm new to this area.  Here’s hoping to add something:
 
That XCore is $15 and but very minimal - excepting the high cost/pin processor? My ideal Pro: as many uniformly usable pins as the Spark could be cleaned up to have, not wasting any 'runtime' power on dev time hardware so a battery could last longer with a small footprint at a cost low enough to put them anywhere they could be of use.
 
The XCore loses that on cost and uneeded pins for tiny jobs, but has simplified/reduced so much else that it is only marginally larger than a Spark because of the USB tab.  That USB tab is ‘the cool part’ with power and completeness – but also the non-standard part bringing overhead.
 
If the Spark lost any of the USB tab/support and gained usable pins - and had lower run-time power that would be a Pro. The XCore uses external USB/Serial - is that what was meant on this thread [gogol:4228] by using a Spark for a programmer? If not then a standard USB/Serial card would complete my idea of a Pro. Any possible reduction in the micronucleus giving more code space is also a Pro. Especially if the standard IDE interface could be used for programming without the software serial requiring the user to jump through hoops on every code edit.
 
The user can add a pilot light when needed. Does dropping power count as a full reset? There seemed to be other wins if this didn't plug direct into USB port (thinner, gold free board), if the $4 programming tool became smart with a Spark, or just split off the development support pieces, the Pro would be a much smaller XCore. 
 
If a programmer and a Pro were $16 – but ~$30 for a Pro four pack – it could have needed support for a beginner as a Pro upgrade and a better cost per I/O utility factor for real world jobs.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 16, 2013, 09:09:20 am
Just saw this from kick starter fall 2011: http://moderndevice.com/product/extracore/#!prettyPhoto (http://moderndevice.com/product/extracore/#!prettyPhoto) - Yes, I'm new to this area.  Here’s hoping to add something:
$15 for a small ATmega328 board is about 3x overpriced.
http://www.fasttech.com/products/0/10004915/1380906-pro-mini-microcontroller-circuit-board-module-for-
The pro mini is also better for breadboarding since most of the pins run down the sides.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: defragster on August 16, 2013, 10:46:38 am
Wow, 5 for $23.70.  I posted then saw ATmega328 in 10 count for $2 each, about the same as the Attiny85 - I expected more $ diff.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 16, 2013, 11:18:28 am
A Digispark will never be unable to program itself - that is the premise of the Digispark and also a personal thing for me - I hate "development" boards that you need another board/programmer to use - to me then it is just a breakout board (which certainly have their place). I've also decided somewhere in this all that the Digispark will always be an Attiny device.


Will we ever produce an atmega device? - most certainly, but it will be its own line. Atmega328 devices have been done so many times, by so many talented people it just isn't a market we want to compete with right now - we couldn't make the extra core for less, and comparing their prices or our prices to China will never match up - heck we've yet to pay ourselves a dime and we still can't match Chinese prices, we never will be able to because even if we were to have it made there we still pay to get it to the US and pay taxes on it when it comes in and pay taxes on the income, don't have subsidized shipping, have much higher costs for utilities, buildings, etc. Someday we'll also have to pay people for providing support, community, instructions, etc - as my 9am-3am days are getting long. For this reason I do and will continue to ignore comparisons between our prices and Chinese prices. If someone ever says "Hey sparkfun/adafruit has this for less" that will have my attention, we carefully set our prices to be significantly more affordable than other quality US companies who provide similar levels of support, community, schematics, board files, instructions, etc.


When we make an atmega device it will be a breakout board or simple dev boardand it will be to compliment our flagship products like the DigiX and Digispark or it will be our own take on the standard Arduino aimed at lowering the price while still providing a US made, quality, and paying royalties to Arduino if requested. Which is another reason we've stayed away from the atmega arduino compatibles - we feel that innovation is just as important as affordability, etc - sure I can make an atmega board smaller, cheaper, etc - but in the end, at best, it will only be marginally better - the Digispark makes the attiny series far easier to use and inspires real innovation in using less resources, smaller boards, etc - we feel this is likely a reason for the interest it generates (it's not just another clone/derivative). If you're in need of an atmega based board I strongly recommend the extra core or femtoduino - they are both great boards made by great folks!








Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: defragster on August 16, 2013, 12:32:54 pm
Good points indeed.  I was looking at the extreme minimization for power savings - looking for some gain in the middle.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 16, 2013, 04:03:40 pm
One thing the pro will have - if it isn't obvious is solder jumper to detach anything that uses power - these will be on the zeners, LEDs, etc. That combined with sleeping the chip and clocking it down should allow for extremely low consumption
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 16, 2013, 11:33:53 pm
Wow, 5 for $23.70.  I posted then saw ATmega328 in 10 count for $2 each, about the same as the Attiny85 - I expected more $ diff.
If you're gonna buy 5, last week I posted an AliExpress link to a seller with a price of $17.50 for 5 with free shipping.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: defragster on August 17, 2013, 03:45:23 am
Indeed you did - That link is going for US $16.62 right now.  I wasn't looking for 5 - just went to the 5 count price break.  I was on the end of that 8/8 post . . . should have gone back.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: defragster on August 17, 2013, 04:04:25 am
One thing the pro will have - if it isn't obvious is solder jumper to detach anything that uses power - these will be on the zeners, LEDs, etc. That combined with sleeping the chip and clocking it down should allow for extremely low consumption

I missed that and just caught the discussion as proposals to go that way.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: Bluebie on August 17, 2013, 06:55:51 am
Yeah this all sounds totally rad - especially if CBcracker can get micronucleus working without external pullup - that would be really really great. I don't know much about this stuff.. despite being the maintainer, inventor and main contributor to micronucleus, I have no idea what I'm doing a lot of the time. I don't even know assembly, and there is quite a bit of assembly in micronucleus. If you want to fork micronucleus and be the next Bluebie, please do! Otherwise, my rules are simple: If you want me to pull your thingy and maintain it in to the future, you have to make it using tools I understand - that is, it has to either only replace code in v-usb's drv thing, or it has to be written in well commented C, formatted in the same style as the rest of micronucleus.


@Digistump Digispark with microusb socket! yes please! Maybe on the bottom side? I love anything that makes digispark smaller in it's default configuration. I often find I'm trying to cram the digispark in to tubes, so if you made it such that it was like 16mm across on one direction, that'd make it really a very nice thing.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: kehribar on August 17, 2013, 08:12:35 am
Hi,

In a slightly unrelated topic, here my couple of suggestions.

A reset button can be achieved on the standard digispark by putting a transistor/mosfet/high-side switch between USB 5V and the main VCC line. User can push a button to cut the power then release to reset the device. This way, teensy like "OK, I compiled your program. Please push the reset button to upload" workflow can be achieved. I don't like the plug/unplug routine very much. :)

Finally, real USB connector, or even a footprint, would be nice :)

For cost/size reduction purposes, **big** 500ma voltage regulator can be replaced with a sot23-5 sized small LDO. User, if needed, can put an additional high power LDO to drive motors/LEDs externally. I don't know whether that substitution will be enough to keep the cost low enough but if not the two can be added to an experimental _pro_ version of the digisparks.

Best,
ihsan.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 17, 2013, 05:35:04 pm
Yeah this all sounds totally rad - especially if CBcracker can get micronucleus working without external pullup - that would be really really great. I don't know much about this stuff.. despite being the maintainer, inventor and main contributor to micronucleus, I have no idea what I'm doing a lot of the time. I don't even know assembly, and there is quite a bit of assembly in micronucleus. If you want to fork micronucleus and be the next Bluebie, please do! Otherwise, my rules are simple: If you want me to pull your thingy and maintain it in to the future, you have to make it using tools I understand - that is, it has to either only replace code in v-usb's drv thing, or it has to be written in well commented C, formatted in the same style as the rest of micronucleus.

Well, once I get the f**king avr-gcc assembling my code correctly it shouldn't take me long to get a version working without the pullup.  I only plan to change a few lines of the v-usb assembly code.

As for forking micronucleus, since I want the bootloader in assembly to keep the size down that's not really an option.  I think I can get it under 1K by doing it in assembly, and follow the USBaspLoader using HID so it will work with standard avrdude.  I'll put it all into picoboot and have it build the base bootloader (under 64 bytes so far!), and another with the usbasp emmulation.

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: Bluebie on August 18, 2013, 07:51:50 am
So far as I have seen there aren't any USB programmers you can emulate without modifying the protocol or hacking avrdude, because the attiny85 does not have the capability of flash self programming while executing instructions, so every time you request an erase or write, the chip goes to sleep for a couple of milliseconds - if host pc makes any kind of USB request in this time it throws a tantrum and considers the device disconnected. Micronucleus devices communicate their timing requirements to the host, and the software sends requests and then delays to avoid sending any new requests until the chip has had time to wake up again. This works almost all of the time, and when it doesn't, usually the chip reenumerates and the upload app sometimes can detect that and continue the upload, having only stalled for a second or so. Unless you have a neat way of telling the host computer "I'm busy leave me alone!" which doesn't require the chip to respond to interrupts or do anything really at all to change the state of the IO for several milliseconds, you wont be able to emulate USBaspLoader properly. See also USBaspLoader-tiny85 - an attempt at doing just that, which gave birth to micronucleus when it became clear avrdude compatibility in usb bootloaders wouldn't be an option for tiny85 chips.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 18, 2013, 08:09:35 am
So far as I have seen there aren't any USB programmers you can emulate without modifying the protocol or hacking avrdude, because the attiny85 does not have the capability of flash self programming while executing instructions, so every time you request an erase or write, the chip goes to sleep for a couple of milliseconds - if host pc makes any kind of USB request in this time it throws a tantrum and considers the device disconnected.
Avrdude shouldn't have a problem with it, since it has no issue programming the attiny using the stk200 protocol.  As for the USB protocol, I'll have to look into that.  I recall SE0 pulses every ms or so from the host to keep the USB device from going to sleep.  I'd think the 4.5ms maximum delay for flash programming shouldn't be a problem.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 18, 2013, 09:32:38 am
So far as I have seen there aren't any USB programmers you can emulate without modifying the protocol or hacking avrdude, because the attiny85 does not have the capability of flash self programming while executing instructions, so every time you request an erase or write, the chip goes to sleep for a couple of milliseconds - if host pc makes any kind of USB request in this time it throws a tantrum and considers the device disconnected.
Avrdude shouldn't have a problem with it, since it has no issue programming the attiny using the stk200 protocol.  As for the USB protocol, I'll have to look into that.  I recall SE0 pulses every ms or so from the host to keep the USB device from going to sleep.  I'd think the 4.5ms maximum delay for flash programming shouldn't be a problem.
Did some more investigation, and don't see any insurmountable hurdles.  USBasploader/HIDbootloader don't use interrupt endpoints which could cause timeout issues.
https://github.com/baerwolf/USBaspLoader/blob/4fbce7ba82c62eacc957109ebcc33d5884aa89b4/firmware/usbconfig.h

Windows supposedly has a default polling interval of 8ms (not sure if that is just for control endpoints or if it ignores the interrupt endpoint polling interval), but in either case at most one poll packets would be missed with a 4.5ms delay during programming.
http://www.nextlevelgamer.com/tweaks/optimizing-your-usb-mouse-polling-rate

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 18, 2013, 04:25:22 pm
So far as I have seen there aren't any USB programmers you can emulate without modifying the protocol or hacking avrdude, because the attiny85 does not have the capability of flash self programming while executing instructions, so every time you request an erase or write, the chip goes to sleep for a couple of milliseconds - if host pc makes any kind of USB request in this time it throws a tantrum and considers the device disconnected.
Avrdude shouldn't have a problem with it, since it has no issue programming the attiny using the stk200 protocol.  As for the USB protocol, I'll have to look into that.  I recall SE0 pulses every ms or so from the host to keep the USB device from going to sleep.  I'd think the 4.5ms maximum delay for flash programming shouldn't be a problem.
Did some more investigation, and don't see any insurmountable hurdles.  USBasploader/HIDbootloader don't use interrupt endpoints which could cause timeout issues.
https://github.com/baerwolf/USBaspLoader/blob/4fbce7ba82c62eacc957109ebcc33d5884aa89b4/firmware/usbconfig.h (https://github.com/baerwolf/USBaspLoader/blob/4fbce7ba82c62eacc957109ebcc33d5884aa89b4/firmware/usbconfig.h)

Windows supposedly has a default polling interval of 8ms (not sure if that is just for control endpoints or if it ignores the interrupt endpoint polling interval), but in either case at most one poll packets would be missed with a 4.5ms delay during programming.
http://www.nextlevelgamer.com/tweaks/optimizing-your-usb-mouse-polling-rate (http://www.nextlevelgamer.com/tweaks/optimizing-your-usb-mouse-polling-rate)
USBaspLoader-tiny85 already does what I'm planning to do (except in a lot more code space):
https://github.com/embedded-creations/USBaspLoader-tiny85
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: Bluebie on August 19, 2013, 04:51:52 am
USBaspLoader-tiny85 requires you patch the USBasp driver in your avrdude installation with a bunch of experimentally determined delays which stop it from making another usb request until the device has had time to do it's busy work. USBaspLoader-tiny85 crashes the usb connection immediately during any sort of flash write or erase with normal avrdude builds, and once you modify avrdude, it will be much slower for ALL usbasp devices, not just these hacky tiny85 ones. I would have implemented a standard protocol if I could have found one, but there were none where the device could communicate it's delay requirements to the host suitably so I create micronucleus protocol to address this, since it was clear avrdude could never support attiny85 usb bootloaders without special drivers written specifically for these devices anyway, so the protocol may as well be one designed for compact bootloaders rather than for programmer devices with plenty of progmem to go around. For example, micronucleus doesn't have to fake flash reads to satisfy avrdude verify steps, nor does it have to pretend to be able to read and write fuses in any meaningful way. USBasp protocol is the main reason USBaspLoader-tiny85 is like half a kilobyte bigger than micronucleus.


Micronucleus protocol is designed to be useful on other chips aside from tiny85 series. The protocol is documented at https://github.com/Bluebie/micronucleus-t85/wiki/Programming-Wire-Protocol-Specification so you don't need to read through any of my messy source code to figure out what's going on. You can even set the delays to 0 on chips which don't need to sleep while self programming flash, and just use it as a neat compact and fast upload protocol. ^_^
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 19, 2013, 06:42:48 am
USBaspLoader-tiny85 requires you patch the USBasp driver in your avrdude installation with a bunch of experimentally determined delays which stop it from making another usb request until the device has had time to do it's busy work. [...]
OK, you've convinced me USBasp is not the way to go.  AVRdude *does* handle the delays for a number of programmers, and my preference is to avoid a custom programmer.  Digging through the code, I found USBtinyISP handles the delays appropriately.  http://learn.adafruit.com/usbtinyisp
usbtiny.c line 425: usleep( p->chip_erase_delay )

Strangely, although usbtinyisp supposedly uses the v-usb code, just a hex file for flashing to the ATtiny is included so I can't tell what changes they've made to the v-usb code.  However I can figure out enough from usbtiny.c to be able to make a compatible usb bootloader.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 19, 2013, 07:56:24 am
Yeah this all sounds totally rad - especially if CBcracker can get micronucleus working without external pullup - that would be really really great.

Finished the first shot at the code changes, but it looks like I have to fix a build bug in micronucleus first:
avr-gcc -Wall -Os -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-functions -I. -Ilibs-device -mmcu=attiny85 -DF_CPU=16500000 -DBOOTLOADER_ADDRESS=0x1780  -o main.bin usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o libs-device/osccal.o -Wl,--relax,--gc-sections -Wl,--section-start=.text=1780,-Map=main.map
/opt/cross/avr/lib/gcc/avr/4.5.3/../../../../avr/bin/ld: warning: -z relro ignored.
/opt/cross/avr/lib/gcc/avr/4.5.3/../../../../avr/bin/ld: address 0x2038 of main.bin section `.text' is not within region `text'
/opt/cross/avr/lib/gcc/avr/4.5.3/../../../../avr/bin/ld: address 0x2038 of main.bin section `.text' is not within region `text'
collect2: ld returned 1 exit status
make: *** [main.bin] Error 1

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 19, 2013, 05:00:08 pm
Well, I was a bit dumb.  It took me about an hour of digging around until I clued into the fact that 0x2038 is larger than the 8K (0x2000) flash size of the t85.  Not knowing the size of the bootloader until it's compiled is one of the things I don't like about C vs assembly.  I noticed the build was using ' -fno-inline-small-functions'.  inlining small functions is usually good thing for code size since the compiler does it when the size of the inlined code is only a couple instructions.  Anyway with that gone the end of the code was at 0x2010.  Still not small enough.  If I define BOOTSTART to 0x1740 it fits, but I'm going to try to pare a few more bytes out of the code...

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 19, 2013, 06:01:36 pm
@CBCracker - can you share your code changes on github or something? I'd love to try it even with it slightly big.


@ihsan - the big DPAK regulator was there on the first Digispark because it was (and still is cheaper) - in order to fit the bigger MCU we're going to a sot223 type LDO, though it costs a few more cents. Regarding a reset button - we won't be adding any buttons or switches any time soon - they just cost too much in pick and placeable format (even cheap ones from dubious suppliers)- that is the purpose of the prog tool for those who don't like unplugging.


USB connector footprint unpopulated on the bottom all of them is a good idea i"ll make sure to add that to the pro. A populated one with the current USB tab removed and connector will be on top, because placing even one part on the bottom would double assembly cost/time - will come after the pro  - very soon after hopefully!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 19, 2013, 06:06:33 pm
Well, I was a bit dumb.  It took me about an hour of digging around until I clued into the fact that 0x2038 is larger than the 8K (0x2000) flash size of the t85.  Not knowing the size of the bootloader until it's compiled is one of the things I don't like about C vs assembly.  I noticed the build was using ' -fno-inline-small-functions'.  inlining small functions is usually good thing for code size since the compiler does it when the size of the inlined code is only a couple instructions.  Anyway with that gone the end of the code was at 0x2010.  Still not small enough.  If I define BOOTSTART to 0x1740 it fits, but I'm going to try to pare a few more bytes out of the code...

There was a lot of low-hanging fruit in the micronucleus code.  tiny85FinishWriting was commented out, but the didWrite... global variable was still defined and used in writeFlash.  I got rid of that.  There's also a lot of code turning off and on intterupts, and sometimes saving/restoring SREG.  I don't know why it's being done, and I double checked the datasheet and cant find anything about interrupts needing to be turned off during flash erase.  So far I've got it building to 2164 bytes, including the few extra lines of code to for setting USBMINUS to output high for it to work without pullup.  I think I can easily a few more lines of code, but not enough to get down to 2048.  I'll give avr-gcc 4.7 a quick try to see if it generates smaller code than 4.5.3...
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 19, 2013, 06:26:55 pm
@CBCracker - can you share your code changes on github or something? I'd love to try it even with it slightly big.

My stomach churns with angst because I'm not doing good code management.  Making changes to a local copy is a bit of a hack.  I don't want to start my own repository since that's too much code duplication.  As it is it seems silly that micronucleus, USBaspLoader, ... all having separate clones of the v-usb code.  I think what would be best is if micronucleus was on google code, and I (and others) could svn ci off the main branch.  If Jenna approves of the code change, she could tag it to the main branch, and if she doesn't it still would be available for people who want to try experimental stuff.  Maybe there's a way this would work in git, but I'm really a CVS guy, which has been pretty much superceded by subversion.

The digispark I ordered still hasn't arrived, so I can't give it a real test yet.  So until something is worked out on how to manage the code, I'll just send it to you in an email.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 19, 2013, 07:25:37 pm
avr-gcc 4.7 is a no-go.  It's more strict, and so the code would require a bunch more changes to compile.  Here's just one of the errors:
usbdrv/usbdrv.h:479:5: error: variable 'usbDescriptorStringVendor' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

So I'm back to version 4.5.3, with the micronucleus code compiling to 2142 bytes...

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 19, 2013, 07:51:28 pm
The next thing I'm looking at removing is tiny85FlashInit().  It's called a few lines into main(), and the comments say:
// check for erased first page (no bootloader interrupt vectors), add vectors if missing ...
Which seems redundant to me... if the bootloader is running, then the reset vector has to be pointing to it (at power up and reset the CPU starts executing from address 0x0000).

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: MichaelMeissner on August 19, 2013, 10:27:07 pm
avr-gcc 4.7 is a no-go.  It's more strict, and so the code would require a bunch more changes to compile.  Here's just one of the errors:
usbdrv/usbdrv.h:479:5: error: variable 'usbDescriptorStringVendor' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

So I'm back to version 4.5.3, with the micronucleus code compiling to 2142 bytes...
Basically as it is saying, you just need to go through all of the PROGMEM declarations, and add the 'const' keywork (which logically should have been declared const in the first place, but obviously the first implementation of PROGMEM did not require it).
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 20, 2013, 04:50:42 am
I'll try the capacitor and removing the resistors on the o-scope as soon as things settle down - thanks for helping me to finally really understand all that.

Looking at the schematic, you could put the caps in place of the zeners.  If the signal quality is better with the caps, even driving at 5v than it is trying to clip the signal above 3.6v, then the improvement can be done with no board change.  And obviously the same goes for the pullup resistor - just leave the pad unused.

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 20, 2013, 05:38:52 am
below the 2K mark!
avr-size main.hex
   text    data     bss     dec     hex filename
      0    2004       0    2004     7d4 main.hex

This is with BUILD_JUMPER_MODE defined.  I think that should have been the default all along.  No boot delay, smaller code, and all you have to do is connect a jumper wire (or low-ohm resistor) between D5 and ground when you want to enable the bootloader.

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: Bluebie on August 20, 2013, 09:33:17 pm
Interrupts are turned off during flash erase because in order to enable flash erase and write you must manipulate some registers with precise timing. If an interrupt fires inside those commands, it adds a delay and the write or erase fails, which would suck really hard.


The bootloader checks for interrupts because when first installed on to a blank chip, there are no interrupts in the first 6kb of progmem. This is how the bootloader sets itself up. Of course with the 'upgrade' version the upgrade program constructs a similar vector trampoline which is sufficient, so maybe I should work on getting those vectors embedded in the firmware to begin with and get rid of those few bytes.


Your micronucleus build is too big because you aren't compiling with avr-gcc 4.3.3. Other newer versions build it bigger. You're right in lowering the bootloader address - make sure you do so by multiples of 64 (the address is a hexidecimal number).


On what should be default, digispark users are fully able to switch to the jumper bootloader if they like. I think it's better to have something which just works. I don't use jumper much - I find it annoying always having to connect buttons or wires or whatever. I mainly use jumper version on my LittleWire (which I made by hand, before I got my first digispark), so that I can install different firmware's to my littlewire like cdc232 and littlewire software updates like 1.2 without having to wait for it to startup normally. I often plug in and unplug my littlewire to power cycle my circuits. For other things I just leave them plugged in and the delay isn't a bother. I think if Erik did ever come across a good cheap button supplier, it would be nice to have a "Program!" button and then I'd support making jumper the default, but until that happens I like the regular version better. Jumper is nice for things where you've already soldered on buttons - for instance my Volume Knob device I wired the knob pressed in connection through d5 so it can be held in to enable software updates.


As for git versus cvs - yeah you can import other repos in to folders inside, but I haven't learnt how because I don't want other repositories to be able to break micronucleus without me having done anything. I wont use google code. Git is what everyone's using these days - you should learn it - it's good!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 21, 2013, 03:14:24 am
Interrupts are turned off during flash erase because in order to enable flash erase and write you must manipulate some registers with precise timing. If an interrupt fires inside those commands, it adds a delay and the write or erase fails, which would suck really hard.
I think there are lots of places where Bluebie has been extra cautious about keeping people from bricking their Digisparks - an approach like that is essential given that some countries require us to provide a warranty.

On what should be default, digispark users are fully able to switch to the jumper bootloader if they like. I think it's better to have something which just works. I don't use jumper much - I find it annoying always having to connect buttons or wires or whatever.
Agreed - our biggest user base is first time Arduino users - asking them to hook up a wire/button to program and remove to not - or asking them to upgrade if they don't want to do that would result in the rest of my life spent doing tech support.

I think if Erik did ever come across a good cheap button supplier, it would be nice to have a "Program!" button and then I'd support making jumper the default, but until that happens I like the regular version better.
I only use the jumper version when I'm completely done with something AND it is startup time critical. A program button would be cool - I've found cheap buttons that are too big, and even some small ones that are relatively cheap (but still like 1/10 the cost of the rest of the parts combined) - but I have yet to find one that is small, cheap, and can be placed with a pick and place - generally the cheap ones are in bulk instead of tape and reel and hand placing them is cost prohibitive given that the Pro will be made in the USA.

As for git versus cvs - yeah you can import other repos in to folders inside, but I haven't learnt how because I don't want other repositories to be able to break micronucleus without me having done anything. I wont use google code. Git is what everyone's using these days - you should learn it - it's good!
Agreed - Please no google code ever. Git is worth learning as it is the standard for almost all Arduino libraries, programs, etc. (plus like every other new open source project). Personally I prefer SVN and use it in my day job with a codebase in the millions of lines of code - but Git is perfect for widely distributed projects like open source stuff.

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 21, 2013, 10:12:28 am
Getting the discussion back on topic (since I'm to blame for digressing into the bootloader discussion), one option for keeping the digispark plus cheap and small (i.e. USB PCB board rather than separate usb male connector) would be to do like a lot of the usb bluetooth and uSD readers do, and put the components on the back side of a think pcb.  I think the ATtiny1634 SOJ is 1mm thick, so a 1.2mm thick board and a .1mm thick plastic sticker covering the back side of the plug would give an overall 2.3mm of thickness.  That should also improve the electrical contact problems that some users have been having with the 2mm thick plug on the current digispark.

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 21, 2013, 10:14:38 am
Interrupts are turned off during flash erase because in order to enable flash erase and write you must manipulate some registers with precise timing. If an interrupt fires inside those commands, it adds a delay and the write or erase fails, which would suck really hard.

I'll start a new bootloader design thread to keep things separate.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 21, 2013, 08:13:27 pm
I have another suggestion for the digispark plus; make the breakouts parallel instead of the L-shaped pattern on the digispark.  It would be much easier for breadboard prototyping.  With the digispark you can solder male headers on the back for P0-P6, but Vin, Gnd, & 5v aren't on the same .1" spacing as P0-P6.  I unfortunately found this *after* I soldered male headers on the back of 5v & Gnd thinking they'd plug nicely into the + & - rails on my breadboard. :-(

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on August 21, 2013, 11:35:31 pm
@CBCracker: For that reason, I have soldered three cables with pings to Vcc, GND and 5V for my breadboard digispark.  I just plug the sic pins to the rail, and the power pins to the outside power lanes.  I made the cables just long enought, that I can reach the outer ends of my bigger breadboards.

.g
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 22, 2013, 07:48:29 am
@CBCracker: For that reason, I have soldered three cables with pings to Vcc, GND and 5V for my breadboard digispark.  I just plug the sic pins to the rail, and the power pins to the outside power lanes.  I made the cables just long enought, that I can reach the outer ends of my bigger breadboards.
.g

That would work, though I think what I'll do is unsolder the pins (even though it's a pain), and solder the 3-pin female header there.  That way I can plug it into a computer USB port without worrying about the 5v shorting out (did that once already and don't want to do it again).  When I plug it into a breadboard, I'll plug a couple jumper wires into the 5v/Gnd to connect to the power rails.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 22, 2013, 08:15:29 am
I think you should get rid of the schottky diode.  My understanding of the usb spec is that there has to be non-permanant current protection on the ports (i.e. current choke or resettable fuse).  It also drops the voltage by ~.3v when powered by USB - not really a big problem, but it was a source of confusion when I was measuring the power until I looked back at the schematic.

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 22, 2013, 10:17:04 am
re: Pins in parallel - already in the design! it will support the current shield format as well as pins in parallel format


re: Schottky - it is there to protect backflow to the USB when powering externally and does so cheaply and using little space (as opposed to an NPN a few resistors and a mosfet). As for the lack of current regulation - that kind of goes back to the premise that the Digispark is a hack and so it doesn't try to be in spec in non functionally necessary - resettable fuses are very expensive, so they are left out knowing that there is almost always one on the host end. We're considering them for the Pro but it is hard to swallow the price and size of them.


Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 22, 2013, 11:42:58 am
re: Pins in parallel - already in the design! it will support the current shield format as well as pins in parallel format
Great!  Now I want one.

re: Schottky - it is there to protect backflow to the USB when powering externally and does so cheaply and using little space (as opposed to an NPN a few resistors and a mosfet). As for the lack of current regulation - that kind of goes back to the premise that the Digispark is a hack and so it doesn't try to be in spec in non functionally necessary - resettable fuses are very expensive, so they are left out knowing that there is almost always one on the host end. We're considering them for the Pro but it is hard to swallow the price and size of them.

Powering it externally when it is plugged into USB seems redundant, and a rare use case.  I'd just leave out the diode and add a notice "device should not be plugged into a USB port when powered externally"  On the first day I had them I managed to blow the diodes on 2 digisparks.  Rather than replace them I'll short the pads so it won't be a problem any more.

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: Bluebie on August 22, 2013, 06:52:35 pm
I pretty much disagree with every suggestion CBcracker has made so far.


snap off PCB usb plug please, with little through holes behind it so you can snap it off and solder on a usb cable if the port is giving you trouble or you just want to mount it somewhere inside a thing. Shottkey diode does the job and I'm glad my digispark can't backwash in to USB ports on my computer. I'm less concerned about accidentally leaving the digispark hooked up to another power source and more concerned about capacitors and inductors in my circuit creating voltage spikes which could render the sensitive high speed processors with firmware in ram on my computer corrupt and perhaps even unconscious.


I don't think a fuse is necessary, I mean, who uses computers that don't have fuses on the ports? That would be insane! Maybe there are some cheap and nasty USB phone chargers which don't have them, but nobody should be going in to a relationship with a $3 usb charger expecting to have any protection what so ever from mains AC. Some of those things are just a rectifier, capacitor, and a linear regulator. So dodgy.


If you want jumper bootloader, just install it. I can't believe people are complaining that it's too hard. I made it so easy! You don't even need a programmer to do it! I don't know of any other arduino where you can change out the bootloader without an AVR programmer of some sort, just with a command line program!


Okay now I have one totally absurd request.. @Digistump Do you think you could put traces for a microsd card slot on the bottom of the digispark pro, wired up to the usual SPI pins? I mean, it's kind of a crazy request, but I feel like SD cards are so useful - you can play audio from them or log to them or store animations to control servos or lights or a zillion other things. I don't think you should necessarily put the lot on as well - especially because I imagine fabrication would be quite a lot more annoying if adding components to the bottom side. I would find that very useful for a whole bunch of applications - I would definitely maintain a library for dealing with them, optimised for the spark. It kind of makes more sense for the pro than the regular digispark because SD card libraries use at least 2kb of memory - 4kb if you want fat32 support - but on a device with 14kb or so of memory 4kb doesn't seem nearly so bad. As well, it'd totally be rocking in regards to the 3.3v mode, seeing as you wouldn't need a bunch of level conversion stuff! Yeah? yeah. Keen to hear what you think of that one. It's kind of weird and specific, but also so useful and potentially fun! If not keen, perhaps a shield? Smallness would be very important for my uses. There are remarkably few very small devices on the market which have an AVR and a microsd slot. The only one I could find was SparkFun's OpenLog - which doesn't break out many pins at all (too few for my uses) and is quite expensive. atmega seems like overkill, as I'm sure you'll agree.


Hopefully you could find some good cheap microsd card slot where all the bits that need soldering protrude out the side so it can easily be hand soldered on when needed. I'm also thinking I might make an alternative bootloader for it to boot from sd - so you could upgrade firmware in place by putting a hex file on an SD card. Could be useful for something I'm working on.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 22, 2013, 07:53:46 pm
re: Schottky - I'm not sure how many people use external power, but I know that I often have it attached because I am reprogramming a circuit in place, or programming a circuit that uses more than 100/500ma. I also know some of our commercial users have a need for it because they upgrade in place. Regarding them blowing - if they blow they saved you from blowing out the Attiny in many cases! So for power users they act as a one time cheap safety device. Because of this I don't see any disadvantage having them, the voltage drop is well in spec, when they blow out something else would have likely blown otherwise, and they cost about 1 cent, so I'll concede they may not be as necessary as I originally thought, but there certainly doesn't seem to be an advantage to removing them.


re: Fuse -I expected everyone to demand a fuse, I have to date only had two people request one - they are over 10 cents each so unless people speak up they probably are not one the feature list at this point.


re:Microsd footprint - I see no reason not to put footprints for everything possible on the bottom - microsd makes sense because it doesn't need any other components. If there is room I'll put it on - that space is tight even for traces. Definitely a shield regardless


I still debate the snap off usb plug, but agree with the footprint for a micro usb on the bottom (lets avoid a mini vs micro debate - I prefer mini, but micro is far cheaper, doesn't require holes int he board which we don't have room for, and not at end of life) - at the very least the traces will be done in a way that the plug can be cut off with no ill effects.


Expanding on going to parallel pins - I'm also trying to make it so with a set of risers you can plug in two Digispark shields and have them use different sets of pins!


Thanks everyone for contributing!

Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 22, 2013, 08:17:16 pm
I'm less concerned about accidentally leaving the digispark hooked up to another power source and more concerned about capacitors and inductors in my circuit creating voltage spikes which could render the sensitive high speed processors with firmware in ram on my computer corrupt and perhaps even unconscious.
OK, now you're being ridiculous.  Did you stay inside last week during the perseids meteor shower out of concern you might get hit? The chance of frying your whole computer from something you plug into the USB port are next to nil.  Worst case scenario is you fry the port, and even that's hard to do.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: CBcracker on August 22, 2013, 08:25:15 pm
re: Schottky - [...] Regarding them blowing - if they blow they saved you from blowing out the Attiny in many cases!

Actually, one blew by accidentally shorting 5v to gnd.  The other blew because I fed 5v to one of the NRF modules instead of 3.3v, causing it to temporarily draw enough current to short the schottky.  Neither case would have damaged the ATtiny.  In the second case, it *may* have saved the NRF from blowing, if it actually did blow, but I haven't tested it yet.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 22, 2013, 09:28:14 pm
I do think that some of the Schottky's were a bit more sensitive than the design called for (due to a factory substitution) - the Pro ones will handle more current so the second case should be OK - the solution for 5v to ground short I think is for me to add proper reverse polarity protection (if I were to add a single protection feature THAT would be the most helpful based on the mistakes people have made with them).
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on August 24, 2013, 12:11:58 am
@Bluebie - the MicroSD doesn't seem practical - the layout has headers on all 4 sides so unless I find a good hinged slot layout one they would be in the way. MicroUSB presents the same problem - put the footprint on the back of the USB plug and it is out int he open, but put it on the bottom of the main part and it is blocked by the headers
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: defragster on August 24, 2013, 02:07:49 am
USB Safety is important - especially with an exposed metal consumer device.  My years past Sony Phone cable had plastic end alignment pins and exposed contact pins.  That first Gen core 2 duo box I built is still in my shop running all USB from PCI board.  One 'zap' and all MOBO USB subsystems failed to exist after the shocking reset the system encountered when I walked over and grabbed the cable to connect my phone.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: TimO on January 12, 2014, 07:49:44 am
Has there been any movement on this?  Whilst I appreciated that the DigiX has probably kept you busy (and that's good, I've got a couple myself), I wondered whether you've moved the design for the DigiSpark Plus (or whatever it's likely to be called) along any further.

A 1634 based DigiSpark with more IO and memory would be a very nice little item.  The only similar board I've seen, is the MT-T34, which whilst very close to this sort of functionality, and not overly expensive, only provides 250mA from it's regulator (vs the 500mA the DigiSpark can source, which is very useful), and of course isn't compatible with the DigiSpark shields.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on January 12, 2014, 11:14:51 pm
http://www.kickstarter.com/projects/digistump/digix-the-ultimate-arduino-compatible-board-with-w/posts/669863
Read the last paragraph!
Looks like, that the conceptual work is done.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on January 13, 2014, 01:45:50 am
The pro is pretty much ready to go - I just have to wrap up some things before I can launch it - estimated launch is early Feb. on Kickstarter (or similar)

It will launch with an optional WiFi shield, microSD, and nRF shield.

We'll let everyone on our mailing list know when it launches - you can join the mailing list from the left side bar at digistump.com

We won't be using the 1634 because we'd be limited to 12Mhz for V-USB to work, which would break a lot of existing Arduino libraries/compatibility. I'd like to make a 1634 based one at some point - but we want the Pro to be more user friendly then the original, not less.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: TimO on January 24, 2014, 01:25:05 am
... We won't be using the 1634 because we'd be limited to 12Mhz for V-USB to work, which would break a lot of existing Arduino libraries/compatibility. I'd like to make a 1634 based one at some point - but we want the Pro to be more user friendly then the original, not less.

Aha, I wondered about that.  The discussion up thread seem to gravitate towards the 1634, but as you say, the maximum 12MHz was probably sub-optimal.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: TimO on February 16, 2014, 01:30:02 pm
So, looking at the image (http://digistump.com/news/27) on the DigiStump home page, it looks like they've gone with the ATtiny167 (http://www.atmel.com/Images/doc7728.pdf), which should make for a good DigiStamp Pro, hopefully with 16k of Flash, and up to 16 IO lines, and running at up to 16MHz, as mentioned previously (It could also be a Attiny87, with only 8k of Flash, but I'd imagine the cost savings of going that way would only be small).

It appears to have 18 DIL pins, which I'm guessing are all 16 IO lines, and two power pins, with the three other pins at right angles to those, being the traditional set of Digispark power lines, allowing for compatibility with the original nine pin Digispark, and its shields.

It's also got a real USB connector instead of a the USB plug, which I imagine increases the cost, but is a welcome addition to make the design more able to withstand multiple plug/unplug cycles.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on February 16, 2014, 03:42:52 pm
You got it exactly!

It is the 167 - we also have some software breakthroughs to release at the same time which will make using the Pro much more like using an Arduino.

We're dotting our "i"s and getting things approved and quoted then we will launch!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: dougal on February 17, 2014, 07:35:45 am
Woot! Can't wait!
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on February 17, 2014, 08:23:20 am
Quote
It appears to have 18 DIL pins, which I'm guessing are all 16 IO lines, and two power pins, with the three other pins at right angles to those, being the traditional set of Digispark power lines, allowing for compatibility with the original nine pin Digispark, and its shields.
Reading the datasheet, I expect the 18 pins to be the 16 IO pins and AVCC/AVGND for the analog supply voltage.
Quote
hopefully with 16k of Flash,
as it is the 167 and not the 87 there is no question ;-)

It may have with the LIN/UART a much better serial connection.
So for me the big surprise will be which pins go for USB and will be restricted due to zener and pullup.  PB3 and PB6 seem to are those, with the least impact to special functions.

Is reset disabled or not? Two pins will go away for the quartz. One may have the LED.  So there should be at least 10 raw pins available.
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: gogol on February 21, 2014, 09:23:41 am
Is that a button on the left side of the usb-jack?
Where is that button connected to? Reset?
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: TimO on April 10, 2014, 03:55:05 am
Since it looks like this is going to appear on Kickstarter in a few hours (https://twitter.com/digistump/status/454198724776849408), I guess any further questions should be answered by that.

Yay! :)
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: dougal on April 10, 2014, 05:54:03 am
Woot! I'll be ready to pounce as soon as I get the alert. :)
Title: Re: How about a Digispark for the ATTiny84 series of chips?
Post by: digistump on April 10, 2014, 04:16:52 pm
The digispark pro is now live: https://www.kickstarter.com/projects/digistump/digispark-pro-tiny-arduino-ready-mobile-and-usb-de