Sanity check / newbie questions

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

Hi

Complete newbie to the PIC/AVR world - have some back ground in basic electronics and C. I've seen some 'kits' but would like to work through design, build process and learn along the way.

Basic requirements - RS232 Serial data stream in, store as one long contiguous file on a SD/MMC card (1GB)

After the reading I've completed to date - a AVR chip seems like a good solution. I've seen some example code MMCSerial / Win-AVR / AVRStudio and think it should be technically feasible. Basically listen on Rx, buffer 512 bytes, write to card, repeat.

Questions:
1) Getting the binary compiled code onto the chip. There seems to be a huge range of products that are 'programmers' - if I only want to program AVR chips - can I just use a simple voltage regulator / transistor driver (like PonyProg and the SI-Prog) I'm even happy to select a particular AVR chip if it helps reduce / eliminate the need for a programmer. Am I missing the point / being dumb?

2) I'm a software guy, so using 'extra' hardware capacity is valid design option :-). If I want 19200 receive, 1GB storage - any suggested Flash/EEPROM/RAM levels - I have no 'feel' for what a basic bit of compiled C code uses / needs. I'm guessing RAM needs to be 2x 512 + 'counter memory' to enable flip-flop buffers. A Mega8 (8kB 512B 1024B) might be enough, but if in doubt I'd probably start with a Mega32 (32kB 1024B 2048B) @ 16Mhz - does this sound 'sensible'.

3) Do I need to think about going up to 32 bit versions for the larger SD/MMCs storage?

Thanks for any pointers in advance,

Carl

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

Quote:
Getting the binary compiled code onto the chip. There seems to be a huge range of products that are 'programmers' - if I only want to program AVR chips - can I just use a simple voltage regulator / transistor driver (like PonyProg and the SI-Prog)

Ponyprog would do just fine for you, or you could get an AVR Dragon ($49) or an AVRISP Mk2 ($36). One of the niceties of AVRs is the low requirements to get started.

Quote:
If I want 19200 receive, 1GB storage - any suggested Flash/EEPROM/RAM levels

For this project the amount of flash probably won't be a big factor, and you probably won't need EEPROM at all. If you want two buffers of 512, then you would need more than 1k of memory since you will need room for stack, global variables, and such. This limits you to a mega32 or better. A newer chip such as the mega324 would get you somewhat faster operation (up to 20MHz), plus it is actually cheaper than the mega32.

For running a UART at 19.2k you would want to use a UART friendly crystal (such as 18.432MHz) to keep your baud rate error to a minimum (though at the higher frequencies that wouldn't be much of a problem).

Quote:
Do I need to think about going up to 32 bit versions for the larger SD/MMCs storage?

I don't think so. I don't think that the size of the storage card would have any impact on what AVR you use. As long as you have enough output lines (which any mega would give you), then you should be fine.

Regards,
Steve A.

The Board helps those that help themselves.

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

Hi Steve,

Thanks for you comments & confirmations, I've spent the whole day reading - also found the Wiki link on the front page - doh - thought it was a set of 'adverts'.... The Spark Fun Electronics tutorials are starting to make a little more sense too. They had a note on the Osc for serial work too.

A couple of Mega324PV's and an ATAVRISP2 are now on order and fun starts next week. I'm reading that the Mega32 has dual UARTs which coupled with the extra processing capacity and maybe a FAT filesystem might provide an option for a second data stream - but I'm trying to run before I can walk. :wink:

One step at a time...

Carl
--
ZK-VII - http://www.rvproject.gen.nz

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

Quote:
A couple of Mega324PV's and an ATAVRISP2 are now on order and fun starts next week

Why not start fun right now?
If you download AVRStudio 4 you can write some code and simulate it, exploring how things work.