After a few problems I managed to program an ATTiny13. I had to modify blink_1MHz a little, and the make file. Then it compiled and the makefile worked, but during upload, it said microcontroller not responding. I finally grounded the reset pin while uploading the program, then it worked. Can anybody explain the reason for gnding. the reset pin?
I checked the voltage on that pin before programming, and it is being held high by itself, but I had to ground it during upload, but I guess as long as something works that’s OK. :roll:
Of course the question arises, what can I do with an attiny13?
Can it be used to transfer data to an external EEPROM using SPI, such as to an AT25HP512 (external eeprom chip) ?
The attiny13 has MISO, MOSI, SCK, but doesn’t appear to have an SS (slave select) pin, which is required on an AT25HP512.
The reset pin is usually connected to the programming header. The programmer will assert the reset line low to perform the programming of the chip. Also - and I can’t tell from your description if you did this or not - you shouldn’t tie the reset line to Vcc directly. Use a 4.7k pull up resistor so that the programmer can manipulate the reset line.
I’m not familiar with that eeprom chip you mentioned, but you could probably use one of the PORT pins as a slave select signal.
ptoole:
I finally grounded the reset pin while uploading the program, then it worked. Can anybody explain the reason for gnding. the reset pin?
Your programming cable should be connected to the reset pin. Winavr will control your reset pin while programming.
ptoole:
Can it be used to transfer data to an external EEPROM using SPI, such as to an AT25HP512 (external eeprom chip) ?The attiny13 has MISO, MOSI, SCK, but doesn’t appear to have an SS (slave select) pin, which is required on an AT25HP512.
The attiny13 does not have a Hardware SPI. It does have SPI pins for programming only. You can still use the attiny13 to transfer data to external eeproms that require SPI simply by using bit-bang SPI code which can be found almost anywhere on the internet. (look in the avr910.asm file) If you want a hardware SPI, you can get an atmega8 for almost the same price as an attiny13.
I happened to have one of those attiny13’s on hand so I thought that I would program it. I’ve also got an atmega8 already programmed in WinAVR, and it would be easier to use that one to transfer data to an external EEPROM, I just haven’t tried it yet. I’m getting around to it - one of these days.
I also made a board for programming chips by following the tutorial that SparkFun put out, but I put the reset switch in the wrong way. That’s probably why I needed to ground that chip.