Uploading sketches to Atmega 328

I am planning to build a board up to upload sketches to an Arduino Uno. The plan is to build a ZIF socket on to the stripboard and upload sketches to an Atmega 328 via a USB / FTDI cable. The question is: do I need to include the 16MHz crystal and its 2 capacitors in the circuit for this purpose?

Do you mean that you want to use a standalone board to upload a sketch to the chip and then move the chip to a Uno ?

If not, then please give a fuller explanation

No, I want to upload the sketch from a laptop to the home made board containing the Atmega chip enabling me to move the chip with the uploaded sketch to another Uno.

Why not program it in the Uno then?

Can you fit the ZIFP socket to a UNO board? Might be easier.

a7

Yeah, but again, why do you want to serially program the ATmega and put it in a Uno, which can also serially program the ATmega?

The idea was to be able to program chips without damaging the legs whilst struggling to remove / replace them in a standard socket. Am I right in thinking that you can get a ZIF socket which will fit on the Arduino board Atmega socket ? If so, that may be an easier option - does anyone have experience of using these?

Thanks All.

A 28 pin ZIF socket.

I speculated

Do you mean that you want to use a standalone board to upload a sketch to the chip and then move the chip to a Uno ?

Malc92:
No, I want to upload the sketch from a laptop to the home made board containing the Atmega chip enabling me to move the chip with the uploaded sketch to another Uno.

They are surely the same

I made my own version of that for bootloading and then serial downloading.

This one also has an HCPL-3700 that I was doing some AC power detecting with, and a couple buttons that I was doing time setting testing with.

I made one to program up batches of 1284P also (there is a 1284 in the socket now, I got it by mistake and wanted to see how MightyCore handled it; no problem bootloading and serial downloading).
In both cases, there was just enough soldering to hold the header strips on the board and the ZIF sockets to the strips, everything else was a wire wrap connection.

I have a socket for a 328P SMD chip, but haven't gotten around to building up a board yet. With FTDI header and ICSP header on a board, I find it easy enough to bootload and program in system, with no need to pre-program.

File too big, separate post needed for the 2nd picture.

Both fixtures need a minimal amount of components:
one crystal
two 22 pF caps
four 0.1uF/100nF caps - DTR from FTDI, VCC, AVCC, Aref
one 10K Reset pullup resistor
wire wrap strips to mount components & ZIF socket onto
1x6 header for FTDI Basic (or equivalent)
2x3 header for ICSP

Plug on the FTDI for power,
Plug on Programmer,
Install Bootloader,
Remove Programmer,
Download a sketch from PC.
Done.

groundFungus, that certainly answers the question about the ZIF socket for a Uno board, that may be a better way for my idea.

CrossRoads, that is similar to idea I have, but mine would be simpler. Thinking back to the question of whether I needed the crystal and capacitors, I suppose it makes sense to include them as it make the board more versatile.

Thanks to all for your input.

and upload sketches to an Atmega 328 via a USB / FTDI cable. The question is: do I need to include the 16MHz crystal and its 2 capacitors in the circuit for this purpose?

Yes. In order to program via USB you need an almost-complete Arduino, including a chip that's pre-programmed with the bootloader.

The "modern way" of circuit board production is to solder the chip(s) before programming. The Arduino takes it a step further by including the bootloader so you can use USB without a separate programmer.

I assume Arduino boards are made the same way, programming the bootloader after assembly. (Certainly, the boards with surface-mounted ATmega chips are made that way.)

There's nothing wrong with bootloading chips before assembling onto boards.
Less handling of completed boards needed that way.

I recently ordered parts for a customer who is making a 20-lot of boards inhouse in Bulgaria.
I assembled the first one (and a 2nd with some minor changes to ease cable routing) and got the code running on it.
I then sent him 20 batches of material, and bootloaded and loaded the sketch onto the processors.
They are doing the assembly of the rest. I know they have good code in the chips to start with.
They are having my design of the bare PCBs made locally (it's quite a large board too, 450 x 100mm). Good quality boards from the 2 examples I have seen and assembled.
(Not the largest PCB I have designed, that was a 650 x 120mm board with 292 RGB LEDs, 9 small switching power supplies each powering 32 and 33 LEDs (2A each), and a 328P to drive it all.)

@Malc92 Like said, if you serially want to load a program you need a bootloader. But if the chip already contains a bootloader, why externally program it and more it to an Uno next. The Uno has the same capabilities.

If your chips don't have a bootloader it would make a little bit more sense. But then you do need more than a simple serial connection to the chip. Then you would need a programmer to do the job. Which can be a programmed ATmega with Arduino as ISP.

But if the destination board is really an Uno it makes not much sense to program it first. An Uno comes with a ISP connection which gives access to all pins needed to program (incl bootloader) the chip with a programmer.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.