Setup for programming a stand alone

HI,

I am struggling with the programming of a stand alone 328P in the Arduino IDE., so: Assuming that I have that stand alone 328P on say a bread board, 1] What port outlet do I use when not highlighted and all when I can't find a port output how do I set up the serial port. 2] What board title do I elect to use. & 3] Which programmer do I equally elect to use when using say a USBASP., adapter or for that matter an FTDI232RL.

Hope you can help an old lame duck. 'chuck'. I'm already to go but the Arduino IDE., isn't seemingly in reciprocation.

Cheers, Chris S.

Most of us would suggest you look at what Nick Gammon has done Here.

Old lame dog.

Larry D,

Thank you for your addition to the thread. Haven't read all of your link, I shall, but that's not really what I call 'standalone' as it seems to me that it is supported quite heavily by another Arduino, which is a totally different matter as for instance that supportive Arduino selects and elects to use a com., port without quibbling and the programmer is a forgone conclusion.

Chris S

Cannot get more standalone than Nicks other offering. HERE ALSO

When i make standalone (with bootloader) projects i use one of these: https://www.adafruit.com/products/70

I am struggling with the programming of a stand alone 328P in the Arduino IDE., so: Assuming that I have that stand alone 328P on say a bread board, 1] What port outlet do I use when not highlighted and all when I can't find a port output how do I set up the serial port. 2] What board title do I elect to use. & 3] Which programmer do I equally elect to use when using say a USBASP., adapter or for that matter an FTDI232RL.

You select the UNO and the FTDI com port offered.

If you cannot locate the port in the IDE, it is generally because the IDE is not "Plug and Play" - it only enumerates the USB ports as you start it up, so you have to plug in whatever USB device you are using before you start the IDE.

It's a real pain.

Paul__B: If you cannot locate the port in the IDE, it is generally because the IDE is not "Plug and Play" - it only enumerates the USB ports as you start it up, so you have to plug in whatever USB device you are using before you start the IDE.

It's a real pain.

When I get back to base I'll try that. GREAT. Do you know which board and programmer setup to choose when using CH430R & or FTDI.

LarryD: Cannot get more standalone than Nicks other offering. HERE ALSO

Larry that's great, read it through, however he still does'nt concern himself with the setup; so, I have written on his web forum asking for the info. Cheers & Thanks, Chris S.

LarryD: When i make standalone (with bootloader) projects i use one of these: https://www.adafruit.com/products/70 You select the UNO and the FTDI com port offered.

Hi Larry, That's one of those that I mentioned in your included 'Quote'. I nowadays prefer the CH430's though; exactly the same answer provided from a different chip more easily attached straight out of the box to my favorite 328 ProMinis. Cheers and thanks, ChrisPSR.

ChrisPSR:
Hi Larry,
That’s one of those that I mentioned in your included ‘Quote’.
I nowadays prefer the CH430’s though; exactly the same answer provided from a different chip more easily attached straight out of the box to my favorite 328 ProMinis.
Cheers and thanks,
ChrisPSR.

Assuming you have the Uno boot loader on the Atmega 328, and it is wired like an Uno (with a 16MHz crystal etc) then it works a lot like a pro mini. Just connect the USB to serial converter (in this case the CH340) to the chip. Connect it like the Shrimp here.

The IDE doesn’t detect what micro controller you have, it just sees the com port, so you connect to that and go, assuming that everything is connected OK at the other end.

ChrisPSR: Do you know which board and programmer setup to choose when using CH430R & or FTDI.

Irrelevant.

As long as you have the driver installed for the particular USB to TTL chip (which means on Windoze, it goes "do-deep" when you plug it in or on Linux where drivers are pretty generic and built-in, it pops up in dev), it just looks like a COM port to the IDE.

ChilliTronix: Assuming you have the Uno boot loader on the Atmega 328, and it is wired like an Uno (with a 16MHz crystal etc) then it works a lot like a pro mini. Just connect the USB to serial converter (in this case the CH340) to the chip. Connect it like the Shrimp here.

Hi ChilliTronix,

Well as you sold my original setup to me through your eBay shop, and incidentally I will come again as I have, then I know, you know that you know, that I know [d'you like that] just what your talking about and the CH340 certainly sets itself up straight out of the box; there is nothing like the driver problems which can be faced by the FTChip, chip. Advice for which I shall remain grateful and for your taking me down that route. Incidentally Arduino suggest that you do not use the UNO for these purposes and suggests the Duamilanove instead.

I have to confess that even though I have the knowledge of the CH430 I haven't wired it up to my stand alone as I have been following Tutorials [is this where I've gone wrong], although I have made mine multi-purpose in so much as it can bootload, program alone, program as an (Arduino Prototype V.5) shield and act as a working proto., board too. So now I'm off to see if it will turn my somewhat recalcitrant proto., board in to a fully fledged grown up one ........................... here's hoping.

One further little grumble; nobody seems to tell us newbies, is that you can only use Rx to Tx when the Atmel Chip caries a boot loader; else it has to be the in-circuit peripheral method.

Cheers, Chris

Paul__B: Irrelevant.

As long as you have the driver installed for the particular USB to TTL chip (which means on Windoze, it goes "do-deep" when you plug it in or on Linux where drivers are pretty generic and built-in, it pops up in dev), it just looks like a COM port to the IDE.

So does this mean that you really don't have to set the com., port in the IDE for it to work?

[Incidentally in recognition of a driven usb., start-up my machine goes "do-deep-do"]

Chris S

If you have a 328P you can stick on what ever compatible boot loader you like...

You still need to select the com port in the IDE.

And yes, if you use the boot loader option you upload sketches via serial. If you don't want to do that you can make an ICSP programmer see Nick Gammons page here.

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 loaded. A stand alone chip is exactly that and not one leaning on something else in order to operate. If you want to make a compact finished product then an Arduino or should that really be called an Adafruit MINI is a good bet but wouldn't that be nice to strip a program down to its bear and smallest code set, use as small a chip as possible and behave like a good, sound manufacturer would do and think economically and concisely. I do not wish to take anything away from Nic Gammon but yet again I am pointed to a stand alone that patently isn't.

Surely everybody must be of the mind that a stand alone is just that and not one dependent on any other piece of electronics and that's where I have found the ProMini to get as near as I can to a truely well produced end product. In prototyping I enjoy the ease of using Arduino over my old Pic's there are some advantages the Arduino library being one and another is the standard C/C++ language developed for the Arduino. I now wish to use the Atmel AVR's in the most basic but well served way that I can finding the route there is seemingly clouded in fog not just to me but very apparently to others; why? All the aforesaid doesn't mean I shun the bootloader, it has its place and I enjoy using it but there is also that nagging thought of is it an absolute necessity and then the answer has to be, no.

Chris Spreckley.

If you don’t want a bootloader, then use an AVR ISP like this
http://www.atmel.com/tools/avrispmkii.aspx
and use the File: Upload Using Programmer to program into memory directly via the ICSP (SPI) pins.
No bootloader is installed, your sketch starts immediately after a reset.
Burning a bootloader first sets the fuses for 16 MHz crystal clock operation. Upload Using Programmer next to put your sketch on & wipeout the bootloader.

Here’s another method too
http://www.gammon.com.au/forum/?id=11638

Chris, the Uno bootloader is I believe 512 bytes.

The only reasons not to use it (if you are using a 328P) are:

  1. You really need all the flash.
  2. You can't wait 1 or 2 seconds from power up.

If either of those is an issue, then use, as Crossroads suggests, an ICSP as detailed on Nick Gammon's page. Note though that uploading programs to it does take a little longer as you have to copy to SD card first.

ChilliTronix: Assuming you have the Uno boot loader on the Atmega 328, and it is wired like an Uno (with a 16MHz crystal etc) then it works a lot like a pro mini. Just connect the USB to serial converter (in this case the CH340) to the chip. Connect it like the Shrimp here.

The IDE doesn't detect what micro controller you have, it just sees the com port, so you connect to that and go, assuming that everything is connected OK at the other end.

Right: I have had a look at the SHRIMP and I absolutely adore sea food. There isn't enough explanation of the shrimp for me to say with equanimity "It's great!", but it looks to have prospects, however Digital receive and send seemed to me to be requiring a BOOTLOADER have shrimp got over this? Probably not but we can hope.

Cheers and thanks for the nudge in their direction, if as I think they have absented the BOOTLOADER then terrific; must get brave myself and have a go.

Chris S.

Chris S.

CrossRoads: If you don't want a bootloader, then use an AVR ISP like this http://www.atmel.com/tools/avrispmkii.aspx and use the File: Upload Using Programmer to program into memory directly via the ICSP (SPI) pins. No bootloader is installed, your sketch starts immediately after a reset. Burning a bootloader first sets the fuses for 16 MHz crystal clock operation. Upload Using Programmer next to put your sketch on & wipeout the bootloader.

Here's another method too http://www.gammon.com.au/forum/?id=11638

Cheers CrossRoads,

Unfortunately you seem to have missed my forum thread of (Link) http://forum.arduino.cc/index.php?topic=282242.msg1980559#msg1980559

Ths states that though I have an Atmel AVRISP JTAGICE mkii bought off a friend it seems to be at fault or I am and in that forum I am asking for help which as yet goes unanswered.

Cheers, Chris S.

ChilliTronix:
Chris, the Uno bootloader is I believe 512 bytes.

The only reasons not to use it (if you are using a 328P) are:

  1. You really need all the flash.
  2. You can’t wait 1 or 2 seconds from power up.

If either of those is an issue, then use, as Crossroads suggests, an ICSP as detailed on Nick Gammon’s page. Note though that uploading programs to it does take a little longer as you have to copy to SD card first.

Thats true but it doesn’t obviate the fact that the chip is programmable by a chimp all be it one that is seemingly much more clever than poor old me.