I'm really looking forward to try this new core, but how should I connect the attiny13 to the arduino? is there some kind of connection diagram out there? and do I need to use arduinoISP to program it, an arduino with the 328p installed(or not installed), or can I use a FTDI breakout.
Hi,
I just wanted to test your core13 sources on my platform here.
I run Ubuntu 12.10 with Arduino 1.0.1 and installed your version 16 (core13_016.zip).
As a programmer I use USBtiny and got that programmer into boards.txt.
It compiles well with no errors.
However, I get the following error from avrdude while uploading the blink sketch:
avrdude: Expected signature for ATtiny13 is 1E 90 07
Double check chip, or use -F to override this check.*
Do I have burn some fuses beforehand ?
When I run avrdude with 'avrdude -c usbtiny -p t2313' I get the following answer:
avrdude: Device signature = 0x1e910a
avrdude: safemode: Fuses OK
What does that 'device signature' mean and why is it different from the 'expected signature' ?
AgeBee:
Hi,
I just wanted to test your core13 sources on my platform here.
I run Ubuntu 12.10 with Arduino 1.0.1 and installed your version 16 (core13_016.zip).
As a programmer I use USBtiny and got that programmer into boards.txt.
It compiles well with no errors.
However, I get the following error from avrdude while uploading the blink sketch:
avrdude: Expected signature for ATtiny13 is 1E 90 07
Double check chip, or use -F to override this check.*
I've ran into the default fuses problem and fixed it by "installing bootloader" in the IDE but now I have a question that wasn't answered around here:
Can you use all the pins on this device (the reset pin, too) without a bootloader?! (my reading from various forums says NO, not without setting the fuse so the pin is no longer RESET and needing a high-voltage programmer to reprogram the device)
mrares:
Can you use all the pins on this device (the reset pin, too) without a bootloader?! (my reading from various forums says NO, not without setting the fuse so the pin is no longer RESET and needing a high-voltage programmer to reprogram the device)
"Burn Bootloader" as far as ATtiny13 and other chips burned using a programmer are concerned, is a euphemism. There's no bootloader (and no need for one either) - all this Arduino IDE function does is to burn proper configuration fuses so the MCU operates using the right clock frequency and so your time-dependent programs, such as the LED blinker, work properly. There are plenty of other configuration variables set by the config fuses but the timing is probably most important from the practical stand point - most others are left on defaults.
You cannot use the Reset pin if you're planning to re-flash the MCU using an ICSP programmer. Unless you have a high-voltage programmer, just consider ATtiny13 a 5xI/O MCU - makes development easier.
Got it! Once reading the spec of the attiny13a it looks like with a bit of elbow grease and a 12V power supply one can reset the fuses off a chip with the help of an Uno and a custom sketch.
Is it possible to write the fuses from within the code on the chip? (eg: set the reset pin enabled or disabled from your sketch, say... on a spi command received)
mrares:
Is it possible to write the fuses from within the code on the chip? (eg: set the reset pin enabled or disabled from your sketch, say... on a spi command received)
No, you can't. The device can only be programmed when held in Reset (ISP), or with a high voltage programmer.
Furthermore, if the reset pin is disabled, then the ISP won't work as there is no way for it to hold the chip in reset.
I am wondering why analogRead() explicitely sticks the REFS0 bit to 1 every time it is called (1<<REFS0), which selects the INTERNAL 1V1 reference, hence A/D range is limited to an input voltage from 0 to 1.1 V. This is no good.
However the Arduino uses 0 to VCC by default.
The datasheet says:
0 VCC used as analog reference. -> #define DEFAULT 0
1 Internal Voltage Reference. -> #define INTERNAL 1
Users would actually not expect that analogRead() was setting the analog reference.
analogReference() is intended for doing the job.
#defines are provided in wiring.h
See also
What's the problem with implementing analogReference()? This is pretty easy, and the T13 can do it. So people can make use of it.
pswag:
I am wondering why analogRead() explicitely sticks the REFS0 bit to 1 every time it is called (1<<REFS0), which selects the INTERNAL 1V1 reference, hence A/D range is limited to an input voltage from 0 to 1.1 V. This is no good.
Oh yikes. Thanks for catching that. It is a bug.
These things are hard to debug without a Serial interface.
Although quite honestly I was not even aware of the 1.1V reference. I thought that was only on the higher end chips.
I will evaluate your changes and determine if it is worth including. Please standby.
You know, oddly enough I created an synchronous serial debugging system for the Attiny13 but I got fed up of flashing the Arduino between the ISP sketch and the serial receive sketch.