Pages: 1 [2] 3   Go Down
Author Topic: ATTiny85 arduinoisp problem  (Read 8903 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Perhaps not

I agree.

Quote
but it would certainly provide useful information

Once all other problems have been resolved, maybe.

Quote
Also, did you really -karma me?

No.  Would you like me to?
Logged

0
Offline Offline
Full Member
***
Karma: 5
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lol, sorry, not sure who else would have...  smiley-confuse


Also, how would the arduinoISP try to program itself? Because it sounds like that's what you mean...
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Also, how would the arduinoISP try to program itself?

The bootloader responds to AVRDUDE instead of the Arduino ISP Sketch.  If autoreset is not disabled, the bootloader runs instead of te Arduino ISP Sketch.  From AVRDUDE's perspective there is no difference.  For our perspective there's a huge difference!
Logged

0
Offline Offline
Full Member
***
Karma: 5
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But the bootloader does not send the device ID, does it? Does the bootloader mimic the built-in serial interface?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But the bootloader does not send the device ID, does it?

I have no idea if it does or not.  AVRDUDE gets rather annoyed if the ID is not available or is not the expected value so I assume the bootloader has to send the processor's ID to satiate AVRDUDE.

Quote
Does the bootloader mimic the built-in serial interface?

By "built-in serial interface" I assume you mean the interface provided by the processor.  In which case, I have no idea.  I don't know anything about the on-processor interface.
Logged

0
Offline Offline
Full Member
***
Karma: 5
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was not aware that the arduino IDE used AVRDUDE to upload programs. I thought the whole point of the bootloader was that you didn't need to use ICSP, considering that the arduino IDE uses serial to upload stuff... It just seems astronomically unlikely to me that the two protocols would line up so conveniently.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I was not aware that the arduino IDE used AVRDUDE to upload programs

It does.  Hold the Shift key and click the Upload button.

Quote
I thought the whole point of the bootloader was that you didn't need to use ICSP

That is one of the points of a bootloader.

Quote
considering that the arduino IDE uses serial to upload stuff...

The IDE uses AVRDUDE to perform an upload.  AVRDUDE communicates with the bootloader through a serial connection.

Quote
It just seems astronomically unlikely to me that the two protocols would line up so conveniently

What would be accomplished by making one protocol for the bootloader and a different protocol for an ISP?

« Last Edit: January 29, 2011, 10:49:26 pm by Coding Badly » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
I found my friends, they're in my head
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

lol @ the misinformation here.... the IDE is just a wrapper for the avrdude program. the icsp pins on the uno are the six pins mounted right next to the chip. The usb port uses serial communication, I have a breadboard arduino and the only things hooked up to the FTDI cable are the serial ports, power, ground, and the auto reset pin. like Coding_Badly said, hold shift and click upload for any sketch and you see the avrdude output.

I had the auto reset disabled, but then I get sync errors. So I unplugged the reset wire, and still had issues, i have to hold the reset button on the uno and then let go when avrdude tried connecting to get anything now... who knows...
« Last Edit: January 30, 2011, 01:05:29 am by 92_foxgt » Logged

0
Offline Offline
Full Member
***
Karma: 5
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

foxgt, no one here is misinformed... I'm not stupid, I've used ICSP and the arduino serial protocol, I know how these things work. What perplexes me is the fact that they (apparently) chose to make a bootloader for the sole purpose of using the default ICSP protocol over asynchronous serial. Using the default protocol literally takes 1 more pin, saves kilobytes of code and probably lots of time. Is there really any tangible gain to doing this? I can't think of any...
« Last Edit: January 30, 2011, 12:51:09 am by wyager » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
I found my friends, they're in my head
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I never called anyone stupid...
Two things:
1) I have been able to write to the attiny85 using the arduino IDE, I just have to perform a manual erase with avrdude...

2) the -F doesn't really seem necessary if I can write to the chip without it... I don't think I can make the IDE use it by default, so it really won't save me any trouble.

I think this might be related to my laptop, it seems like others seem to have success with it... I'll try my desktop and see what happens, both are Windows 7 machines, but the laptop isn't cutting edge by any means...
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I had the auto reset disabled, but then I get sync errors.  So I unplugged the reset wire, and still had issues,

You will.  Autoreset has to be disabled or the Arduino will not function as an ISP.

Quote
i have to hold the reset button on the uno and then let go when avrdude tried connecting to get anything now...

In which case, the bootloader is responding.

Give these a look...
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295386772
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1267120897/all

I've found a few places that recommend a 110 ohm resistor.  Try that.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
I found my friends, they're in my head
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

lol... correct me if im wrong...To disable the auto reset I'm using two 220 ohm resistors in parallel, but that is when I get the sync errors. Two 220 ohm resistors in parallel is equivalent to 110 ohms... 1/(1/220 + 1/220).

I looked through those posts... I hadn't thought about putting a cap as well as the 5v to it... I'll try that as well and see if it helps me get around the sync errors I guess

edit: oops, thought I mentioned the 220 ohm resistors earlier, added that
« Last Edit: January 30, 2011, 01:55:18 am by 92_foxgt » Logged

Denver
Offline Offline
God Member
*****
Karma: 19
Posts: 778
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have a serial cable with a level shifter (i.e. MAX232) you can just use that. Sine you only connect the Tx & Rx to the Arduino you will not get the reset. The ArduinoISP won't work if it resets when you load the sketch into the ATtiny. (Maybe you know that or am doing something else, reading this I'm a little confused.)
 smiley-zipper
Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

0
Offline Offline
Newbie
*
Karma: 0
Posts: 31
I found my friends, they're in my head
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I understand that it won't work properly if the uno resets, but with the uno's reset pin tied to power(haven't tried the cap idea) through a 110 ohm resistor I get sync errors and can't communicate with the chip at all. When I use the manual reset button and avrdude I can get it to communicate but it shows the wrong device ID. There is a post on the arduinoisp page saying that it wont work with an arduino uno due to the optiboot or something... I saw someone else mention it. Has anyone worked around it? I have a breadboard arduino and an FTDI breakout cable but the last time I messed with this(like 2 am one night) it was giving me some other error and I just went to bed. School has been keeping me busy all week until I go to bed, so I haven't been able to put much time in this, especially since the Tiny85 isn't critical towards my projects, just a side thing I was toying with.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
haven't tried the cap idea

That is the next step.
Logged

Pages: 1 [2] 3   Go Up
Jump to: