[Top][All Lists]

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

[avr-gcc-list] eeprom usage

From: Jamie Morken
Subject: [avr-gcc-list] eeprom usage
Date: Wed, 30 Oct 2002 15:59:10 -0800


I read the datasheet for the AVR I am using (atmega323)
and it gave an eeprom write time of 3.8ms (MAX)
I tested the below code out and it works fine.  
Is a delay built into the read/write functions or am I just pushing the 
limits of the eeprom?  Is this safe?  I already wrote out the code to 
read/write 16 byte messages to eeprom one byte every 5ms
(ironically that code doesn't work but the below does)

Jamie Morken

    eeprom_wb(0, 123);
    eeprom_wb(1, 124);
    eeprom_wb(2, 125);
    eeprom_wb(3, 126);
    eeprom_wb(4, 127);
    eeprom_wb(5, 128);
    eeprom_wb(6, 129);
    eeprom_wb(7, 130);

    printf("eeprom0 = %i\r", eeprom_rb(0));
    printf("eeprom1 = %i\r", eeprom_rb(1));
    printf("eeprom2 = %i\r", eeprom_rb(2));
    printf("eeprom3 = %i\r", eeprom_rb(3));
    printf("eeprom4 = %i\r", eeprom_rb(4));
    printf("eeprom5 = %i\r", eeprom_rb(5));
    printf("eeprom6 = %i\r", eeprom_rb(6));
    printf("eeprom7 = %i\r", eeprom_rb(7));

avr-gcc-list at http://avr1.org

reply via email to

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