- British Engineering Systems - http://britishengineeringsystems.com -
First software written.
Posted By peter On 11/08/2007 @ 01:08 pm In intelligent vibrator | No Comments
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.
Article printed from British Engineering Systems: http://britishengineeringsystems.com
URL to article: http://britishengineeringsystems.com/2007/08/11/first-software-written/
Click here to print.