Archive for 11/08/2007

Piccies!!

Here you can see my wee set-up. the LED sits there and changes its brightness about once a second (software settable up to about 30 secs) the board with the 9V bat is the RNG using built from 3x 2n2222, 3 resistors and a .1uF cap.
RN to PWM

First software written.

So after a week away and doing far less coding than I anticipated, I have finished the first programme and prototyped the hardware (well most of it). I wrote the code in MPLAB and used MPSIM to simulate it then used the PICkit2 to do the real world testing. It takes a hardware RNG intput, a PIC16F690 (a bit of over kill but it came with the kit and gives plenty of room for improvements and add ons) uses the rendom number with accumulator, ignores the overflow and then shifts 2 places left to give a nice random looking string of numbers since my RNG hasn’t got the right amplification at the moment to give a full scale for the ADC. This is then used to control a PWM loop (until I can work out how to use the PWM port). A couple of other loops hold the output at a level for a set time and then it repeats. the next stage is to run a motor off this output with a single transistor follower, work out how to set up the on board PWM port and do a quick amplifier for the RNG to give a better output.

Since no one has commented on this blog there is probably no one reading it. Therefore if anyone is acctually reading it and interested in the code, let me know and I will post it.

|