1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

eeprom and atmega16

Discussion in 'AVR' started by sminnn, Aug 18, 2014.

  1. sminnn

    sminnn New Member

    Joined:
    Aug 18, 2014
    Messages:
    6
    Likes:
    0
    Hi,

    I need to use the internal eeprom of atmega16 in my project. I do not know how I can write the code with CodeVision. I'd be glad if you could help.

    Thanks
     
  2. wkrug

    wkrug Active Member

    Joined:
    May 30, 2010
    Messages:
    271
    Likes:
    29
    Location:
    Germany
    You should define a variable in the EEPROM Area.
    Than write in this and all works fine.
    unsigned char eeprom ee_byte; //One single Byte
    unsigned char eeprom ee_area[24]; //An Area with 24 spaces
    ...
    ee_byte=23; //Write 23 dec into the EEPROM
    ...
     
    Last edited: Aug 19, 2014
  3. sminnn

    sminnn New Member

    Joined:
    Aug 18, 2014
    Messages:
    6
    Likes:
    0
    Yes, thanks. It works :):)
     

Share This Page