AVRs in production environment..

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

I have just shifted a couple of our products from PIC to AVR ( Mega8515 and Mega88 ) . For our first production lot of 1000 Nos. , the programming of fuse bits and lock bits was very tedious , to say the least . In PIC , there is a concept of :
a. defining the programming of configuration bits in the programme file itself.
b. The IDE remembers 'things' for every product as a workspace.
.....which make production runs easy..

My question is :
Is there any easy way ( or commercially available programmers ) for production activity , which can make life simple ?
All inputs will be greatly appreciated :D

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

For production, you can use the DOS interface to the programmer. There, you can specify everything.

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

batch files with all settings as parameters to avrprog et al

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

If you program via a JTAG port (useful if you want to program ATmegas and other devices like CPLDs all on one daisy chain) then Atmel provides a utility that can create an SVF file that contains the JTAG chain topology, Flash, EEPROM, and fuse/lock settings all in one file. You would need a JTAG dongle or appropriate porgramming software that knows how to interpret SVF files.

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

I use short awk program, which doing all that I need. I adapt this program for each project and save it in project folder.

Awk is very simple language, and everybody can learn and use it after short time.

Sample program for programming one of my devices is in attachment.

Andrzej

I don't understend it. When I'm testing zip file that I sending, it's OK. But file that I download back is broken. Thus previous zip file has been replaced by plain text file.

Note: This is file with Unix end of line convention.
For running by awk under DOS/Windows EOL must be changed to CR/LF.

Andrzej

Attachment(s): 

Last Edited: Mon. Sep 18, 2006 - 10:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for your suggestions .
@ mneary : can you please provide a sample DOS file , as an example ? I guess it will work with AVR Studio..?

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

If you want a robust production programmer then have a look at the equinox FS2003. As with all things Equinox not the cheapest solution but in the production world cheapest is not always best.

Keep it simple it will not bite as hard

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

@ awit

Can't open your file - is it really a .zip file? Doesn't seem to be plain text either

Am interested to see how it works...

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

Sorry, prg.awk.zip in my previous post has been broken, it's replaced in that post by correct version now.

Andrzej

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

trinity_parag wrote:
Thanks for your suggestions .
@ mneary : can you please provide a sample DOS file , as an example ? I guess it will work with AVR Studio..?

But that's going to depend on what programmer you use and what fuse options you want set. The command line versions of the various programming options in Studio are found in:

\Program Files\Atmel\AVR Tools\STK500\stk500.exe
\Program Files\Atmel\AVR Tools\JTAGICEmkII\jtagiceii.exe
\Program Files\Atmel\AVR Tools\JTAGICE\jtagice.exe
\Program Files\Atmel\AVR Tools\AVRDragon\AVRDragon.exe

Run any of those at a command prompt with -? to get a list of parameters/commands they accept. Then just invoke the program a couple of times from a batch file, once to program the fuses and once to program the .hex file

Cliff

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

clawson wrote:
Run any of those at a command prompt with -? to get a list of parameters/commands they accept. Then just invoke the program a couple of times from a batch file, once to program the fuses and once to program the .hex file

It is possible to set the fuses, the Flash, the EEPROM, and the lock bits all with a single invocation of the command line tools.

If you do it this way, then the programing software will make sure that all the programming options take place in a safe order.

eg: The chip is erased, then the flash/eeprom are programmed, then the fuses are changed (but Reset is not immediately released, so the existing fuse combination is temporarily latched), and finally the lock bits are programmed.