Coder Social home page Coder Social logo

Comments (5)

joefutrelle avatar joefutrelle commented on September 27, 2024

Working on the external eeprom. Writes are currently failing, including the address write required to read.

Here's someone else who did it; I'm unclear that the pullups are necessary as the proto seems to work fine with the chronodot without pullups. Lots of stuff about clocks here too, which I'm also hoping is not necessary to get the eeprom to work.

http://0xfebytes.blogspot.com/2013/03/use-attiny85-with-i2c-eeprom.html

from tinycube.

joefutrelle avatar joefutrelle commented on September 27, 2024

I think that blogger was misreading the ATtinyX5 datasheet which states

Port B is a 6-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port B output buffers
have symmetrical drive characteristics with both high sink and source capability. As inputs, Port B pins that are
externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri stated when a
reset condition becomes active, even if the clock is not running.

from tinycube.

joefutrelle avatar joefutrelle commented on September 27, 2024

timing was the issue--eeprom writes take time. for the moment I inserted followed advice given in the blog post below and inserted a 5ms delay after the write operation and that seems to fix the write-once read-once case. May need to tweak timing for sequential writes/reads, block operations, etc.

From http://www.hobbytronics.co.uk/arduino-external-eeprom

To finish up this function you’ll notice I’ve included a delay of 5 milliseconds. This allows the chip time to complete the write operation, without this if you try to do sequential writes weird things might happen.

from tinycube.

joefutrelle avatar joefutrelle commented on September 27, 2024

Need to add page writes because this is the most efficient way to use the EEPROM.

Using the packing functions from the chronodot module, a timestamp takes 5 bytes, which in an 8-byte record leaves three bytes for sensor readings (so it will work for 10-bit temperatures from chronodot's internal temperature sensor, and also for a 24-bit RGB color value). So the instrument can accumulate a page of records in RAM and then write the page.

On this 24LC256 pages are 64 bytes so that's 8 readings per page, not a huge average-case data loss if the instrument fails. With a 32KB address space, the chip has enough space for 4096 readings. Storing absolute timestamps means the instrument could simply wrap around after that many readings, without rendering the data on it incoherent.

from tinycube.

joefutrelle avatar joefutrelle commented on September 27, 2024

closing this to split into multiple issues

from tinycube.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.