avrdude-dev
[Top][All Lists]
Advanced

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

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


From: James A.R. Koehler
Subject: [avrdude-dev] Reading and writing a calibration byte in an ATTiny12
Date: Fri, 07 Jul 2006 09:23:47 -0700
User-agent: Thunderbird 1.5 (X11/20051201)

Hi,

I am programming an ATTiny12 and I have some code which sets the calibration byte into a flash location so that my program can then put it in the OSCAL register. In my program, the code looks like:

        ldi     r31, CALIBRATION_ADDRESS >> 8                     /; 
calibration byte to be written to 0x3ff/
        ldi     r30, CALIBRATION_ADDRESS & 0xff
        lpm

        out     OSCCAL, r0

With Windows and Studio 4, it is then easy to read the calibration byte and to then write it to the CALIBRATION_ADDRESS which is location 0x3ff.

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?

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?

   Jim





reply via email to

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