I cant tell you what to do with GNU-as.
You can put lipstick on a pig, but it is still a pig.
I've never met a pig I didn't like, as long as you have some salt and pepper.
I was trying to avoid writing
"I cant tell you what to do with gas." ^^
I thought I'd post in here rather than starting a new topic because I'm having a similar issue only with the ATtiny5.
I'm trying to program an ATtiny5 with the Olimex AVR-ISP-MK2 but can't seem to connect (read the signature) to the ATtiny5. The programmer supports the ATtiny5 but I still suspect the programmer might be at fault. I'm considering buying Atmel's ATAVRISP2 programmer. Links below show that both programmers support the ATtiny5.
My setup is as follows:
-Actual voltage on pins is 5V
-Using the standard TPI interface
-Using Windows XP with Atmel Sudio 6
-Using Olimex AVR-ISP-MK2
-Tried 10k pullup on RESET â€“ changed to 100k (no difference)
-Canâ€™t connect to ATtiny5
-Target voltage always reads 3.3V in AVR Studio 4, 5 & Atmel Studio 6
ATTINY5-TSHR - 8 BIT, 12 MHZ, 6 PIN SOT-23-6
AVR-ISP-MK2 - ATMEL STK500 V2 AVR PROGRAMMER, OLIMEX
ATAVRISP2 - Atmel ISP Programmer (might buy this)
The Olimex programmer uses my clone firmware. I've tested it and it definetely works on the TINY10, so it should also work fine with the TINY5 (same interface).
The target voltage may be normal depending on what controller they are using; if they selected a ATMEGA*U2 or AT90USB*2 device it doesn't have an internal ADC, so my firmware just fakes the voltage reading to make studio happy.
How exactly are you connecting up the programmer to the chip? Did you use the TPI 6-pin connector, and not the PDI connector?
- Dean :twisted:
Make Atmel Studio better with my free extensions. Open source and feedback welcome!
I'm connecting the chip using the standard TPI pinout. I've tried it on 2 separate chips but neither seems to work. One chip is in the circuit which has only power, ground, and a 10k pullup on the reset pin. The other chip is free-floating and has just a 10k pullup. In both cases I'm powering the chips using the programmer, not an external supply.
This problem seems to simple to not work. All I need is a 10k pullup on the reset line and power and ground right? How can the chip not connect? Weird.
Dean - you've got me thinking now. I'm wiring to the 6 pin connector on the Olimex programmer which is defined as the PDI / TPI connector. I'm wiring assuming the pinout is TPI, but I see a picture that calls it PDI. I'm guessing my clock and reset are in the wrong positions. The weird thing is that PDI has no RESET pin - am I to assume Olimex put the reset on pin 3? Guess I'll find out shortly.
PIN PDI TPI
1 DATA DATA
2 VTARGET VTARGET
5 CLOCK RESET
6 GND GND
I'm going to wire it up assuming pin 5 is clock and pin 3 (or 4) is the reset. I'll bet you a dollar it works! Thanks for getting my brain going on the PDI/TPI track :idea:
PDI and TPI are seperate -- according to the user manual the TPI connector is located right next to the USB cable, and not on the other side with the PDI and ISP connectors.
Wow. I think I owe you a dollar. When reading the overview on page 5 of the datasheet it reads:
"Uses Atmel's 2x5 pin ICSP and 2x3 pin PDI and TPI connector layout"
I took this to mean both TPI and PDI were on the same connector. That one was pretty obvious. :oops: Still no dice on connecting to the tiny5 - I guess there's a chance I killed it. I have a few spares - I'll try to setup a fresh chip and see if it works.
Ok. It was the 10k/100k pullup resistor on the reset line all along.
After updating firmware and removing the pullup I have the ATtiny5 communicating with 2 different programmers. Something I read said to use a 10k to 100k pullup on the reset pin - I typically use a 10k pullup on JTAG, but apparently they're not needed with TPI.
Just thought I'd link on here to my project thread; I wanted to use a tiny10 in a project, and wanted to use the reset pin for something else... so I knocked up a little adapter board to convert a USBasp USB programmer (couple of quid on ebay) to TPI. Once you get it all going it's fast and reliable, but you do seem to have to go through quite a few hoops. With the latest AVRDUDE you can set/clear the fuses and program the flash. OSCAL doesn't seem to work though
© 2021 Microchip Technology Inc.