Hein (fub) wrote,

  • Mood:

Further bitneuken

Remember this post? Probably not -- but I do!
Now that I have an EEPROM programmer and the means to hook one up to a PIC, I want to make use of that to store the color cycle information for a 3 RGB-LED installation. Without reprogramming the PIC itself, the color cycles could be changed by simply changing/reprogramming the EEPROM.

I could use all those 64 kBit for a single program, but that seems like a bit of a waste. Why not allow for several programs to be stored in that memory, and have a button to skip to the next program?
However, that means I will have to create a 'mini file system' on the EEPROM, to keep track of which pogram starts where, and where the current cycle is. I think I'll do it like this:

- The first byte in the EEPROM holds the number of programs on the chip.
  This means that there is a maximum of 255 programs -- should be enough, I think.
- The following bytes list the starting adress of a program. So the second byte in the EEPROM lists the starting adress of the first program, the third lists the start of the second program, etc.
- As before, an instruction bit of all zeroes means a 'restart' of the current program.

I will need to keep two additional values in memory:
- The number of programs;
- The number of the current program.

Doesn't sound like it'll be too hard. Perhaps I can write a program that allows for 'point-and-click' color-cycle programming, allowing for individual programs to be saved seperately -- this would allow individual users to exchange programs. The operator can then combine those programs and put them on an EEPROM chip.
Tags: eeprom, led

  • Final RPG-a-Day: Thank

    The last prompt for RPG-a-Day this year is ‘Thank’. If you have read every entry of this year’s RPG-a-Day, then I certainly…

  • Next-to-last RPG-a-Day: Mention

    Today’s prompt is ‘Mention’. I guess this is where I mention people I look up to, or websites I frequent? Ok, here’s…

  • RPG-a-Day 29: System

    We’re in the home stretch for this year’s RPG-a-Day! Today’s prompt is ‘System’. Paulo, who has been doing…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded