Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Programming 24LC256 I2C EEPROM

interfacing eeprom 24LC256

In many microcontroller projects you need some non-volatile memory – which preserves data even when power is off. Most popular type of such memory is Flash or EEPROM. Many MCUs like AVR or PIC already have some EEPROM inside chip that may suite your needs. But in many cases it is not included and you may need to connect it externally. EEPROMs with I2C interface is very common in such situation as they don’t need lots of I/Os (only two wires). If you decided to add an EEPROM chip in to your project check out the useful guide on how it works written by Jesus Echavarria. As example he took 24LC256 EEPROM which capacity is 32K x 8 bytes. Chip works in pretty wide voltage range – between 1.7V and… Continue reading

Accessing AVR EEPROM memory in AVRGCC

AVR microcontrollers have some amount of EEPROM memory on-chip. For instance Atmega328 has 1K of byte addressable EEPROM. EEPROM memory can be used to store and read variables during program execution and is nonvolatile. It means that it retains values when power supply is off. EEPROM memory comes handy when we need to store calibration values, remember program state before powering off (or power failure) or simply store constants in EEPROM memory when you are short of program memory space especially when using smaller AVRs. Think of simple security system – EEPROM is ideal place to store lock combinations and code sequences and passwords. AVR Datasheets claim that EEPROM can withhold at least 100000 write/erase cycles. Continue reading