Comments (5)
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.
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.
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.
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.
closing this to split into multiple issues
from tinycube.
Related Issues (16)
- Move alpha4 font to PROGMEM HOT 1
- Add support for dash and decimal point to numeric display in alpha4
- make tinycube sleepy HOT 3
- need EEPROM -> UART utility HOT 1
- generalize EEPROM code to work across internal / external HOT 1
- can ATtiny85 measure battery charge somehow? HOT 1
- factor wdt sleep code into main app
- find and install battery in no-brand DS3231 board HOT 1
- test no-brand DS3231 HOT 1
- log to eeprom HOT 4
- force temperature read
- eeprom_write_block
- buffer arguments should be void * or char *, whichever avr-gcc is less whiney about
- test without a4 debug display HOT 1
- reset on sleep HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinycube.