(noob) arduino to AVR: chip selection, crystals

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

After perusing all the noob threads, this seemed like the most relevant place for my question.

I've just spent a couple months getting into embedded systems through the Arduino. Having a background in CS, when I learned it was just an AVR with a special bootloader to allow flashing via USB, I wanted to get down and touch the guts (we wrote compilers and did assembly in school).

My weakness is in understanding electronics.

I finished making an LED cube with the Arduino a couple weeks ago, but now I want to build an LED cube that can be programmed via USB (so that I can give/sell them to people).

I just ordered a USBTinyISP from adafruit industries, and it supports the ATMEGA324P (which seems like the best bang for my buck). This is a 20MHz chip, so I know I'm going to need an external oscillator (after reading "Why You Need A Clock Source")

I found a crystal that SEEMS to be what I need, but I want to clarify a few things.

The Crystal:
http://search.digikey.com/script...

The Issue:
The above guide says that the manufacturer should say what the Load Capacitance is. It says if it's a "series crystal", it's no good. This crystal seems to be both at once. The datasheet says the minimum LC is 10pF, while the maximum is "series" pF. I'm not sure how to interpret this.

Also, would it be advisable to grab one of each clock source type in case I incorrectly set the fuse bits? I'm very cautious (especially when each chip costs 5 USD), but you can never tell when the universe will decide to curse your existence. :lol:

And a second question, would a MAX232 be all I need in conjunction with the processor to get my project talking on USB? (lest whatever drivers and applications I'll have to write). I'll be ordering most of my other parts from Digi-Key soon, and I'm thinking of putting in a sample request through MAXIM to make sure this chip meets my needs before buying any (also rather expensive).

Looking forward to expanding my knowledge of embedded systems. This seems like a great community. :D

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

The crystal should be ok. How do you think a MAX232 will help with USB? Fine if you want to do serial RS232 comms but if you want to do USB, then you might have to do a bit more research.

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

Thanks for verification with the crystal.

You make a good point. There's so much to remember that I often mix these things up.

The arduino seems to use a chip from FTDI (FT232R) which converts from USB to Serial (I didn't know there was a difference). It appears to be a UART, but my understanding of the ATMEGA234P is that it has some kind of UART functionality built in. Would the FT232R be necessary in that case?

Any resources you could point me to would be appreciated. I get the impression that I'm in a little over my head, and I wonder if there is a forum/mailing list more suited to beginners like myself.

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

There are to paths...

given you want to be able to hook up to an USB port and not to an uart port.

you can get an AVR that has an USb core inside. See the atmel product selectors guide for what types are available.

or you have something in between. You have a USB connection to a comunications converter and then talk to the AVR using that line. For the last one You can take a FT232 chip to convert the USB protocol to a UART on TTL level. So if you use a avr with a uart onboard you can hook these two together directly. Just make sure that tx is connected to rx and vice versa.

should not be that hard to get going.

regards

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

meslomp wrote:
you can get an AVR that has an USb core inside. See the atmel product selectors guide for what types are available.

These look a little more expensive so the second idea sounds better

meslomp wrote:
or you have something in between. You have a USB connection to a comunications converter and then talk to the AVR using that line. For the last one You can take a FT232 chip to convert the USB protocol to a UART on TTL level. So if you use a avr with a uart onboard you can hook these two together directly. Just make sure that tx is connected to rx and vice versa.

These only seem to come in very small packages, is there anything similar in a DIP format?

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

For FTDI USB to TTL I suggest you look at the SparkFun BOB-00718 and another board they have but I can't recall the name. The cheaper one is probably better for your application since it has a female header and can be easily moved between projects.

Smiley

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

Have you seen the teensy boards?
http://www.pjrc.com/teensy/index.html
For small volume stuff like "toys" for friends,
or prototyping with USB connectivity, they are pretty useful.
And if you want to stick with arduino, there is an arduino plug in for them.

--- bill

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

smileymicros wrote:
For FTDI USB to TTL I suggest you look at the SparkFun BOB-00718 and another board they have but I can't recall the name. The cheaper one is probably better for your application since it has a female header and can be easily moved between projects.

Smiley

SparkFun shipping to Canada is a complete ripoff unfortunately. I can etch a board if I need to, I just think it'd be easier if there was something in a DIP package.

@bill: The Teensy looks good, but kind of pricy. I've already prototyped my first project, so this time around I'm going to do it the hard way (just to show myself I can :P) I could see the appeal of the teensy if I need something built in a short period of time. I put it in my bookmarks, great link.