ATtiny85 revision C

Does anyone happen to have one of these? If I'm reading the markings correctly, I think this chip I've had for a little while is Rev. B:

		(Top)
			1004
		ATTINY85
		  20PU

		(Bottom)  
		6G6   864
		B      1P
		1004   e3

Also have a newer chip just recently received, I was hoping to get the latest and greatest, but it looks like I only went from Rev B to B1:

		(Top)
			1031
		ATTINY85V
		  10PU

		(Bottom)  
		6H5   250
		B1     1P
		1031   e3

Anyway I was hoping to use the software BOD disable which is only available in Rev C and later. It acting like it's not there, so I guess I'm out of luck :frowning:

My guess is that the 1004 and 1031 mean that your chips were made in the 4th and 31st weeks of 2010. That would make your 'newer' chip about a year old.

The datasheet doesn't show any revision dependency on BOD, just on "Enhanced Power-On Reset". You should be able to disable the Brown-Out Detection interrupt in any revision.

Thanks, John, that's the way I read the dates too.

I can disable the BOD just fine by setting the fuse byte, but to do so via software is evidently not universal. I'll check for a new datasheet, the one I was using is Rev. 2586M–AVR–07/10, which says

7.2.1 Limitations
BOD disable functionality has been implemented in the following devices, only:
• ATtiny25, revision E, and newer
• ATtiny45, all revisions
• ATtiny85, revision C, and newer

Shoulda got a '45 :~

Why do you need the BOD?

From an 85V sitting on my desk...

Top...
1015
ATTINY85V
10PU

Bottom...
6H0   738
B8    1P
1015  e3

Playing with a battery-powered (2xAA) circuit that shuts itself off by going into power-down mode. Thought it good to have the BOD enabled for the reasons stated in the datasheet. Quiescent current is ~22-25µA with the BOD enabled, and <0.5µA with it disabled. As a practical matter, it probably makes no difference whatsoever, but half a microamp is just too cool! XD

Was able to accomplish similar results with an ATmega328P. Configure the BOD via the fuses, then turn it off just before going to sleep. It turns itself back on automatically when coming out of power-down mode.

I remember two things: possible Flash corruption and possible EEPROM corruption. Was there anything else?

Quiescent current is ~22-25µA with the BOD enabled, and <0.5µA with it disabled. As a practical matter, it probably makes no difference whatsoever

Well, that depends on the application. :wink:

but half a microamp is just too cool!

Agreed!

As far as I can tell, the 85V (internal oscillator at 1 MHz) is reliable down to 1.6 volts. The alkaline batteries I use (two AA) consistently die between 1.6 V and 1.8 V. For me, the nice thing about sans BOD is that I can run the batteries essentially dead.

For the next gadget, my plan is to add Vcc measuring…
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1294478456/all

Running an 85V, the alkaline batteries have a long linear voltage range so the gadget should be able to roughly estimate the time-to-death.

The processor might also execute instructions incorrectly.

Well, that depends on the application.

Well, mine, of course! Baha!

As far as I can tell, the 85V (internal oscillator at 1 MHz) is reliable down to 1.6 volts. The alkaline batteries I use (two AA) consistently die between 1.6 V and 1.8 V. For me, the nice thing about sans BOD is that I can run the batteries essentially dead.

Define "die" ... are you saying the oscillator stops at ~1.6V?

For the next gadget, my plan is to add Vcc measuring...
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1294478456/all
Arduino Forum

You know, I saw that in the datasheet and just out of curiosity played around trying to read the bandgap voltage one day. Don't remember if I managed to get any reasonable numbers out or not. But the trick of using it to measure Vcc that way hadn't occurred to me, that's very clever!

Define "die" ... are you saying the oscillator stops at ~1.6V?

The batteries are able to provide enough power just long enough that the application starts to run. After about a tenth of a second, the power drops too low and the processor stops running. After a very brief moment, the batteries recover and the whole process restarts. The gadget says "hello" by beeping and flashing two LEDs so it's a rather disturbing experience.

From the symptoms, my guess is that RESET is asserted.

By the BOD? Thought you had it disabled?

Not by the BOD. The BOD is most definitely disabled. The application behaves like RESET was asserted. If the oscillator stopped, presumably the SRAM and the registers would retain some or all of their state and the application would, at least some of the time, continue rather than starting over.

Yikes. I might turn on the BOD!

Good idea. I can get away with no BOD because of the application. The worst thing that could possible happen is that the batteries will have to be replaced.

Well, I couldn’t stand it and had to pick up some t45’s to try. The BOD can indeed be turned off; when sleeping, I get readings of 0.1 or 0.2µA. Sometimes I see 0.0µA, and sometimes -0.1µA! Hey, I might just have an over-unity microcontroller! If I can manage to wire a hundred thousand or so together, I should be able to light an LED. Actually, 0.1µA is the resolution of my meter, so probably not the most accurate measurement.

Oh man! I am so jealous! I want a processor that defies the laws of thermodynamics!

Bummer about the 85s, though.

My meter always shows 0.2 uA when the value is at or below that. I figure ... 2.535 Ah batteries * 2 batteries / 0.1 uA = ~ 50,700,000 hours of operation = ~ 191,147.64 years = batteries gonna be dead long before that because that's the way batteries are. Anything below ((2 * 2.535) / (5 * 365.24)) * 1000 = 2.776 mA = ~ 5 years is good enough for what I'm doing!

Haha, I know, I figure it's a natural for some of the projects we discuss here! Actually the t85's are fine, I think they still meet your five-year test by a comfortable margin, so I'm plenty good with that!

wouldn’t the battery life depend on the amount of current the attiny needs when it wakesup ?

The usual method is to determine the sleep current consumption, determine the awake current consumption, calculate an average consumption based on the sleep / awake ratio, and then use the average to estimate battery life.

But, I wrote that to make a point to Jack. For a Christmas gift, turning off the BOD is irrelevant. Any average current consumption between 0.1 uA and 2.776 mA is going to get the gadget to the five year mark; long after Christmas is over and the children have lost interest.