Setup for programming a stand alone

The point of the boot loader is that it sets the chip up and allows you to write to the chip via serial. No more no less.

If you do have an ICSP programmer, you do not need a bootloader, you can set fuses from the ICSP programmer and load what ever hex you like.

The only thing is as ChrisPR notes is remembering what you have one what chip but that applies to not bootloaded chips as well as bootloaded ones surely?

ChilliTronix: If you do have an ICSP programmer, you do not need a bootloader, you can set fuses from the ICSP programmer and load what ever hex you like.

I do have an ICSP programmer. I haven't used it in ages, so can't recall at all what was involved in setting the fuses. I imagine there's a whole procedure written somewhere.

Using ICSP programmer, about how long does it take to write each chip? Seems like I'd want to put a ZIF onto an Uno board as a dedicated chip burner. I assume best to run a batch file, not the IDE, to do each one.

No idea, I would start a new thread.

Also, if I were mass burning chips, I would build a circuit on stripboard with a Zif socket, and looks at Nick Gammon's stuff linked to above.

ChilliTronix: No idea, I would start a new thread.

Also, if I were mass burning chips, I would build a circuit on stripboard with a Zif socket, and looks at Nick Gammon's stuff linked to above.

Hi Chilli,

With respect to our correspondence last night. I built a replica (?) of my shield programmer on a bread-board this morning although I left out all my bits of enhancements (? once more) and that includes CLK;MOSI; & MISO [always think they are cartoon mice somehow].

Don't suppose it will be any surprise that it worked straight out the box as it were. However this method demands that the chip has installed the veritable and for me, difficult to install bootloader. Whats more experimentation showed each chip to be bootloader specific to the Arduino board used, at least between the UNO & the Duamilinove. Attempting to set the board as a UNO for a chip having had the bootloader installed say for the Duamilinove proved a reject by Averdude. This is one more reason for me to be desirous of Loading a whole program in one go from scratch. Unfortunately my AVR MOSI/MISO programmer is still giving me headaches as even though it is installed in my laptop under Jungo, as a JTAGICE Mkii and shows in its properties that it is on Com 3, this information does not reach the Arduino IDE and therefore I am prevented from using the device and unable to prove that the standalone/bread-board circuit is capabale of outright programming of a chip. Any ideas?

I asked the forum about this AVR-JTAG Mkii some time ago but received only one reply from the Moderator CrossRoads but that slowly went cold over a couple of days duration even though I kept adding bits of info that ere pertinent to it.

So thats where I stand to date; I must strip my Arduino R3 shield and rebuild it hoping that being a "Bear of Little Brain" I can get the upside downness of the underside of the chip mirror image of the top and that there are no soldering snots that cause a freak short just where I can't see it and then hope that it functions, at least for Tx & Rx.

Cheers, Chris S.

Chris,

Your programmer issues are probably due to the Jungo drivers you're using.

Have a read through this:

http://forum.arduino.cc/index.php?topic=118089.0

I recently went through this when setting up an Atmel AVRISP mkii to work with the Arduino IDE. Works perfectly now, and I can upload new sketches using the regular upload button in the IDE.

Ian.

ChrisPR, try what @ian332isport suggested.

Are you using Nick Gammon’s ICSP? I suspect the problem with the chips is down to the fuses, which Nick’s solution reads and re programs.

Bear in mind that your final board could do with either an ICSP header or the relevant serial connections to re program in the field if it turns out you need to do a firmware upgrade. You can of course hide these in various ways if you so wish.

ian332isport: Chris,

Your programmer issues are probably due to the Jungo drivers you're using.

Have a read through this:

http://forum.arduino.cc/index.php?topic=118089.0

I recently went through this when setting up an Atmel AVRISP mkii to work with the Arduino IDE. Works perfectly now, and I can upload new sketches using the regular upload button in the IDE.

Ian.

OK.

I did that but regretfully there seems to be a block in Win 8.1 that stops the program from installing even though the writer of the prime article states that "they will install on the 64-bit version of Windows 7 without digital signature errors. Yes!"

However the true answer is in fact 'No'.

There seems to be another WIN 8.1 block on 'Unpacking' the earlier link that you quote which simply will not unpack even though the unpacking program says that it has unpacked the zip parcel.

I'm sure that you are on the right track but it seems I am travelling on a rocky old road.

Cheers, Chris S

ChilliTronix: ChrisPR, try what @ian332isport suggested.

Are you using Nick Gammon's ICSP? I suspect the problem with the chips is down to the fuses, which Nick's solution reads and re programs.

Bear in mind that your final board could do with either an ICSP header or the relevant serial connections to re program in the field if it turns out you need to do a firmware upgrade. You can of course hide these in various ways if you so wish.

No Chilli the circuit that I built that works with your CH340 but not AVRJtag is exactly that which I h ave built before and forms the basis of my programming shield.

CCheers, Chris

I just got an AVRISP MKII
And did this, everything worked:

Driver installation for AVRISP MKII

Went to this web site: http://ibuildthings.ryanblace.com/2013/12/avrisp-mkii-arduino-105.html
Then went to this to this link: http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/
Them went to : http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/
Then downloaded this file: libusb-win32-bin-1.2.6.0.zip
Unzip somewhere.
Pulgged the AVRISP into the computer.
Run \libusb-win32-bin-1.2.6.0\bin\inf-wizard.exe
Select AVRISP mkII
And follow the instructions to create the INF and install the driver.

ChrisPSR: No Chilli the circuit that I built that works with your CH340 but not AVRJtag is exactly that which I h ave built before and forms the basis of my programming shield.

The CH340 is nothing more or less than a USB to serial converter so if you want to program with that the chip to be programmed needs a bootloader. If you use Nick Gammon's ICSP bootloader burner it will reset the fuses for you whilst it is burning.

ChrisPSR: There seems to be another WIN 8.1 block on 'Unpacking' the earlier link that you quote which simply will not unpack even though the unpacking program says that it has unpacked the zip parcel.

I have encountered that problem on (one instance of) Win 7 - some programs can see the unpacked file, others (notably the IDE) cannot.

Bizarre! But then, it is Windoze after all. :astonished:

For what it’s worth, I’m running 64bit Win7 and it all works fine. I appreciate that doesn’t directly help, but it may not be a Win7 issue.

I’ve not used Win 8.1 (or anything newer than Win7), but can you install in compatibility mode ?

Ian.

Why is everybody hell bent on using a boot loader when the sensible course for a finished product is to make the chip as independent as say a Microchip PIC. I want to get away from it being boot loade

The bootloader is purely there for your convenience. Don't use it if you don't want to. I was testing some low-power stuff yesterday. Initially I programmed via ICSP (using one of my sketches), transferring the .hex file to a micro-SD card each time. Eventually I got bored with that and installed the bootloader. That just sped up the loading of the main sketch.

Once you have it debugged you can tweak a fuse, so the bootloader is not executed, or just load it without a bootloader. The bootloader is not there to annoy you.

Is there any real need to have separate boot loaders? Probably just as hard to remember which bootloader for which application especially 2-3 hours after you have written the app., code than it is to set the required registers in the actual project program code.

The separate bootloaders are simply because different chips have different memory spaces (and indeed, hardware). You can't have a single bootloader that works on all chips because they have different configurations.

I should point out that the ICSP programming still uses, in effect, a bootloader. It is just one that is programmed into the actual chip, that takes over if you hold reset low, and send data down the SPI ports.

Once again, the bootloader just lets beginners (or indeed experienced people) program via a serial or USB port. This makes programming (eg. in classrooms situations) very simple. For people deploying stuff in the field, certainly program without a bootloader if you want to. However you will probably find that having some way of replacing code, one day, will be helpful. For example, you will probably find that a modern dishwasher or washing machine can have its firmware reprogrammed without pulling the chip out and replacing it. How do they do that? With a bootloader.

[quote author=Nick Gammon link=msg=1992273 date=1417994433] The bootloader is purely there for your convenience. Don't use it if you don't want to. [/quote]

Nic. I follow your written word often without recognition but here and now I say keep it coming as it is interseting and makes sense to me. I have found I can fire a program through the CH340 (Yep Chilli Iknow its only a converter, however it does so without a hiccup of any kind) into a 328P directly what I would like to know is can I do it by using Tx/Rx OR Mosi/Miso without a boot loader being present?

Using Tx/Rx I have found that if, (unfortunately at this time all my Mcu/IC's are bootloaded), the chips carry a boot loader then it matters whether you set the board to (me at least the) UNO or Duamilanove. One but using an incorrect board/bootloader combination will cause the programming to fail. This is a minor nuisance when the chosen chip is not ensconced in a project board but loose. Otherwise my desire to program the chip alone is for its use in my output projects and secondly the smallest chip (memory/through hole) that I can without any unnecessary encumbrance so leaving my project boards simply for the purpose of experimentation and rapid reprogramming.

Meanwhile I seek to get my AVR Mkii functioning to test the Miso/Mosi/Clk connections as my Arduino to Chip attempts have all failed.

Cheers and thanks for your interest. Chris S.

Chris,

Not sure if it helps, but I’ve un-zipped the files that I used and dumped the contents in Dropbox.

Cheers,

Ian.

I have found I can fire a program through the CH340 (Yep Chilli Iknow its only a converter, however it does so without a hiccup of any kind) into a 328P directly what I would like to know is can I do it by using Tx/Rx OR Mosi/Miso without a boot loader being present?

Tx/Rx needs the bootloader. The chip does not natively expect code to arrive on them. The bootloader (as implemented on the Uno / Duemilanove / etc.) looks for incoming serial data at reset, and if it follows a certain protocol, programs the main sketch.

On the other hand MISO/MOSI/SCK can be used to program the chip using its inbuilt in-circuit programming, if RESET is held low. However you need some sort of device to output the SPI sequences required, whether a dedicated programmer, or another Arduino.

If I were you ChrisPR, I would use only one bootloader on all chips, or put a coloured label dot to tell you which is which.

I presume they are all Atmega328Ps? If so the optiboot bootloader that is in Nick's programmer is great, and small with it.

[quote author=Nick Gammon date=1418071352 link=msg=1993429] However you need some sort of device to output the SPI sequences required, whether a dedicated programmer, or another Arduino. [/quote] Someone appears to have reported a trick using the USB to TTL converter chip - via its handshake lines - to perform the SPI. Why not? Not greatly different to using the parallel port, and can be performed through the serial API.

[quote author=Nick Gammon date=1417994433 link=msg=1992273] For example, you will probably find that a modern dishwasher or washing machine can have its firmware reprogrammed without pulling the chip out and replacing it. How do they do that? With a bootloader. [/quote] If they do it! I wonder how often that would ever happen? Unlikely to find out, since it is no doubt proprietary. On my ASKO dishwasher, it is evidently via some form of IRDA.

Gentlemen,

I have now rebuilt the photographs for my standalone & shield plus an obverse schematic p(ie.,Inverted), hopefully they are now all three in synch. Error Schematic please read legend 3-10 as 1-10 [Freudian, visual slip].

Any help over this recalcitrant project would e much appreciated as that drawn and built does not seem to work although I am blind to that fault.

Cheers,
ChrisPSR

[quote author=Nick Gammon link=msg=1992273 date=1417994433] The bootloader is purely there for your convenience. Don't use it if you don't want to. I was testing some low-power stuff yesterday. Initially I programmed via ICSP (using one of my sketches), transferring the .hex file to a micro-SD card each time. Eventually I got bored with that and installed the bootloader. That just sped up the loading of the main sketch. [/quote]

Actually I almost never use a bootloader anymore… I feel using them is too much a hassle. With ICSP, I can grab pretty much any AVR chip, breadboard it and connect the SPI and reset pins of the MCU to the USBTiny programmer I got for a few dollars. I'm using avrdude from the command line to set the fuse values (there are plenty of AVR fuse calculators on the net). AVRs I've used so far are ATiny85, ATtiny2313, ATmega328P, ATmega1284P and ATmega32. All work the same way. No need to find a bootloader for the chip, I can use whatever fuse values I want and I can run the chip at any frequency the chip supports.

EDIT: To clarify, I'm not pulling the chip off from a "programmer board" when I'm working on a project, I just have a ribbon cable connected from the USBTiny to the project I'm working on. So reprogramming the chip is very fast, comparable to speed of uploading a new sketch with a bootloader.