Author Topic: AVR Development Board  (Read 19347 times)

0 Members and 1 Guest are viewing this topic.

Offline ion

  • Regular Contributor
  • *
  • Posts: 142
Re: AVR Development Board
« Reply #25 on: May 03, 2014, 03:18:30 pm »
If you use blank MCU's, you will need to program the bootloader with the ICSP connectors (you will need a programmer).

That's actually what got me interested in making a board like this. I recently acquired an Olimex clone of an AVR ISP MKII. I want to try working without the Arduino bootloader "training wheels".

If you're uploading Arduino code to a blank MCU and you don't want to use a bootloader, don't forget to set the fuses.  The first time I tried it I quickly learned the 328P isn't configured for a 16MHz external crystal from the factory.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: AVR Development Board
« Reply #26 on: May 03, 2014, 03:19:23 pm »
it comes as internal 1MHz but the fuses do more than that.
 

Offline ion

  • Regular Contributor
  • *
  • Posts: 142
Re: AVR Development Board
« Reply #27 on: May 03, 2014, 03:34:33 pm »
Sure they do, but the speed was the most obvious clue that something wasn't right.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: AVR Development Board
« Reply #28 on: May 03, 2014, 05:55:15 pm »
Sure they do, but the speed was the most obvious clue that something wasn't right.

I had the same problem, clock was 1mhz, which means that you can program at most at 250khz and avrdude's default speed was higher so it didn't program. I had to use the -b option to show it down IIRC.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: AVR Development Board
« Reply #29 on: May 03, 2014, 06:02:31 pm »
use atmel studio, I've just done a tube-load, one of the main tabs has the speed.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: AVR Development Board
« Reply #30 on: May 03, 2014, 11:55:40 pm »
use atmel studio, I've just done a tube-load, one of the main tabs has the speed.

I tried it once but it's such a bloatware. We have a thread somewhere here about that topic. All I needed was the programming software. I then switched to avrdudes (the gui frontend) and am now using just a simple avrdude command line.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: AVR Development Board
« Reply #31 on: May 04, 2014, 07:18:15 am »
Yes it is a bit OTT but I find it easier to use than some obscure tool or command line. most MCU manufacturers seem to go the same way although Atmel seem to have gone the extra mile.
 

Offline lapm

  • Frequent Contributor
  • **
  • Posts: 564
  • Country: fi
Re: AVR Development Board
« Reply #32 on: May 04, 2014, 08:38:14 am »
I'm trying to make the same type of dev board that Ben Heck did in this video:
Unfortunately he doesn't provide a schematic, but he says he based it off a section of the Arduino Uno circuit. I tried to make my own schematic based off the Uno and what I saw in his video, but before I start soldering I was hoping you guys could take a look at the circuit and make sure I'm not missing anything. There are some elements I'm not sure about, some of the pins are prefixed with an "A", like "AREF" or "AVCC". Not sure if they're necessary for ICSP programming. I'm also not sure which capacitors are supposed to be paired with the crystal. It doesn't seem to specify in the schematic.

Attached is my circuit in DipTrace and jpg.

*Edit* Forgot to mention that I couldn't find the right parts for the pin headers so I just took anything that was square with the correct number of pins. So, that's not a card edge connector, it's actually a 10 pin female header. Also couldn't find the ATMega328P, so I used the ATMega48 which has the same pinout.

Ben heck used ICSP, meaning simplified connection to target MCU and programmer...  Theres excellent example in arduinos website how to use arduino as ICSP programming device.

Basicly my only beef with Ben is that he docent really show things, he keeps quite shallow. The show is more like hey look what my employer wants me to mention this week..

Basicly for ICSP you need just few pins connected on target MCU:

 Power: GND + Vcc
 Reset line
 Data lines: MOSI, MISO and CLK

you can use avrdude or similar program with arduino ICSP...
Electronics, Linux, Programming, Science... im interested all of it...
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: AVR Development Board
« Reply #33 on: May 04, 2014, 09:12:18 am »
that is what I was trying to point out but apparently as a moderator I'm not allowed an opinion. the board show is a target programmer NOT a development board, that is what the arduino is. The fact that that damn video is always tops in search results for AVR tells me that a lot of money has been ploughed into advertising. I think his video shows using a DIL socket when it would make more sense to use a zif socket which is what I did long ago. All you need is a bit of breadboard with a zif socket on it and the parts required to get the MCU up and running which would be power and crystal with caps if your going to use them in your final project. And no I didn't need to watch any video tutorial on how to do the obvious.
 

Offline LegionTopic starter

  • Frequent Contributor
  • **
  • Posts: 360
Re: AVR Development Board
« Reply #34 on: May 04, 2014, 11:37:10 am »
So I wired up a 328P to the Olimex AVR ISP MK2. Couple problems though. For some reason this Olimex programmer uses a 10 pin ICSP header instead of 6. I can get Atmel studio to see the programmer, but any attempts to read the device fail. Not sure if I trust "Olimex" brand and it's annoying that it uses a 10 pin header. Might just throw it out and get a proper AVR brand programmer.
 

Offline LegionTopic starter

  • Frequent Contributor
  • **
  • Posts: 360
Re: AVR Development Board
« Reply #35 on: May 04, 2014, 11:43:39 am »
I tried it once but it's such a bloatware. We have a thread somewhere here about that topic. All I needed was the programming software. I then switched to avrdudes (the gui frontend) and am now using just a simple avrdude command line.

Visual Studio is the dev environment I work in everyday. I was pleasantly surprised when I found out Atmel modified VS. Not having to learn a new environment lets me focus on the MCU.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: AVR Development Board
« Reply #36 on: May 04, 2014, 02:12:37 pm »
Basicly my only beef with Ben is that he docent really show things, he keeps quite shallow. The show is more like hey look what my employer wants me to mention this week..

It's one of those shallow and cheerful diy shows that makes things looks much easier than they are. "Look how easy it's to build X when you have the money, machines, expertise and a supporting crew and you cherry pick what to show"

It can be useful to inspire kids but in some way detached from the real world and can be frustrating when you try to apply it.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: AVR Development Board
« Reply #37 on: May 04, 2014, 02:18:35 pm »
So I wired up a 328P to the Olimex AVR ISP MK2. Couple problems though. For some reason this Olimex programmer uses a 10 pin ICSP header instead of 6. I can get Atmel studio to see the programmer, but any attempts to read the device fail. Not sure if I trust "Olimex" brand and it's annoying that it uses a 10 pin header. Might just throw it out and get a proper AVR brand programmer.

You can get on eBay a cheap adapter from 10 to 6. Iirc, one row of the 10 is ground and then the other 5 connections.

There are many cheap programmers that do work well. I am using atmel ISP mk2 which is not terribly expensive.

 

Offline LegionTopic starter

  • Frequent Contributor
  • **
  • Posts: 360
Re: AVR Development Board
« Reply #38 on: May 04, 2014, 02:22:05 pm »
You can get on eBay a cheap adapter from 10 to 6. Iirc, one row of the 10 is ground and then the other 5 connections.

There are many cheap programmers that do work well. I am using atmel ISP mk2 which is not terribly expensive.

One row is 4 ground pins and 1 Vcc, the other row has all the data connections. I just manually adapted it for now, but it still didn't work. This programmer is an Olimex brand clone of the Atmel AVR ISP MK2.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: AVR Development Board
« Reply #39 on: May 04, 2014, 02:40:48 pm »
just buy the real thing, it's less than 40 quid
 

Offline nowlan

  • Frequent Contributor
  • **
  • Posts: 649
  • Country: au
Re: AVR Development Board
« Reply #40 on: May 04, 2014, 02:46:37 pm »
I was advised to get a legit AVR programmer isp mkII for $40 odd. I am sure the $5-15 on ebay work, but wanted to avoid any frustration with incompatibility.

I ended up buying a dev board from deal extreme, except mine came with an LCD. JY-MCU Minimum AVR System Board (ATMEGA32) . Ironically, I had issues with the programmer pin out being different. Also required a pull up resistor to stop the lcd pulling programming line down or something.

I see some atmel nano boards on ebay for around $3. Sounds like a bargain. Look to be knock off of the teensy boards. I wasnt too interested in arduino and the shields.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: AVR Development Board
« Reply #41 on: May 04, 2014, 02:49:46 pm »
Basicly my only beef with Ben is that he docent really show things, he keeps quite shallow. The show is more like hey look what my employer wants me to mention this week..

It's one of those shallow and cheerful diy shows that makes things looks much easier than they are. "Look how easy it's to build X when you have the money, machines, expertise and a supporting crew and you cherry pick what to show"

It can be useful to inspire kids but in some way detached from the real world and can be frustrating when you try to apply it.

It's just element14, farnell, newark or whatever the "Heck" they want to call themselves this day of the week have in mind as a way to break into the attention span of the newcomers to MCU's. so they just did a load of bloated crap and then paid google loads of money to make it show up in any search for AVR or similar. It is THE video of all that contains the least amount of information yet appears most often.
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: AVR Development Board
« Reply #42 on: May 04, 2014, 03:45:11 pm »
Quote
I see some atmel nano boards on ebay for around $3. Sounds like a bargain. Look to be knock off of the teensy boards. I wasnt too interested in arduino and the shields.

 I think you will find that those Asian E-bay $3 with 'nano' in their titles are really pro mini and lack the FTDI USB serial chip that a nano has. For example:

http://www.ebay.com/itm/New-Pro-Mini-atmega328-5V-16M-Replace-ATmega128-Arduino-Compatible-Nano-d2-/151253230478?pt=LH_DefaultDomain_0&hash=item233765238e

Is in fact a Pro-Mini clone. Where as a true Nano clone which does have the FTDI usb chip and usb connector start at around $6, still a great price.

http://www.ebay.com/itm/New-Mini-USB-Nano-V3-0-ATmega328-5V-16M-Micro-controller-board-For-Arduino-/200964325858?pt=LH_DefaultDomain_0&hash=item2eca6841e2




 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3441
  • Country: us
Re: AVR Development Board
« Reply #43 on: May 04, 2014, 04:42:33 pm »
I'm trying to make the same type of dev board that Ben Heck did in this video:
Unfortunately he doesn't provide a schematic, but he says he based it off a section of the Arduino Uno circuit. I tried to make my own schematic based off the Uno and what I saw in his video, but before I start soldering I was hoping you guys could take a look at the circuit and make sure I'm not missing anything. There are some elements I'm not sure about, some of the pins are prefixed with an "A", like "AREF" or "AVCC". Not sure if they're necessary for ICSP programming. I'm also not sure which capacitors are supposed to be paired with the crystal. It doesn't seem to specify in the schematic.

Attached is my circuit in DipTrace and jpg.

*Edit* Forgot to mention that I couldn't find the right parts for the pin headers so I just took anything that was square with the correct number of pins. So, that's not a card edge connector, it's actually a 10 pin female header. Also couldn't find the ATMega328P, so I used the ATMega48 which has the same pinout.

Ben heck used ICSP, meaning simplified connection to target MCU and programmer...  Theres excellent example in arduinos website how to use arduino as ICSP programming device.

Basicly my only beef with Ben is that he docent really show things, he keeps quite shallow. The show is more like hey look what my employer wants me to mention this week..

Basicly for ICSP you need just few pins connected on target MCU:

 Power: GND + Vcc
 Reset line
 Data lines: MOSI, MISO and CLK

you can use avrdude or similar program with arduino ICSP...

That is exactly why I point out the Arduino site's page on minimalist approach.  It is so darn simple and it was made into something like rocket science.

I think "minimalist way first" is the best way to approach learning.  Like connecting a 7805 bare.  Now as one encounter problems, one look at all those extras (like the decoupling caps) and one can then learn why they are there.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: AVR Development Board
« Reply #44 on: May 04, 2014, 05:23:10 pm »
this is what I made for burning arduino stuff or at least anything on an ATmega328 or similar with a 16MHz crystal, it will still work if I'm using internal clocks and I'm sure it will work on any program requiring a high frequency crystal as for just programming the frequency probably does not need to match the one attached. No 10+ minute video required......
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7764
  • Country: de
  • A qualified hobbyist ;)
Re: AVR Development Board
« Reply #45 on: May 05, 2014, 09:54:12 am »
I can recommend the Diamex ALL-AVR which supports ISP, PDI and TPI (incl. 12V for a disabled reset pin). And it's not expensive, around 28 Euros. I'm using it for quite a while with avrdude and can't say anything bad about it.
 

Offline LegionTopic starter

  • Frequent Contributor
  • **
  • Posts: 360
Re: AVR Development Board
« Reply #46 on: May 05, 2014, 01:42:29 pm »
this is what I made for burning arduino stuff or at least anything on an ATmega328 or similar with a 16MHz crystal, it will still work if I'm using internal clocks and I'm sure it will work on any program requiring a high frequency crystal as for just programming the frequency probably does not need to match the one attached. No 10+ minute video required......

The ZIF socket is a good idea. Added one to my order along with a proper Atmel AVR ISP MK2.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf