Go Down

Topic: Atmega328P standalone (Read 1 time) previous topic - next topic

Matti

Short question.

Can I upload a sketch to my Arduino Uno with a Atmega328P, unplug the chip, transfer to breadboard and proceed like nothing happend?
Obviously I will add a crystal, a resistor and two capacitors.

With is the minimum build if I prefer to unplug-n-play like that?

Best, Mathias

CrossRoads

Yes you can.
Minimum recommended hardware (what I use):
328P
16 MHz crystal
two 22 pF caps
4 100nF (0.1uF) caps - Vcc, Avcc, Areft to Gnd (Do Not connect to 5V), DTR from FTDI Header
10K pullup resistor
ICSP header
You can see the parts here on a 40-pin '1284P test board - 328P is the same, just a smaller 28-pin part.

I've since soldered a ZIF socket on top of the machine sockets for bootloading parts.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Matti

Thank you for a quick reply.
Exactly the answer I hoped for.

I just can't make my Atmega328P's work as standalone.

I felt like I tried every single tutorial out there, and nothing works, now my 3 microcontroller doesn't even seem to work anymore.

You know of a good way to check if the chip is dead or it's just the bootloader (again)?

CrossRoads

#3
Jan 31, 2017, 09:27 pm Last Edit: Jan 31, 2017, 09:27 pm by CrossRoads
Does it (they) work when reinstalled back in the Uno? If so, then it's a wiring issue.

I've wired up plenty of boards just like this, usually without the diode (it keeps any high voltage spikes on the reset from kicking the part into High Voltage (12V) programming mode and looking like its hung).

Check your Rx/Tx, pins, make sure they're not swapped, and that Reset is actually at Vcc.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Matti

Looks like a really interesting scematic you got there. If you upload the sketch while the chip is in the board, doesn't that make Rx/Tx, SCK, Mosi and Miso redundant? I mean, I just wanna run a seriously low power blink sketch for starters.

No, the chips doesn't seem to respond when plugged back into the Uno. I get a:
Code: [Select]
Sketch uses 1,028 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x3a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x3a
avrdude: stk500_recv(): programmer is not responding


I tried holding the Uno's reset button, but get no reply of any sort.

CrossRoads

Redundant - depends what your plans are for the pins. Not too many projects get programmed and work without needing some tweaking.
Interesting? This is basically the Promini in DIP format and without the voltage regulator.  Nothing special about it.\

Are you sure the parts are bootloaded?  You need a Programmer to do that (Uno running bootload installing sketch, or a real Programmer - I use Atmel AVR ISP MKii, others use USBASP, or something like this
https://www.sparkfun.com/products/9825
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Lot on amazon too.
https://www.amazon.com/s/ref=nb_sb_ss_c_2_12?url=search-alias%3Delectronics&field-keywords=usbasp+programmer&sprefix=usbasp+progr%2Caps%2C714&crid=TK8IJ3PYS0W7
Easier to have a dedicated tool vs messing with setting up the Arduino every time.
I used an Atmega8 based one for a while, until I misplaced it, then got the AVRISP MKii and have never gone back (despite having found it again eventually).
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Matti

I should probably get me a real programmer.

My lack of patience usually results in too many workarounds.

Thanks for the replies, I will try to set up a "bare minimum".

Go Up