External EEPROM help!

xtech007

Senior Member
Good Day all!
I was trying to revive an old project with an ws2801 led strip (32 leds)and remember that I could only run one sequence only, due to that many leds and picaxe eeprom space.

So, was reading a bit on the forum And some website how eeprom can provide extra space. Did read I2C can be used also buffer writes.
Does anyone have a site or better explanation for dummies like me?

What I like to do is store data on the eeprom (shiftout instructions) that when the picaxe needs it to execute a sequence will call for that data then eeprom sends the data to the picaxe and shifts it out to the ws2801 led strip. So multiple sequence can be used instead of just one on the picaxe.

Duable?
 

nick12ab

Senior Member
So, was reading a bit on the forum And some website how eeprom can provide extra space. Did read I2C can be used also buffer writes.
Does anyone have a site or better explanation for dummies like me?
Read the I2C Tutorial.

What I like to do is store data on the eeprom (shiftout instructions) that when the picaxe needs it to execute a sequence will call for that data then eeprom sends the data to the picaxe and shifts it out to the ws2801 led strip. So multiple sequence can be used instead of just one on the picaxe.
If you want to store actual PICAXE code on the EEPROM, you can use the run command (X2 parts only) to run a PICAXE program from external EEPROM, but it would be less efficient than reading out data from the EEPROM in your own program.
 

xtech007

Senior Member
waiting for external Eeprom.

While waiting for the 24LC256 Eeprom to arrive, wanted to experiment.
Also clearify what I would like to do with it!

Like mentioned, this is to drive a LED strip of 32 ws2801's . Lots of data to be loaded (3 bytes per RGB) 96 bytes per sequence . I would like to store that data on external eeprom so when called upon then that data is sent to picaxe eeprom and shifted out to the ws2801.

Exp;
If pin1=1 gosub read_ext_eprom
Else goto main

read_ext_eprom:
Read 96 bytes as shift out Instructions place it somewher on picaxe eeprom if possible then send out the data to the ws2801as serout.
 

xtech007

Senior Member
not a whole new program.

Using slots from my understanding will limit only to the amount of space available for the picaxe. This data will be shiftouts instructions not whole new program. Also realizing I migh need more the 256 kbytes is more like Megabytes and Gigs I will be needing.
 

AllyCat

Senior Member
Hi,

I would like to store that data on external eeprom so when called upon then that data is sent to picaxe eeprom and shifted out to the ws2801.
How often? Don't forget that EEPROMs eventually "wear out" after repeated writes. IMHO it might be better to use the internal RAM. All M2s (except 08M2) have 512 bytes of RAM, accessed by @bptr{inc} and/or peek/poke.

Cheers, Alan.
 

inglewoodpete

Senior Member
The 24LC256 is an i2c device, so you will use i2c instructions. The i2c protocol makes interfacing to the PICAXE very simple.

I have not made a study of the WS2801 chip, which uses the SPI protocol (ShiftOut command in the PICAXE).

I suspect the problem that you face is that PICAXE chips use the same pin for the i2c clock and the spi clock. Your only option would be to implement the ShiftOut function in a custom-written software routine, which is many times slower than the ShiftOut command using the internal hardware UART. Perhaps the 95256 SPI EEPROM would be a better choice, allowing the LED drivers and EEPROM to be on the same serial bus.
 

nick12ab

Senior Member
I suspect the problem that you face is that PICAXE chips use the same pin for the i2c clock and the spi clock. Your only option would be to implement the ShiftOut function in a custom-written software routine, which is many times slower than the ShiftOut command using the internal hardware UART. Perhaps the 95256 SPI EEPROM would be a better choice, allowing the LED drivers and EEPROM to be on the same serial bus.
This applies to hspiout, but shiftout (X1 and X2 parts only) can be used on any output pins.
 

BeanieBots

Moderator
I've never tried WS2801 but everything I've read indicates that the biggest hurdle is speed.

The problem with any form of software shiftout is speed.
The problem with writing to WS2801 is speed.
If it is possible to read pre-loaded data from the EEPROM and then send it to the WS2801 quickly enough, then it is a simple problem to solve.

Is this what is required? I'm not sure what all this writing to EEPROM is about.
Where is the data coming from?
 

xtech007

Senior Member
pre-loaded data is the right direction!

Mr. Beaniebot you are right!
The pre-loaded data will be on the eeprom then send out to the picaxe and then to the ws2801!

At the moment I only have Mobil Internet, home Internet crashed..

Will add sample program soon!
 
Top