Avrdude output deciphering help needed - Page 1
Forum section: electronics / general

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 02:44:59 am
content: Attached is the verbose output from my attempt to program an Atmega328p-up MCU. I would prefer doing it with the Arduino IDE, but the problem manifests itself there as well.Equipment:Tried on two computers; a win7-64 and a winxp sp3 (32-bit)Tried with two different ISP programmers on both computers. A usbtiny and an avrisp mkii (hacked with Dave's usb jumper mod).Chip platform is a no-frills perf board I assembled. It consists of a 28-pin Ziff socket, a 6-pin dip header. No external clock or power.Both grounds are grounded. The Vcc and the other Vin pins are both fed. I did not connect the Aref.Two weeks ago, I successfully uploaded a sketch to a an Atmega 328p-up on this programmer board using the mk ii and one of the two computers.I have checked continuity on the board from header to chip and the ribbon cable from jack to jack.I also checked for shorts on every pin in the ziff socket against every wire. All good.I've tried two atmega328p-up'sI continue to get the same output for every combination.Software:I've downloaded and installed libusb and generated drivers for both ISPs. Only installing one at a time.Downloaded and installed winavr.Using the latest version of Arduino IDEI have attempted to download and use the AVR Studio, but I don't know my way around. I did try to communicate with the chip. Seems like the software sees it.Clues:All lights on both ISPs are green.No comms show connected on the tool menu in Arduino.Device manager correctly identifies which programmer is plugged in under the "libusb-win32 devices" folder. Unplugging the programmer results in the folder disappearing as expected.No "comms" pop up or disappear when you plug or unplug a programmer.I only have one actual Arduino board. It's currently in use managing an incubator so I can't use it to test for another week.It just seems like the ports aren't connecting properly and I don't know why. I posted this on the Arduino forum 8 hours ago. No replies. I'm sure I've left something out. I've been searching all day for a solution. TONS of people have a problem connecting. There are myriad reasons they can't connect. I've read quite a few and walked through more tutorials than I care to think about. I'm really hoping someone can tell from the avrdude output what's going on and can point me in the right direction. This just isn't making any sense. One thing I did on both computers that may have caused the problem is I installed AVR Studio. The drivers that are installed, "Jungo," have been reported to have problems with avrdude. I did that AFTER the one successful upload I did two weeks ago. But, I was able to uninstall it without issue. Unless there's some residual somewhere, that shouldn't be a problem.

author: ve7xen
author_rank: Super Contributor
timestamp: March 19, 2014, 02:52:42 am
content: This is avrdude's generic and useless way of telling you it can't communicate with the chip. This can be a problem with your ISP or drivers, with your hookup, or with your target. If you haven't successfully used this programmer before, and since you are using Windows, my first guess would be that your libusb installation isn't set up properly. Not having used Windows in a long time, I know little other than that this is a huge pain in the ass.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: March 19, 2014, 03:14:06 am
content: Your avrdude is from 2010, can you try the latest? The whole setup sounds a bit complex with all those different softwares. I'd revert and start simple with just avrdude.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 03:43:06 am
content: Quote from: ve7xen on March 19, 2014, 02:52:42 amIhaveused the programmer (the mk II). Since both are giving me the same error, it's unlikely they're the problem. I am new to MCU's and getting all the drivers right is like voodoo... it's bad enough with plug and pray. Anyway, I think you're right about the drivers (libusb). I just don't know what's missing.Quote from: GiskardReventlov on March 19, 2014, 03:14:06 amIt sounds more convoluted than it is. I didn't start out with all of them. For example, the driver generator is libusb. It's kind of a generic program that detects your programmer and then compiles the driver. Once compiled, it installs it. First time with one programmer didn't work. So, I generated another for the other programmer. Then, I uninstalled the first one so the second one could install. Not as bad as it sounds. 2010? Yeah, I see that now. Thanks. I just downloaded it from sourceforge today! It's the latest version (WinAvr.) Maybe avrdude hasn't been updated in a while. It isn't like it's feature rich. I'm guessing WinAVR is just a shell or sibling program. Just found a couple gui versions. They might have some tools for troubleshooting. I'm going to give them a try.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: March 19, 2014, 04:01:49 am
content: The avrdude I have is 6.0.1, so you're a rev back.From the avrdude-6.0.1/README"The latest version of AVRDUDE is always available here:http://savannah.nongnu.org/projects/avrdude"Avrdude works for me. That's a good feature.It's been said a picture == 1k words, maybe show your rig?

author: ve7xen
author_rank: Super Contributor
timestamp: March 19, 2014, 05:05:30 am
content: If you have a scope, disconnect the ISP connector and confirm that the RESET and SCK lines toggle when you try to program the chip. If you get that far, chances are something is wrong with your target board or ISP connection. If you don't see any activity, then it's a driver problem. LibUSB on Windows is a farking mess, thanks to Windows' inflexible driver architecture. If you replaced the mkII libusb driver (called something else, I think?, but it's just a commercial compile of the open source driver) with the one for USBtiny, one or the other is probably broken.If you have a mkII, I would go through Windows' "purge all the driver crap from this" process for the drivers, then reinstall AVR Studio and the USB drivers from there, and use AVR Studio to write your image. If that works, try avrdude.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: March 19, 2014, 05:19:15 am
content: ve7xen has reminded me that I had not set a jumper to the RESET when I first tried to use avrdude. When I connected that I was able to program my atmega32.

author: zapta
author_rank: Super Contributor
timestamp: March 19, 2014, 05:20:57 am
content: I am using this script to program blank 328p's with avrdudehttps://github.com/zapta/linbus/blob/master/analyzer/firmware/icsp_program_all.shNote the -B flag, the 328p comes stock with 1Mhz clock and the max ICSP clock speed you can use is 1/4 of the clock speed (per Atmel documentation). The -B reduces the programming speed. Learnt it the hard way. Maybe related to your problem.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 05:22:45 am
content: Giskard, thanks for the info and the link, but I have a hard enough time keeping up with all the idiosyncrasies of Windows without adding Linux to the mix. I've tried. Besides, even according to the avrdude docs, they even recommend using WinAVR's version of avrdude for windows installations. It worked once... it has to work again. This has to be a problem with the driver. I downloaded avrdudess, a gui for avrdude. Looks like avrdude can't see the port. It won't accept "usb" for the -P flag either. Blank doesn't work.Even though I still think it's a driver issue, attached are the photos of my rig.Sorry about the glare

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 05:37:27 am
content: Ve7xen, I'll try it. What am I looking for? Reset will be 5v, then go low? Same with Sck? I'm don't know my way around the scope very well yet, but I can read a dc voltage.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 05:39:46 am
content: zapta, tried your settings... same response. Thanks. It was on my list of things to do (baudrate in particular). But, as it DID work once without changing the speed...

author: leppie
author_rank: Frequent Contributor
timestamp: March 19, 2014, 05:45:51 am
content: Maybe you need an external clock? If these have been pre-programmed with an Arduino bootloader that will most likely be the case.

author: miguelvp
author_rank: Super Contributor
timestamp: March 19, 2014, 05:49:11 am
content: Scratch that, found this link and you don't need that pin (16):http://allaboutee.com/2011/05/11/how-to-program-an-avr-microcontroller/some more info that might helphttps://www.sparkfun.com/tutorials/93

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 06:03:50 am
content: I went back to the avrisp mkii. Plus, I typed in four "-v" (verbose). Someone who knows what this means might be able to confirm if there is some data being sent and received. Looks likesomethingis going back and forth?

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 06:10:40 am
content: Can anyone answer this question: With the rig I'm using, (USB powered chip, usblib driver, avrisp), in the Arduino IDE, shouldn't I see a serial port just like when programming a full-fledged arduino board using the ftdi driver?

author: ve7xen
author_rank: Super Contributor
timestamp: March 19, 2014, 07:20:21 am
content: Quote from: chipwitch on March 19, 2014, 05:37:27 amYeah, the ISP interface is active while ~RESET is low, so you'd see it at Vcc then drop before programming. SCK is the serial clock, so you should see it toggling at some 100s of KHz. It might only burst for some ms before giving up though, so set your trigger up at say 1V and keep your eye on the TRIG indicator when you try to program it, you might not catch it on the screen. Or if you have a digital scope, set it up to do a one-shot when RESET goes low and you should see SCK toggling shortly after.As leppie mentions, did you (or anyone) ever program the fuse bytes? If this was once an Arduino ATmega it will require an external clock.QuoteNo. The Arduino by default has a serial bootloader that allows loading code via the serial port (or some variants use DFU over USB instead, but both have custom code loaded on the AVR). A blank one from the factory won't have that serial bootloader, and your rig doesn't provide a serial port anyway. You're using the ISP programming interface that is built into the chip itself, which is based on SPI not UART. You can load such a bootloader if you want, but then you will need a serial converter as well.

author: dannyf
author_rank: Super Contributor
timestamp: March 19, 2014, 10:47:29 am
content: QuoteThe most important thing in debugging is to have an open mind. Rarely, the bugs are where you think they are.I have used avrdude lots of times under windows and they are generic enough to give me any problems. So yours should work. I would check wiring, pin outs, connector orientation, etc. before doing something crazy.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 12:55:26 pm
content: Danny, I've already double checked the things you listed. I am open to it being something else, but as the clues pile up, it looks more and more like driver.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 01:53:15 pm
content: Quote from: ve7xen on March 19, 2014, 07:20:21 amJust waking up here. Please, bear with me. I have an older Tektronix digital scope. I'll see if it can do a one-shot. Without a function generator or AC PS, I'll have to set up something to practice catching a burst on. It does record... I think. I'll try that after I've got some coffee lapping through my veins.QuoteRight! I forgot to respond to leppie about that! I meant to when I first read it.First off, wouldn't the verbose output from avrdude show whether or not it has a bootloader installed, somehow? Maybe it is showing in the output. It looks like it's stopping communication, to me. I don't know. If it is stopping, then it has to be communicating at least partially and maybe there is a bootloader on it.I bought all my Arduino stuff maybe two years ago (that goes for all my electronics stuff). Life got in the way before I actually got around to doing anything withanyof it. Yes, basically, I've only been doing Arduino and electronics for the last month. So, I'm not an air-head, though I am old and getting more forgetful. Two years is a long time to remember, but I think I bought a few 328p's from Mouser. They shouldn't have bootloaders on the them. Some, have a sticker on the tops, labeling the pins. They're likely from Sparkfun or Adafruit. The 328p I successfully uploaded to a month ago using the rig in the photo, was without the label... so no bootloader on those. However, Ihaveclicked on "Upload bootloader" on the IDE menu, in frustration trying to get them to communicate. It's conceivable that the chip I've been using does now have a bootloader. I'm guessing you can tell by looking at the fuse settings? Aren't they indicated in the avrdude outputs I've posted? I don't know what that would look like. If the fuse settings are how you erase a bootloader (I believe I read that somewhere), then I'm pretty sure I tried the right settings. In Zapta's post, he showed the fuse settings he uses for blank 328ps. I tried them and got similar if not the same output. Now, if his fuse settings pre-suppose the bootloader is absent and doesn't actually erase the bootloader, I wouldn't know. What all this means is I do have chips I'm 99% sure have no bootloader. The two chips I've been using throughout this entire thread are NOT among them. I'll try one of the mouser chips before proceeding. Avrdude is like a long chain with all but the two end links screened by something impenetrable. If any one of the many links isn't welded closed, you can pull on one end link all you want with no effect on the other... Now, find the link! Frustrating.QuoteNo. The Arduino by default has a serial bootloader that allows loading code via the serial port (or some variants use DFU over USB instead, but both have custom code loaded on the AVR). A blank one from the factory won't have that serial bootloader, and your rig doesn't provide a serial port anyway. You're using the ISP programming interface that is built into the chip itself, which is based on SPI not UART. You can load such a bootloader if you want, but then you will need a serial converter as well.So, is there ANYTHING in the Arduino IDE that would indicate when you're connected via SPI? When connected UART, the indication is indirect... the port will appear and disappear as you plug it in. There's nothing like that happening with SPI?I have a Sparkfun FTDI breakout board. I was going to hook it up to my rig on the breadboard to try that, but noticed it has a mini A connector. I thought I had a cable, but they're all micro and standard A's. Maybe I'll try replacing the mini port with a micro. I think I have one or two I've salvaged from old boards.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 02:20:24 pm
content: Ve7xen... you da man! Got it. I think there were several things going on. Driver conflicts etc. I tried a never before programmed 328p, without the label, with the MK II controller and it worked!! I retried the usbtiny, with the exact same everything (except changing the controller on the command line, obviously) and it seems to be faulty. This wasn't helping. Anyway... it's now working. Thank you so much. 16 hours this took...

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 02:43:32 pm
content: I also managed to upload a sketch with Arduino... on my 64 bit machine. So, looks like it's all good

author: ve7xen
author_rank: Super Contributor
timestamp: March 19, 2014, 06:50:20 pm
content: Quote from: chipwitch on March 19, 2014, 01:53:15 pmThe (potential) issue is that the chip itself has no clock signal. AVRs have 3 fuse bytes that you set to determine what their clock source is. By default, they use an internal RC oscillator, but many applications will use an external crystal or clock source instead. Once you've programmed those fuse bits to use an external clock, the chip won't do anything until you provide one, including responding to ISP requests. So yeah, if you've set the fuses to require an external clock, you need to provide one to get any response at all from ISP, and the ISP will think no chip is connected. I believe (though don't know for sure) that the Arduino has a clock crystal onboard, so the ATmegas that come with them would have the fuses programmed for an external clock. There is also a fuse that allows using the ~RESET pin as a GPIO, which basically makes the ISP interface useless. ISP itself can be disabled too. It's easy to 'brick' a chip this way, requiring you to add an external clock or in the case of disabling RESET or SPI, you need to do high-voltage programming (which neither the mkII or USBtiny can do) to change it back.Unlike many more modern microcontrollers, the AVR can't switch clock sources from software while running and only uses the semi-permanent fuses for this. ARMs generally can for example detect whether the external clock is running (or even if it stops during operation) and switch to the internal clock as required. In fact they don't provide any way to control the boot-time clock source, you must do it from code once the chip has started up.QuoteYou can, but so far you haven't posted any avrdude outputs with it actually communicating with the chip. I believe if you just run avrdude without any write command it will output the current fuse bytes to screen. Check the datasheet (p 295) for their meaning, remember that a '1' means UNSET and '0' means SET for the fuse bits.QuoteThe bootloader is just stored in flash, you can overwrite it as you'd overwrite any other code. You'll need to set the fuse bytes correctly for your application (clock source etc.) regardless.QuoteUnfortunately for troubleshooting, embedded processors are pretty primitive devices, and the interface is by design simple and low pin count, so it can't really tell if you're doing something wrong. ISP tends to work, or not. There isn't much room for diagnostics.QuoteI assume it shows up in Device Manager somewhere? Whether the target is connected and properly working you need to query using avrdude or AVR Studio and see if you can read e.g. the chip ID. This is pretty much the same as how serial ports work, there's no indication if something is actually connected to the port or not, it just happens with Arduino that the 'port' (the USB->serial chip) and 'device' (AVR) are on the same board and permanently connected.I don't know if the Arduino IDE supports ISP programming other than to load the bootloader, and once that's done you'd probably need the external crystal discussed above, as well as a serial converter (like your FTDI breakout) properly connected to communicate with the bootloader.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 07:55:00 pm
content: Quote from: ve7xen on March 19, 2014, 06:50:20 pmMost if not all Arduino boards have a 16Mhz crystal onboard. Obviously, the MCU's are also preprogrammed with a bootloader. I've read about the reset/GPIO sometimes presenting a problem, but I think I read that it's only on the smaller chips, like the ATTinys. Don't quote me on that. High voltage programming? One sec.... going to go make some popcorn.... okay. Go on! You don't say? I have not read thatanywhere!Sounds like you're not really an Arduinite. May I ask how you know so much about them?QuoteInteresting. I realize the Atmegas are toys compared to other MCUs out there. In fact, shortly after discovering Arduino, I bought some TI Stellaris boards and chips because of their superiority. I figured I'd be better off learning the Arduino first... lots more support and a heavily saturated user base.QuoteI'll do that.QuoteAm I to understand any speed external signal will work? I read elsewhere that (or did you write this?) that it isn't enough to just connect a crystal to the crystal pins (with caps), but that you actually need a TTL signal? At Vcc voltage I presume?If you erase the flash and eeprom, does that likewise erase the signature? If not, what determines the signature? Can it be manipulated?QuoteI see. And yes, I can see the usb connection being made and broken as expected in the device manager.QuoteI can answer that. I think loading sketches via ISP from the IDE was a problem for older versions, but the latest version can upload sketches as well as the bootloader. No bootloader is required. Nor an external clock in that instance.Thank you so much. This has been most educational!

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 08:00:06 pm
content: Of course, this all begs the question, what's the easiest way to implement a clock with my rig so I can use it to program both bootloader and non-bootloader chips with the same board. If the SCK sends a clock signal, why can't that be used? And what does that signal have to connect to?

author: ve7xen
author_rank: Super Contributor
timestamp: March 19, 2014, 09:15:42 pm
content: Quote from: chipwitch on March 19, 2014, 07:55:00 pmWe aren't talking about "Arduino" here, we're talking about AVR, since you're starting from bare chips and trying to use ISP programming (while Arduino typically uses the bootloader for loading code). I've worked with AVR for years, before Arduino existed. The tools you're having trouble with are tools for AVR development, not tools for Arduino development. If you want to do Arduino, buy one of the many Arduino boards that comes preloaded with a bootloader and all ancillary components already installed.I would venture that many if not most uses of AVR do not include an external crystal, and certainly if you're trying to program it on a breadboard or homemade board that might not be an obvious requirement.The RSTDISBL fuse exists on every AVR I've worked with. If you set it, you will be unable to use ISP to program the chip. The only way to fix this is to use the AVR's high voltage programming mode to reset the fuse. Seehttp://mightyohm.com/blog/products/hv-rescue-shield-2-x/for an Arduin-ified version of this.QuoteYeah, I find the AVRs a lot easier to work with. There is a lot of "boilerplate" setup code required for ARM.QuoteIt depends on what the fuses are set to. I believe setting them to external clock mode disables the crystal oscillator, so in that case you would need a full TTL clock (though a simple 7404 inverter or even a transistor can be used with the crystal to make a simple oscillator). Unless you've accidentally done a stupid though, it will probably be set up for a crystal, I don't think the external clock option would be that common. Any frequency within the AVR's operating envelope (or crystal oscillator envelope for the current setting; see the datasheet on clock selection) should work. Just keep in mind that the maximum ISP speed is IIRC 1/4 of the clock rate, so if it's running really slow (especially if /8 CKDIV is enabled) you may need to slow down your programmer.QuoteThe signature and some calibration values are stored in a special page of flash that isn't accessible via standard ISP. In double checking some things to respond to you here I found someone reporting on an undocumented ISP command that can enable you to write this data, and that it's possible for it to get corrupted if the right bit gets flipped during programming. Other than that though it's basically read-only, as designed.QuoteNo problem!

author: ve7xen
author_rank: Super Contributor
timestamp: March 19, 2014, 09:18:59 pm
content: Quote from: chipwitch on March 19, 2014, 08:00:06 pmEasiest is probably to use a TTL can oscillator. Get an 8MHz one, plug it into 5V and the clock in on the AVR. Should work with any chip regardless of the CKSEL fuses.The SCK signal can't be used because one of the requirements of the ISP interface is that the clock is 1/4 or slower than the system clock, so it can't also be the system clock source. Also the AVR needs a clock for its internal operation between serial commands (when SCK is quiet). I'm sure it would be possible for them to engineer the protocol and chip to steal a clock from the ISP connector somehow, but this would increase complexity and cost. ISP is for "In-Circuit" serial programming, so they assume you have the basic requirements of the system provided (pretty much just power and system clock).

author: bingo600
author_rank: Super Contributor
timestamp: March 19, 2014, 09:33:40 pm
content: Or just use an AVR (Internal 8Mhz clock) , should get you 4Mhz out.The 4Mhz can be used as clock for the target avr./Bingo

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 19, 2014, 10:55:45 pm
content: Quote from: ve7xen on March 19, 2014, 09:15:42 pmYes, I'm fully aware of the distinction. I want the power of working outside the boundaries of Arduino. I hate boundariesQuoteAnd THAT is precisely why I asked! I am so fascinated by Arduino as a marketing marvel. They single-handedly (so to speak) generated boosted sales for Atmel by essentially creating a market. No advertising campaign could have even been conceived for such a purpose, I don't believe. Arduino (and I suppose the PIC people) pretty much made microcontrollers mainstream. From my approach to MCU's, I haven't had the opportunity to meet many of those relatively few like yourself, who worked with MCU's when all you had to go on was the datasheet. I mean, if we aren't there already the day is fast approaching where the "normal" way one becomes acquainted with MCU's will be via prepackaged, easy to use, high level language based interfaces, such as Arduino or PIC. I'm a geek. What can I say? I find it fascinating from the cultural perspective. It wasn't all that long ago, the ONLY option one had to program MCUs was assembly language. I guess what I'm saying is for me and many, many people like me, we will learn assembly because of the doors Arduino open for us. Where you and others, if you have any interest in Arduino at all, will be learning in the opposite direction.QuoteThe reason I asked, is avrdude isn't recognizing the signature of some of the chips I have. I think it's because there's no external clock. These chips have bootloaders. Now that I know, I'll throw a crystal on the board and see what happens.

author: dannyf
author_rank: Super Contributor
timestamp: March 20, 2014, 12:02:04 am
content: QuoteYou mean in the 1980s?QuoteI would still argue that reading the datasheet is by far the best way to learn a mcu.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 20, 2014, 02:35:36 am
content: I mounted a 3-pin sip header and a couple 22 pF caps to my programming rig. That way, I can plug in whatever crystal I want to use, if any. I have now successfully uploaded sketches to every atmega chip I own with the programmer, including the ones with a bootloader. I guess that concludes this thread.

author: nitro2k01
author_rank: Frequent Contributor
timestamp: March 20, 2014, 04:34:21 am
content: I'm developing a product using an FTDI+AVR combo and I can share some advice. I'm allowing two different programming methods, bitbang through the FTDI inteface, mainly used for burning the bootloader, and a bootloader which communicates over the serial line. I'm also using the FTDI as an external clock source instead of using a crystal.At first I had difficulty programming the chip. What I finally found out is that the chip needs a clock source in order to work, and that the clock needs to be fast enough for the programming. The device comes shipped with the fuses set to use the internal RC oscillator to allow the chip to be programmed, which is spelled out explicitly in the datasheet.Quote from: Atmega328 datasheetIf you program the CKSEL fuses to use anything but the internal RC oscillator before providing an external clock source of any description, you're screwed until and unless you can program the chip with such a clock present. The downside of the default setting is that you need to program the chip at a slower clock rate, which can be a pain. I had luck with using the-B 1.0avrdude switch, which sets the bit clock of the programmer to 1 µs. The exact interpretation of the switch might vary between programmers, so experiment with the value if needed.In my case, since I had an external high speed clock available, my programming procedure would be to first program the fuses using the-B 1.0option, then to program the flash with no-Bflag (to get the fastest programming speed possible for programming the flash.) A more appropriate procedure for you is probably to program everything using-B 1.0or a slower setting, and also to program LFUSE last – LFUSE is where the clock source selection fuse lies on Atmega328 – so that you don't lock yourself out of the chip until you're ready to put in its final circuit, where you hopefully have an appropriate crystal.

author: dannyf
author_rank: Super Contributor
timestamp: March 20, 2014, 10:59:35 am
content: QuoteIt will work with no load capacitors as well - just slightly faster than spec.

author: Flenser
author_rank: Regular Contributor
timestamp: March 20, 2014, 02:25:04 pm
content: Quote from: chipwitch on March 19, 2014, 02:20:24 pmChipwitch,From your original screendump, the avrdude command you are using for the usbtiny could be wrong.The adafruit sitehttp://learn.adafruit.com/usbtinyisp/avrdudegives this example command and there is no "-P" option:avrdude -c usbtiny -p m8The avrdude manual explains that the "-P" option is used for the usbtiny when there are two or more usbtiny's on the USB bushttp://www.nongnu.org/avrdude/user-manual/avrdude_4.htmlThe -P option you need to use to distinguish between multiple usbtinys on windows is much more obsure than what you have used. From my reading your use of "-P USB" would be expected to produce an error message before avrdude even tries to communicate with the usbtiny.Try you usbtiny again without the -P option and with -vvvv. You might find that there is nothing wrong with your programmer.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 20, 2014, 02:42:22 pm
content: avrdude command line is case sensitive. -p is for "programmer". -P (upper case) is for "port"Also of note, for some reason I'm unable to explain, even though avrdude is supposed to default to the right port, according to adafruit's tutorial (for usb, at least), in my case, it would not. I don't know if that was due to my system configuration or what. In any case, one problem I was having is that "USB" is different than "usb" as far as avrdude is concerned, and it will choke. Perhaps this isn't the case on other systems, but it is on both of mine, an XP and 7-64. Something to be aware of.

author: ve7xen
author_rank: Super Contributor
timestamp: March 20, 2014, 05:00:20 pm
content: I don't know how it is on Windows, but on Linux the USBtiny will work without any -P option.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 20, 2014, 06:11:29 pm
content: Would that be specific to the controller? I wouldn't think the the controller would care what the computer OS called the port. The experience to which I referred in my previous post was with the AVRISP MKII controller. I assure you, I have to have the -P usb. Tried it with, without, ucase and lcase on two different windows machines.I downloaded a nice little gui for avrdude called "AVRDudess,"http://blog.zakkemble.co.uk/avrdudess-a-gui-for-avrdude/. You can change and read fuses and everything. At the bottom of the link, you can see the exchange I had with the gui's creator regarding this issue. His program populates a drop down menu in the program for selecting the correct port. It wouldn't work either because of the ucase "USB." Strange quirk, but there you have it.

author: GiskardReventlov
author_rank: Frequent Contributor
timestamp: March 20, 2014, 06:34:22 pm
content: Quote from: chipwitch on March 20, 2014, 02:42:22 pmQuoteIt chokes because it's case-sensitive.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 20, 2014, 07:28:10 pm
content: Is it?

author: nitro2k01
author_rank: Frequent Contributor
timestamp: March 21, 2014, 04:01:52 am
content: Quote from: chipwitch on March 20, 2014, 07:28:10 pmYes and no. Everything that is given as a string (ie in quotes) in avrdude.conf is case-insensitive. Everything that is not given in quotes is matched verbatim, and thus case sensitive. So, why yes and no? Recently (starting with avrdude 6.x I think) the type attribute in the config file was changed from an attribute to a string. So where it used to saytype = usbasp;it now saystype = "usbasp";for example. The former is case sensitive, wile the latter is not. I believe all such attributes (such as programmer type) given on the command line are and were always case insensitive. The switches themselves, such as -p and -P are of course case sensitive anyway.

author: Flenser
author_rank: Regular Contributor
timestamp: March 21, 2014, 10:37:14 am
content: QuoteYes -P (upper case) is for "port" but the point I was trying to make was that when you are using a USB programmer the value for the -P option is _never_ "USB" or "usb"Avrdude knows from it's config file whether your programmer uses the USB, serial or parallel ports.The usbtiny programmer can only be on the USB bus and so you don't specify "USB" as a parameter anywhere on the command line.My suggestion was that you try your usbtiny with the command "avrdude -c usbtiny -p m328p" to see if you get past the "programmer operation not supported" message This appears to be a message from avrdude complaining about your command line options and not a message about a problem getting a response from the atmega.

author: chipwitch
author_rank: Frequent Contributor
timestamp: March 21, 2014, 12:40:53 pm
content: I'll try it with the usbTiny, but it does seem unlikely that the usbTiny will be different from the avrispmkii in that regard.Things I've already posted:Quote from: chipwitch on March 19, 2014, 02:20:24 pmand...Quote from: chipwitch on March 20, 2014, 02:35:36 amAdmittedly, it was only with the avrisp mkiiQuote from: chipwitch on March 20, 2014, 02:42:22 pmOkay, so maybe it's something other than avrdude. I admittedly know NOTHING about avrdude that I didn't learn in the last two days.Quote from: chipwitch on March 20, 2014, 06:11:29 pmI don't know how to be more clear.And then your comment:Quote from: Flenser on March 21, 2014, 10:37:14 amAm I lying? My experience is contrary to that.QuoteNot in my experience. The very first way I ever tried this was without the -P. I even went back and tried it without the -P after getting everything to workwithit. No joy.QuoteI'll repeat it... already tried this.I'm not pretending to know why this is happening on my two systems, but it is. If it's happening on my system, then it could happen on someone elses. And THAT was the pointIwas trying to make. Just putting it out there in case someone else has a problem. Maybe avrdude isn't supposed to work like it is on my machine. Maybe there's some software on my system that is causing the problem and avrdude has nothing to do with it. Maybe it's a hardware issue. I have no idea and am only mildly curious as to what the ultimate culprit is. I really don't object to having to put in the "usb." Which I will once again assure youI need to do on MY two machines.