Well,

After having a first look at your code, the isn't "a piece of cake" to me. It's more a piece of cheese filled with lots of holes...

On the other hand, the hardware looks rather simple.

If y can find one of these chips here, I'll go for a try.

Thanks a lot.