Hardware for beginning my AVR education

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

I'm a hardware guy. Although I've done some very simple PIC projects, I want to develop my skills in embedded SW. I was working on a project with a SW guy who has a lot of PIC experience, so he was pushing the PICs for a new design. What I don't like about the PICs is that the high IO count parts are very hard to find in stock in small packages (even directly from Microchip), and their pricing seems to flatten out quickly. I did more searching, and I was so excited to find the ATtiny88. It's so cheap, and comes in a nice small 32-QFN (that's actually stocked). I could sprinkle this all over the place!

Unfortunately, I can't seem to find a demo board with lots of peripheral goodies. I've already done some simple programming (blinking LEDs, etc) of the ATtiny88 on one of those solderless breadboards, but I hate working with those. So, my first question is, am I wrong? Any good ATtiny88 demo boards?

I'm assuming that I'll just have to do my own board. Not a big deal. So, my next question is for my AVR education, is there anything you can think of that I should add. Here's my current list:

UI education
- numerous LEDs
- numerous momentary switches
- LCD char/graphic displays
- 7 segment LED display
- FET switch controlling LED supply for PWM
- potentiometer for A/D
- filter/opamp/headphone jack for PWM audio
- buzzer
- mic opamp to A/D for VU meter

Comms applications and education
- SPI, I2C, UART: headers on lines for logic analyzers
- FDDI chip (learn USB comm)
- SD Card (learn memory, FAT, SPI)
- flash memory (learn memory, boot load?, SPI)
- external A/D (learn I2C)
- current meter chip (learn multiple I2C)
- 2x ATtiny88 for MCU to MCU comm, plus MCU programming aux MCU (useful for a test fixture which could program multiple boards at once in production (using a dedicated ATtiny88 for each board in the panel))

For starting my AVR education, what else might be missing? ICs/connectors/circuitry for learning other programming implementations? Other test points?

Thanks!

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

Well, maybe you should need a multimeter , and even an oscilloscope (gabotronics makss a nice tiny one, which can be used as some protocol analyser and is worth 50US$
http://www.gabotronics.com/devel...)
Some graphical screens are about the same price than classical LCD -the same supplier sells 16*2 character LCDs at 9.5E$
and a SPI TFT (with a Sd adapter inside) 12E$
https://hackspark.fr/fr/2-2-seri...). This is new, and maybe the price drop (3/1 withn one year) will go on...

Maybe you should add a Xal (for the rs232 to be stable), some kind of verobard/ naked (dual sided , ready to solder) prototyping boad or a broad beard ?

Edited : is using a same powefull mcu for debugging (one may need exra pins to light up leds, showing some portions of a programs were reached.. a serial line may be useful, too) and for normal use? (some parts of software can even be tested ... on a PC -everything to debug is preexistant- , before being ported)...

Last Edited: Thu. Aug 21, 2014 - 07:58 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The (DIP) Arduino Uno board is compatible with an ATmega88; the ATmega328 that is "standard" is just a bigger memory version. The Arduino has very little in the way of additional hardware on the board, but has a large community of people making "shields" and compatible sensors, often with sample software. Your list of devices is very large for a small-pin-count MCU...
Also, "FTDI" is the USB/Serial chip (already has something similar on the arduino.) FDDI is entirely different, obsolete, and not well matched to an AVR :-)
You are missing sensors and motor drivers...

Edit: Oops. You said atTINY88
This is still pin-compatible with the Arduino board, but it's not nearly as SW compatible.

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

jl-dev wrote:
I want to develop my skills in embedded SW

When you say "develop", that suggests that you already have "some" skills - is that right :?:

jl-dev wrote:
I was so excited to find the ATtiny88. It's so cheap, and comes in a nice small 32-QFN

Well, they can be Good Things as selection criteria for a small, low-cost product - but not necessarily so good for a learning platform!

eg, the ATtiny88 has only 512 bytes (yes, bytes) of RAM - so you're not going to get very far with anything involving graphics, filesystems (FAT), etc...

http://www.atmel.com/devices/att...

You may find that you end up spending more time working around the limitations than actually learning about embedded SW as such.

Of course, being able to write finely-crafted, highly-optimised code to fit into very resource-constrained environments is a useful skill - but it's probably not a great starting point for a beginner.

In fact, when it comes to learning 'C' programming, many (most?) would suggest that you don't start on a microcontroller at all; rather, on a PC - which is a much "easier" environment.
You then take that general learning, and learn how to apply it in the special case of embedded microcontrollers - with all their quirks & constraints.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try searching Ebay. Enter "Atmel" in the search bar. There are many devices out there.

Not sure why you want the Tiny88 when there are many Arduino packages out there. Radio Shack sells a $149.00usd kit that has most of what you need.

Welcome to AVRFreaks by the way! :)

Just remember:
"Silly rabbit, PICS are for kids" ;)

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

jl-dev wrote:

- FDDI (sic?) chip (learn USB comm)

As already, I guess you mean "FTDI":

eg, http://www.ftdichip.com/Products...

But the whole point of these FTDI chips is to let you use USB without being concerned about how it all works!

FTDI wrote:
Entire USB protocol handled on the chip. No USB specific firmware programming required

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the Forum.

For learning, I would start with an Arduino type platform, (note that I don't own any, myself!). You use if for the hardware, not for its language.

Alternatively, you can get a "development" board, or continue with your breadboard, (my favorite!).

I would start with a Mega168, Not the Tiny. The Tiny has far too little memory or I/O lines for tinkering and experimenting.

JC

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

Quote:

The Tiny has far too little memory or I/O lines for tinkering and experimenting.

That family also doesn't have a USART, and IME the wimpy pin drive is annoying.

As suggested, start with Mega48 or Mega164 families. Starting with QFN right away? But your wish list has a lit of stuff. (There are a couple recent threads about "a lot of stuff" dev boards.)
https://www.avrfreaks.net/index.p...
https://www.avrfreaks.net/index.p...

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

You get a lot of bang for the buck just buying an arduino these days. There's even a display of them at Radio Shack!

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Thank you for your thoughtful comments!

Yes, FTDI.

Have lab equipment, sans logic/protocol analyzers. Was thinking along the lines of saleae/totalphase. I'll check out the gabotronics ...

The ATTiny88 is so cheap, my focus is on what I CAN do with it, since I can practically sprinkle it around in various designs for almost free. But, good point about limited code space for learning more stuff. I'll toss an ATmega on the board as well ...

Thanks!

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

jl-dev wrote:
my focus is on what I CAN do with it

Fair enough, but that isn't what you said in your opening post; where you focus was, "to develop my skills in embedded SW" - which is a rather different thing.

Quote:
good point about limited code space

Actually, 8K code space is plenty for playing around with simple stuff like blinking LEDs & reading switches - it's the RAM size that's going to be the killer :!:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, messing prices (which can evolve very quickly in some way : TMS430 got 3 times more expensive within one year; atmel does not have such an aggressive policy) and knowledge (which might last longer, if one is in good health) is a bad idea.
Links for books and tutorials can be found in this very forum sticky threads, and in avrs freaks tutorial. I suppose there are enough to choose -one cannot guess tastes and existing knowledge-...
For development boards, I noticed someone made a dual processor development board :
http://www.embeddedrelated.com/s... (and the followings) uses a stm32 arm and an old avr but one can see differences in the way tey are prorammed (and, if one of the processors gets expensive/outfashioned, maybe the other remains...)

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

I suggest using the AT Tiny1634 instead of the Tiny88. It has two hardware USARTS and 16K flash, is about the same price, and comes in a 20 SOIC package.

I too suggest using the Arduino (I recommend the ProMicro variant) as a base. You get a reliable hardware platform board that connects the AVR to the PC for development for only about about $5 on eBay. Also search eBay for Arduino sensor and peripheral IC boards like RealTime Clocks, Bluetooth, Ethernet, and TFT graphic display screens. Or, jumper off to a general 0.1" perforated matrix-of-holes blank development board.

The Nokia 5110 is an excellent alternative for a 7-seg LED or 16x2 character LCD screen as it only costs about $3-$5. It displays 14 characters by 6 rows.

Almost all Arduino project boards have downloadable debugged library code files ready for use and study.

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

jl-dev wrote:

Unfortunately, I can't seem to find a demo board with lots of peripheral goodies. I've already done some simple programming (blinking LEDs, etc) of the ATtiny88 on one of those solderless breadboards, but I hate working with those. So, my first question is, am I wrong? Any good ATtiny88 demo boards?

Get the DIP version first to play with, or the QFP and then break it out to a dip.
http://nerdralph.blogspot.ca/201...

Get a cheap USB-ttl adapter (the pl2303hx ones sell for around $1), and a USBasp for programming.

Since the t88 does not have a serial UART, check out my bit-bang UART in under 30 instructions.
https://code.google.com/p/nerdra...

If you want a bootloader, I wrote on that only takes up 64 bytes:
https://code.google.com/p/picoboot/

I have no special talents.  I am only passionately curious. - Albert Einstein

 

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

Simonetta wrote:
I suggest using the AT Tiny1634 instead of the Tiny88. It has two hardware USARTS and 16K flash, is about the same price, and comes in a 20 SOIC package.

The t88-au sells for 75c at Newark qty 10. Attiny1634 is $1.70 for qty 10.

I have no special talents.  I am only passionately curious. - Albert Einstein

 

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

Unless one is buying thousands why does it matter if a part costs $1 or $5 or $10? Develop in something with plenty of resource then scale down to the cheapest part with all the peripherals and memory you actually used for production.

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

Well, is price that relevant?

I would divide price by the time one gets satisfied with the equipment (a book : it might take the whole life, say 100, 200 years ; an arduino : one can eveolve from avr to arm-s -and shields can be used on stm-s nuclei, as they are pin compatible-) ; a ressouce limited mcu might be too difficult to program for such sexy applications as graphical displays....

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

ralphd wrote:
jl-dev wrote:

Since the t88 does not have a serial UART, check out my bit-bang UART in under 30 instructions.
https://code.google.com/p/nerdra...

If you want a bootloader, I wrote on that only takes up 64 bytes:
https://code.google.com/p/picoboot/


Awesome! Thanks!

ralphd wrote:
jl-dev wrote:

I suggest using the AT Tiny1634 instead of the Tiny88. It has two hardware USARTS and 16K flash, is about the same price, and comes in a 20 SOIC package.

The t88-au sells for 75c at Newark qty 10. Attiny1634 is $1.70 for qty 10.


I fell in love with the ATTiny88, not just for it's price, but IO count. We've got it in production now as not only the board Supervisor MCU, but also (with driver transistors) replacing a $2.50 7-segment LED (x2) display driver, all with a single ATTiny88. Of course, I didn't do the programming on this ...

In addition to the ATiny88, I've also put an ATmega on the 'education' board, for a platform for more involved projects ...