avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Reading and writing a calibration byte in an ATTiny12


From: Joerg Wunsch
Subject: Re: [avrdude-dev] Reading and writing a calibration byte in an ATTiny12
Date: Sat, 8 Jul 2006 08:09:05 +0200
User-agent: Mutt/1.5.11

As James A.R. Koehler wrote:

>    I'd prefer to do this using avrdude in a Linux machine.  I think
> I should be able to do this in the 'terminal' mode of avrdude but,
> because I'd like to program a number of these processors in one
> session, I'd rather do it with a script file.  Is this possible?

Terminal mode is meant for human interaction.

What you need is to capture the output of avrdude when reading the
calibration value, and then use it to subsequently produce a new intel
hex file from it.

To capture it, you can use:

cal=$(avrdude -p ... -c ... -P . -qq -U cal:r:-:r | hexdump -e '/1 "%02x\n"')

This leaves a two-char hex value in the variable "cal".  Then you need
to produce a new ihex (or S-record) file, as that is the only possible
input that would allow you to specify an offset for where to program
it to.  The ihex format should be reasonably specified, so you could
write a small python or perl script for it.  I'd assume you might
already find modules for that job somewhere in the Internet.

>    Also, I have a document describing avrdude 4.2 written by Brian
> Dean in September, 2003.  Is there a more recent version of this
> very helpful document for the more recent versions of avrdude?

That's probably the document converted from the texinfo manual.  It
should accompany any reasonable binary distribution of avrdude.  If
not, ask the person who's shipping your binary, or compile your own
avrdude.

OTOH, the texinfo manual contains only little more information than
the avrdude(1) man page.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]