Hi everyone,

This winter I want to dabble in PIC programming to make a small hobby project that will randomly turn on and off 16 LEDs.

What I want to do is use a 12F629 to drive a 74HCT154 4->16 encoder/decoder that will run the LEDs.

As I understand it, I will want to have 5 outputs from the 12F that I can make either high or low. This doesn't seem to be a problem from what I read of the 12F.

I have a couple issues since this is all new to me. First, I would like to use the PicBasic compiler due to costs. Since I won't be churning out project after project I really don't want to get into the higher cost of the pro version. Reading the command list of the PicBasic I think it should do what I want.

The main stumbling block is the random factor.

Initially my idea was to generate four random numbers which would translate to 0 or 1 to drive the high/low outputs. This seems simple enough, but since the random numbers are not truely random I'd like to add something else to that end.

I did more reading that in order to have a more true random number an outside event would need to happen to seed the random number generator. This could possible be from something like a 555 timer. Did I understand this correclty?

I assume the timer will be producing pulses which the 12F is going to use to create the random number. This is where I get stumped. There should be one more I/O port on the 12F that I could use after setting aside 5 for the multiplexer, but how do I use that input for the random number?

I want to do this with as few external components as possible and even the 555 would need a couple resistors and capacitors (I don't want to use any variable resistors) In actual operation the pseudo-random generator probably would work fine. It's just my desire to make it better that is driving this idea.

Further, regarding the pseudo generator. I don't fully understand what it is generating. Is it 0 or 1 or 1 to x with x being what upper limit?

I haven't purchased anything software yet until I am sure I have a reasonable chance of making this work. It is completely new to me so please gear any answers for the uneducated!

I've decide the actual source code for my idea should be fairly simple if I remember enough of BASIC from back in school many years ago.

Thanks in advance.

Bart