avr controller

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

Hi, everyone
I am a new one in the AVR, I would like to learn programming to AVR,how wolud I do next one? please give some of advice for me, think you all very much!

Last Edited: Mon. Jun 20, 2016 - 01:08 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to AVRFreaks.

 

One path that may be attractive for you would be to obtain an Arduino. (There are many suppliers in China of Arduino clones.) In that way you do not need to buy a programmer device yet and there is a very large collection of sample software. The various Arduino designs use AVR chips (mega328, mega2560, etc). This way you can become familiar with the world of AVRs via an easy path that may eventually lead you to working with the chips directly without the Arduino framework.

 

Cheers,

 

Ross

 

Ross McKenzie ValuSoft Melbourne Australia

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

sorry,no I do not like arduino

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

Why?

 

Ross McKenzie ValuSoft Melbourne Australia

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

I think that the arduino just a platform of programming ,I need to make the robot without arduino.

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

I think that you are mistaken.

 

http://www.makeuseof.com/tag/8-a...

 

 

Ross McKenzie ValuSoft Melbourne Australia

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

thanks for your information, I feel that the pcb board of arduino is big,I want to smaller and take out the AVRchip to others for application,I'm a chinese, chinese fake everywhere in china

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

Arduino is a "prototyping system". You can use it to (quickly!) develop a design idea and when you are happy that your prototype works you can choose to implement it in a stand-alone AVR on a smaller PCB if you like.

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

There are even smaller arduinos with usb serial convertor or native usb (nano, micro) or without it (mini, fio) and they all contains bootloader.

And you don't have to use Arduino IDE. You can have modified Makefile example from avr-gcc to use bootloader.

Computers don't make errors - What they do they do on purpose.

Last Edited: Mon. Jun 20, 2016 - 08:47 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

lewis.huang wrote:

I am a new one in the AVR, I would like to learn programming to AVR,how wolud I do next one? please give some of advice

 

AVR programming related tutorials, etc:

 

AVR Clocking by Brian Fairchild (Link)

 

Atmel AVR Fuse Calculator - Online Software Utility from Engbedded (Link)

 

If you program the fuses wrong, the uC may be "bricked" (unresponsive to further programming) so:

Recovering from a "locked out" AVR by clawson (Link)

 

Bit manipulation (AKA "Programming 101") by Eric Weddington via abcminiuser (Link)

 

Dean Camera (abcminiuser) has 8 AVR tutorials that can be downloaded as pdf files (Link

 

Atmel Studio uses the GCC tool chain which includes the avr-libc C library (Link)

 

 

That should get you started.

 

Last Edited: Mon. Jun 20, 2016 - 10:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

lewis.huang wrote:
sorry,no I do not like arduino

ohhh never tell someone they have an ugly child. Or in this case an ugly cousin (AVR).

"When all else fails, read the directions"

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

lewis.huang wrote:
I am a new one in the AVR

So what, exactly, do you mean by that?

 

  • Do you have any experience with any other microcontroller(s) ?
     
  • Do you have any experience with programming in any other environment(s); eg, PC? Mobiles?
     
  • Do you have any experience with electronics?

 

Quote:
how wolud I do next one?

"next" - after what?

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

hello, I am a teacher to teach the teenagers to make the robots.
but now, the problem I've being faced was the price of the robot.
we will design a simply robot by ourself, and aslo given the robot to student without money, as you know, the AVR chips more cheaper than the arduino's. so, I don't want to use the arduino for application.

thanks!

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

So you spare some money on AVR but how do you want to flash it? Having only one programmer in school is not so encouraging to do experiments at home. For most arduinos there is just usb cable needed.

But with bare AVR you need some ISP tool (at least for programming bootloader) and they definitely will mess wrong fuses and brick those chips (but it is possible to unbrick it in most cases).

With bootloader you need ttl level serial (usb-rs232 or real serial port and MAX232).

 

So I definitely recommend small arduino (at least one, it could be used as isp programmer for bare chips)

Computers don't make errors - What they do they do on purpose.

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

lewis.huang wrote:
the AVR chips more cheaper than the arduino's.

But an AVR (or any other) chip on its own is useless - you need a board and all the associated components.

 

It is highly unlikely that you can create & build your own board cheaper than one of the cheap Chinese "clones" available on ebay ...

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

lewis.huang wrote:
as you know, the AVR chips more cheaper than the arduino's. so, I don't want to use the arduino for application

Sure an AVR chip alone might cost just $1..$2 while an Arduino costs $5 but if you just buy the chip alone what are you going to do with it? Surely you need to mount it somehow? Whether you make your own PCB or buy a breadboard (not always entirely reliable) to plug it into that's already going to add $1..$2. Then you need some kind of power supply and possibly regulation. That could be $1+. Then you need some way to link it to a PC to program it. Either you do what Arduino does and put some kind of UART-USB conversion into the circuit and then put bootloader software into the AVR or otherwise you need to get a programmer like a USBtinyISP/USBAsp/etc. So that's going to be another $1..$2.

 

That $5 Arduino is starting to look pretty good value at this stage!

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

clawson wrote:
That $5 Arduino is starting to look pretty good value at this stage!

 

Now I have to do a bit of double-checking.  While we do many production AVR designs, most are in modest quantities.  Often nowadays Mouser is a bit cheaper than DigiKey.

 

In qty. 100, plus shipping, ATMEGA328P-AU is about $2.60.  '168PA about $2.20.  '88PA about $2.00.

 

Many eBay vendors are selling Arduino-clone "Pro Mini" with '328P for $2.18-$2.25, free shipping. 

E.g. http://www.ebay.com/itm/Pro-Mini...

 

So I/we/you can get the complete assembled board, with headers and '328P and crystal and bootloader installed (and USB connector and interface chip, right?) and etc., for less than I pay for the '328P alone.

 

Whether you plan to use the Arduino framework, and/or bootloader, is up to you.  When "getting started" You've just eliminated many many of the tasks of getting a circuit board going and populated.  Now, you expressed interest in "robot".  As it is an Arduino, you can get many inexpensive shields that will get you going as well.  And/or the "prototyping" shields to mount your own circuitry e.g. http://www.ebay.com/itm/Proto-Sc...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

yeah, I will bulid the circuit with breadboard and also with some of the components that the circuit were needed.I am a hardware engineer before. the C code I don't understand more, but, I am going to learn in the future. so, I want to ask some of people who was experienced with AVR or arduino. the idea in my mind as below:
step 1 I would like to program the C code into the arduino with arduino IDE, and then take out the AVR chip from the arduino for other circuit application .
step 2 to put the new one AVR chip into the arduino for program again in the same way.
how could I do this by simply way. unless changed the AVR chip from aduino for programming, others might be diffcuit, does it?
some of people in forum were suggested me that only to buy AVR chip is diffcuit to configurate the fuse bit and download the code.
because of programmer device I don't have , the ISP must be needed.
the biggest problem was difficult to configurate the fust bit in chip's.

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

lewis.huang wrote:
step 1 I would like to program the C code into the arduino with arduino IDE, and then take out the AVR chip from the arduino for other circuit application . step 2 to put the new one AVR chip into the arduino for program again in the same way.

 

From experience, and I think that others here will agree,  moving chips can certainly be done -- but you will introduce many other problems especially in a classroom environment.  For reliable work at the least you will need ZIF sockets at both ends--not inexpensive.  Or "sacrificial" headers.

 

As demonstrated above the entire base module is less than the cost of the micro.  And already has a bootloader and USB connector.  Or you can do conventional ISP and still leave the module in place.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

I am an electronic engineer before, just was familiar with hardware, the software I never experienced , I just want to use AVR chip to design other circuit ,the circuit has no arduino board in there. because of the price much expensive than AVR chip
it is impossible that we will buy so many arduino in my school. and we have to give the opus to student everyclass when somebady's own opus was done.
we wouldn,t ask them to take back when they are in next time .
It should be keep it by himself.

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

thank you for your suggestion, could you tell me how would I do this (changed the new one when the old one has programmed, and then download the code to the AVR chip with ISP(the ISP was made of the arduino).

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

lewis.huang wrote:
I just want to use AVR chip to design other circuit ,the circuit has no arduino board in there. because of the price much expensive than AVR chip

it is impossible that we will buy so many arduino in my school.

Eh???

 

Have you not bee listening to anything anyone has said here.

 

Post #11 even gives it in hard numbers: buying Arduinos is cheaper even than just the AVR chip alone!!

Last Edited: Tue. Jun 21, 2016 - 02:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

it is really? the arduino cheaper than AVR chip?

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

lewis.huang wrote:
it is really? the arduino cheaper than AVR chip?

Yes, cheaper than any of us can buy AVR+necessary support components to make a complete working circuit.

 

No one knows how the Chinese manufacturers manage to do it at these prices and even (presumably?) make a profit?!?

 

But then today someone started another thread that was about a China supplied PCB containing SD card socket, MP3 player chip and 2W amplifier all for $0.93 - quite incredible! Most of couldn't even get the bare PCB for that price.

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

lewis.huang wrote:
it is really? the arduino cheaper than AVR chip?

Did you bother to read my post, with links?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

the cheaper the bad one in china I am afraid.
I think that the price was not fair might be a fake in normal.
do your country has this case not?
if the price was very low, maybe a bad one.
if the price was very expensive ,not be sure that this one is the best one. this case everywhere in china, this is a chinese trade and market

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

what is the ZIF socket did you said?is that usual socket with 40 pins out? and what do you man about following? "but you will introduce many other problems especially in a classroom environment. "

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

AVRs can handle about 10 programmings like that (using a sepperate programming board like arduino) in a classroom environment. after that the pins of the device start to fall off and parts will start suffering from static electricity. Buting a arduino micro (even a cheap 1$ clone) is a safer bet because you can directly embed it into your robots and nothing gets pulled out all the time only the USB cable.

 

I have used the cheapest e-bay clones and they have all worked. And they all come from some part of china.

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

bloody-orc wrote:
after that the pins of the device start to fall off 

 

As characterised for the famous Signetics write-only memory:

 

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

awneil wrote:
the famous Signetics write-only memory

I've got some of those in one of my projects even though the cooling was problematic.

I needed them for the "Neu Channel" technology. wink

 

David (aka frog_jr)

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

Hello,everyone:

I had a chip of atmega48pa on my hand , I want to make a arduino with this chip, or to make ASP.

because, I want to program C code with ASP or to use the arduino as ISP.

now, I am being confused with ASP, ISP ,USB to TTL or to others. 

 

I had a idea in my mind with AVR chip(atmega48pa)

The first ieda in my mind would be :

I would like to make a smaller arduion with mega48pa.

Have you all has a schematic that used this chip meage48pa.

and then, I will use arduino as ISP to program the other chips(such as Mega48,328 etc.)

 

The second idea of :

1.To make the download tool with this chip.

2.to use this download tool as a ISP to download the code in other new chip.

 

 

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

So, again, why not just get an Arduino which has all this stuff ready and working??

 

Then you can look at the Arduino and see how it does it. Play with it. Investigate it. Understand it.

 

Then, once you've understood it and gained sufficient experience, you'll be in a position to do it yourself ...

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

lewis, I don't hink anyone on this board would recommend NOT using Arduino hardware to get started. I will counter you "There are many fakes in China" by saying if you buy ANY part from China you risk getting a fake. One thing I can assure you is the AVR was designed SPECIFICALLY to be in circuit programmable. If you set up a system where you are prying chips in and out fo sockets you are just setting yourself up for certain failure.

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

lewis.huang wrote:

I would like to make a smaller arduion with mega48pa.

 

You still need to ISP that unit...

 

But anyway, Arduino schematics are readily available.  Where have you searched?

 

the cheaper the bad one in china I am afraid.
I think that the price was not fair might be a fake in normal.
do your country has this case not?
if the price was very low, maybe a bad one.

I'm also somewhat cautious with China/Hong Kong purchases.

 

But on e.g. eBay, if the vendor has been selling for some years, has thousands of feedback, has little negative feedback, and has sold dozens/hundreds/thousands of the part -- then it almost always turns out OK.  And as I demonstrated with the pricing analysis earlier, the sums involved are so low that if, say, 1 unit of 10 has some bad solder joints or whatever it is not the end of the world.

 

So far I've had good experience in a few transactions on AliExpress.  [I haven't had to exercise it but] There is the published "buyer satisfaction" policy which I assume is to address some of the cautions mentioned.  And communication is very good IMO.

 

(have you said which country you are in?)

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Wed. Jun 29, 2016 - 01:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In post #7, Lewis says he is Chinese. With my "moderator's superhero cape" on, I can confirm that his IP points to China.

Ross McKenzie ValuSoft Melbourne Australia

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

Somewhat OT:  We've done several board design apps for a local university; "science" departments.  Research projects for monitoring and control devices.

 

They used Arduino base boards and we designed/laid out the "app" circuitry in a shield format.  That way, they could "hit the ground running" with anyone that could do Arduino programming.  It works out well.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.