Xplained mini 328P to program a standalone ATmega328P

Go To Last Post
21 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello !

 

I have Xplained mini 328P board and i would like to use it as a programmer for a standalone 328P-PU which i put on the breadboard.

 

Here i drew how i see that:

 

 

Kinda similar if i was to use arduino as a programmer but instead of using arduino dialect i want to use C language.

 

Last Edited: Wed. Jul 20, 2016 - 01:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sorry to burst your bubble;but the ICSP connector on the Xplained board is an INPUT connector,for programming the onboard '328 using an external programmer.

it can't program an external IC. the ICSP2 connecttor is for programming the mega 32 using an external programmer;incase you brick the programming firmware.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but instead of using arduino dialect i want to use C language

The question is not quite clear to me.

Using C language for what?

 

I am not an Arduino man but I think you can write your code in C,

then write the Arduino ISP sketch into the "Explained mini"

and programm the external Mega. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes,  I am sure that you will be able to run the ArduinoISP sketch just like on a real Arduino.

 

Likewise,   any other programming software that runs on a mega328 can run  on your XMINI.

 

Bear in mind that you are not using an official "Atmel Programmer" so it will not be supported by AS&.

You will need to use avrdude or other third-party software.

 

It is a mystery why you don't use the XMINI for developing your C programs in the first place.

A breadboard is inconvenient.   You can solder headers to your XMINI.   Mount Arduino shields or use jumper wires to external electronics.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you guys for your answers !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

Yes,  I am sure that you will be able to run the ArduinoISP sketch just like on a real Arduino.

 

Likewise,   any other programming software that runs on a mega328 can run  on your XMINI.

 

Bear in mind that you are not using an official "Atmel Programmer" so it will not be supported by AS&.

You will need to use avrdude or other third-party software.

 

It is a mystery why you don't use the XMINI for developing your C programs in the first place.

A breadboard is inconvenient.   You can solder headers to your XMINI.   Mount Arduino shields or use jumper wires to external electronics.

 

David.

 

 

Actually i develop my code in C and i asked if i can program an external 328P with Xplained mini.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, many people use C or any other language.
I find it convenient to use Arduino hardware for most projects.
And convenient to use Arduino software when appropriate.
ArduinoISP is widely used for programming external chips.
I also have clone STK500 software that runs on a mega328P.
So you could install the Xmini as a "genuine" Atmel STK500.
Which means that it would integrate seamlessly into your AS7 environment.
David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use Xplained to program the mounted 328P and I do it with AS7. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You do know that if you spent $2 on ebay all your problems would be over instantly don't you? Search USBtinyISP though it's probably better to spend a few cents more on a real USBAsp.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are right. Plus i already have a 328P in PU package so all need is a USBasp and usb to serial adapter. Do you think it's worth buying a cheap usb to serial adapter from eBay or is that better to get a real one of FTDI ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I personally use cheap USB-TTL from ebay but then I generally use Linux so I am unlikely to have problems at the PC end with drivers. Some folks report having all kinds of problems with Prolific based USB-serial in Windows because of the drivers crashing and that seems to sell a lot of FTDI.

 

Of course there are others besides Prolific and FTDI which might be a happy "half way house". But I suppose, like buying Rolls Royce., that if you want guaranteed quality you pay the extra and buy FTDI?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have tried several USB-UART chips and they all run on Windows 7.

 

FTDI have had problems with clone chips.

Prolific have had problems with clone chips.

 

It depends on the approach taken by the genuine manufacturer.   i.e. detect a fake and disable it or let their driver function normally.

 

A punter does not know if she has bought a device with a genuine Prolific or a genuine FTDI.   But the price is a pretty big clue.

 

Currently Chinese Arduino clones tend to use CH340G chips.   These work fine too.

 

It is a mystery why a Chinese manufacturer chooses to clone Prolific chip.   The margins must be miniscule.   The fabrication cost will be the same (I guess they would be making > 1000000 chips).    If a customer complains about the Prolific driver detecting a "non-genuine" PL2303,   they would have to sell them cheaper than Prolific.   Hence any miniscule margin would disappear completely.

 

I guess that no-one could undercut CH340G prices.

 

Note that all these "clones" are completely functional.   Prolific (or FTDI) can detect differences that do not affect the operation.    I can understand them being annoyed.   FTDI that had very big margins.   Prolific that had very small margins.

 

Whether you use Windows or Linux,   it is easy to use a $3 USBASP dongle.   And keep your XMINI for worthwhile projects.

 

If you want to "integrate" with AS7:

You can make STK500 compatible with an Arduino Nano or an AVRISP-2 compatible with an Arduino Pro Micro.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What do i miss using Xplained compared to if I was to use a standalone 328 chip with USB to Serial converter and an USBasp ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You don't miss anything.

1.  An USBASP does not need a USB-Serial convertor.   It can even power your target board.

2.  If your target application needs Serial,  you might just as well install a Bootloader.

3.  Your $10 XMINI could replace a $3 USBASP.

4.  It seems  simpler to do all your development on the XMINI in the first place.   Not only does it not need an external USB-Serial,   you can use debugWIRE in AS7.

 

Once fully debugged,  you can transfer to your actual target "cheap" hardware.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is that 0.1 uF capacitor necessary when programming 328P with USBasp ?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Short ans, Yes, along with the other GND and AVCC pins as well.

 

Jim
 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
stack gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does it have it be exactly 0.1uF capacitor or can I use 47uF ones I have laying around ? Does voltage matter in this case ?

Last Edited: Mon. Aug 1, 2016 - 05:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

0.1uF (100nF) is likely to be ceramic or plastic film. Anything from 0.1uF to 1uF should be fine.

Your 47uF is likely to be electrolytic or Tantalum. These are not suitable by themselves but are fine in conjunction with your 100nF ceramics.

Buy a batch of 100nF from Ebay. They are not expensive.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does voltage matter in this case ? I found some that are rated to 50V. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your AVR is running at 5V. A 10V capacitor is fine. A 50V capacitor is fine. A 1000V capacitor is fine but probably going to be very large.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you ! I just didn't know that thing with voltage and i thought it would be easier to ask than to read the whole description about them.