EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / SDCC Read/Write EEPROM At89c51ed2

SDCC Read/Write EEPROM At89c51ed2

|

Microcontroller › 8051 › SDCC Read/Write EEPROM At89c51ed2

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 2 months ago by Jason Jordon.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 24, 2013 at 4:05 pm #2202
    Rafael Lopes
    Participant

    Hi! 
    I am using the Mic At89c51ed2 and programing with SDCC. This device have 2k of a internal eeprom. But I have Problems ta acess this eeprom… 
    I wrote the code like this: 
    unsigned char __xdata __at(0x00) texto; //creating a variable texto 

    //to read th eprom I wrote a code like this 
    EA = 0; //turn off the interrupts
    EEE = 1; //Active the EEE bit of ECON register, to read texto in the eeprom 
    data = texto; //read the EEPROM in the position 01 
    EEE =0; //turn off the EEE bit of ECON register 
    EA = 1; //turn ON the interrupts 

    //to write th eprom I wrote a code like this
    EA = 0; //turn off the interrupts
    EEE = 1; //Active the EEE bit of ECON register, to read texto in the eeprom 
    texto = data; //write the EEPROM in the position 01 
    EEE =0; //turn off the EEE bit of ECON register 
    EA = 1; //turn ON the interrupts 

    But this dont work, the data don’t remains… In other words, the data is not write/read in the eeprom… 
    In the begining of the code, I am using “xdata” to access the external memory and “Set” the “EEE” to write in the eeprom. You know a diferente sentence of Storage Class Extensions to create variables in the internal eeprom? Someone can Help me? 

    Thanks, 

    Rafael Lopes

    April 12, 2013 at 12:26 pm #9470
    Jason Jordon
    Participant

    you haven’t interfaced any LCD to the circuit??

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Curved lines in PCB design June 15, 2025
  • using a RTC in SF basic June 15, 2025
  • PIC KIT 3 not able to program dsPIC June 15, 2025
  • Siemens large industrial PLC parts June 15, 2025
  • Parts required for a personal project June 15, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise