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
 
I was just thinking about my RC4 device this morning and all the time I have put into it. It is amazing how all this work just boils down to a collection of bits. All these bits have to be arranged just right in order for this thing to do what I want it to do.

The amazing thing is that I have developed firmware for two chips on this board. The first chip handles all the data communication (serial interface to the computer and data exchange between the two chips), and the second chip does all the signal processing (samples incoming signals, generates output signal, plus communicates with the other chip). The first chip accomplishes its job in 1940 instructions. The second chip accomplishes its job in 1699 instructions.

The chips use a 14-bit instruction word. So, for 1940 instructions, that's 27160 bits. For 27160, that's 9.4337037480804523995527931517583e+8175 possible bit combinations. At first glance, you might think 1940 instructions is not very much for two years of work, but you can think of it another way. Out of all the possible bit combinations, it only took me two years to find the right one.

Anyway, it is truly amazing that it all distills down to 1940 instructions (for PIC1) and 1699 instructions (for PIC2). That's 3639 instructions. Let's see what that works out to be. There have been entire months where I have not even worked on this project, but let's just pretend this was a job and I devoted 8 hours a day, 5 days a week on it for two years. At 52 weeks per year, that's 104 weeks, times 5 days, times 8 hours, or 4160 hours. 3639 instructions divided by 4160 hours = 0.8747596 instructions per hour.

This suggests I have developed less than one line of code per hour. Looks like I'm really sleeping on the job!

Now, if I was getting paid $35/hour for doing this, I'd be $145,600 richer!

Damn.

I think I'll go water the plants now.

posted by Bill  # 11:08 AM