How to wire a mega328p-AU

Im trying to create a pcb for a project, and to utilise the Mega328p AU (SMD version) to which I can't find too many useful schematics online for my requirements.

I have a few clone nanos which I would take the parts from and re apply to my pcb.

I would like to talk to the Microcontroller via a USB port (Mini or micro depending on which is suitable) as I have micro and mini smd usb ports but most nanos come with a mini usb and I was wondering what's stopping me from using a micro USB port.

This will go to a CH340C chip, which as far as I can tell allows the mega329p to talk to the computer via a USB port, as the online Arduino pdf used an FT232RL and I can't seem to compare their wiring. I have some SMD HC-49S 16MHz crystals which are required and ceramic capacitors.

I would also like to use the reset button which is on all boards and the Leds, but I won't need the external headers.

Can anyone help me by pointing me in the right direction for each requirement or offer any help of their own?

Sorry for such a tedious post but any help is appreciated - Harvey :slight_smile:

Nothing stops you :wink:

Not sure where I got it from, but it might be of use; a link to the original pdf was posted here on the forum a while ago.

nano_ch340_schematics-rev1.pdf (851.9 KB)

Feel free to omit them.

You should probably be careful to make it possible to connect to the ISP programming pins of the chip relatively easily, so that it can be programmed with the bootloader (SMT chips are normally programmed after they are mounted to the PCB.)

It sounds like your best bet would be to simply mount a Nano on your PCB as you are gaining little or nothing, apart from experience, by effectively building your own

If you can consider using a Nano Every then it has castellated pads on the edges which are designed expressly to make this easy and has no components on the back of the board so that it can lay flat on your PCB

@sterretje Thank you, the pdf is really detailed and actually easy to understand, however on the crystals they seem to be pulled to ground but form the middle of the component, does that mean it doesn't matter which side to pull to ground (Or to pin 8 in the diagram).

Also, I didn't mention before but id like the board to be battery powered and only have the micro USB port for data transfer and programming, is it s simple as not wiring the power pins form the usb and replacing the ground and 5V with the output of my battery? (After a 5v regulator)

@westfw if I remove the chip from a preassembled nano clone, would I need to change and boatload the chip again, if so I can always expose the required pins as pads or through holes to wire up and program the chip.

@UKHeliBob I'm simply trying to learn to wire and solder smd microprocessors, and using a nano is cheap and effective (especially as i'm likely to mess up), as I've used a teensy with this method, id like to try soldering this cheaper chip first, plus its a lot easier than a teensy processor.

Thank you - Harvey :slight_smile: