Bill's Computer Circus
Don't get caught with your system down.
NOTICE: This web site may not render correctly in older browers like Internet Explorer 5.2 for the Mac. May the gods help you if you are using Internet Explorer on any machine! Otherwise, if this site does not look right on your browser, please let me know what browser you are using (and what version and on what computer). Thanks!
"Visual Basic makes the easy things easier. Delphi makes the hard things easy."
-- unknown
Tuesday, July 13, 2004
 
Wowie, wowie, wowie!

What the hell is wowie?

Just thought I would add a bit to my earlier statistics. The current instruction count is 1951 instructions for PIC1, and 1705 instructions for PIC2, for a total of 3656 instructions. I added a few today (trying to bring my development rate up to one instruction per hour - haha). And things are moving right along. I have only one critical item remaining on my list, then it's play time! But this last item is a bugger to track down, because it is a reset issue that has a lot of strings attached.

Anyway, I thought I would provide a count of RAM bytes that I use for accomplishing all that this device does. It's really pretty amazing (to me, anyway).

PIC1 uses 133 bytes of RAM and 60 bytes of EEPROM data (for identification purposes).
PIC2 uses 125 bytes of RAM and 84 bytes of EEPROM (that get copied into a portion of the 125 bytes of RAM on power-up). So, in total, RC4 uses 258 bytes of RAM and 144 bytes of EEPROM to do what it does. That's just amazing to me. Hey - it wasn't easy! It took me two years to figure out how to cram all that in there.

Hmm. Where would we be if Microsoft worked that way?

I think the days of writing efficient code to fit into tight spaces, are gone. I think that's why I like doing embedded stuff (well, I say I like it, but it's really a love-hate relationship...or an addiction) - I can hone my skills and my craft in the art of cramming code. I just don't want to let that art die, I suppose. It's not something people seem to learn these days. People these days seem to solve programming problems by throwing more memory at it. I like to solve programming problems by ripping out code that's not necessary. After two years, you can bet that every BIT in this thing is absolutely necessary. In fact, I had a long-standing issue (that is still open) about deciding what function to assign to one last bit that was available in a mode selection byte, as there were four competing potential features that wanted it. It turns out I had to use that bit to solve another issue that I just resolved last week. So there are four potential features that got locked out due to the lack of available bits!

But if I start using the PIC16F87 microcontroller, I will suddenly have a lot more room to play with. My code will port over to it directly as the chip is a direct upgrade from the PIC16F628 that I am using now. The 'F87 has twice the code space (4K!) and twice the EEPROM space (256 bytes!). But then again, I don't expect to be expanding this project, anyway. I've got other things I want to do with my life.

posted by Bill  # 6:24 PM