![]()
I'm so proud to have done this I had to share.
Code:'**************************************************************** '* Name : buckets of grass clippings * '* Author : Completely plagarized from picbasic.co.uk forums * '* Notice : Copyright(c) Melanie, Mister e, and others * '* : All Rights Reserved * '* Date : 9/19/2007 * '* Version : 666 * '* Notes : Magu special in the works! * '* : * '**************************************************************** ' ' Pic Configuration ' ================= ' (By Melanie) ' ' Here we will set the PIC configuration fuses ' to use the internal PIC oscillator and disable the MCLR ' pin. ' '@ __CONFIG _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _LVP_OFF & _WDT_OFF & _PWRTE_ON & _BODEN_ON ' ' This assume you're using MPASM to compile your code ' For detailed information about Configuration fuse setting, ' have a look to "Presetting Configuration Fuses (PIC Defines)" thread ' in the forum FAQ section. ' http://www.picbasic.co.uk/forum/showthread.php?t=543 ' ' Nomad - went there and stole the correct shtuff for psasm ' @ DEVICE pic16F628A, INTRC_OSC_NOCLKOUT ' System Clock Options @ DEVICE pic16F628A, WDT_ON ' Watchdog Timer @ DEVICE pic16F628A, PWRT_ON ' Power-On Timer @ DEVICE pic16F628A, MCLR_OFF ' Master Clear Options (Internal) @ DEVICE pic16F628A, BOD_ON ' Brown-Out Detect @ DEVICE pic16F628A, LVP_OFF ' Low-Voltage Programming @ DEVICE pic16F628A, CPD_OFF ' Data Memory Code Protect ' Set to CPD_OFF for Development Copy ' Set to CPD_ON for Release Copy @ DEVICE pic16F628A, PROTECT_OFF ' Program Code Protection ' Set to PROTECT_OFF for Development Copy ' Set to PROTECT_ON for Release Copy ' ' Hardware assignment ' =================== GCB_1 VAR PORTB.0 GCB_2 VAR PORTB.1 GCB_3 VAR PORTB.2 ' ' Hardware configuration ' ====================== TRISB = 0 ' Configure all PORTB i/o to output ' ' Software/Hardware initialisation ' ================================ PORTB = 0 ' Nomad - bit confused by that bit there '------------------------------< Main program >----------------------------------- ' by Mister e Start: ' ' Here will do the 'buckets of grass clippings' light show ' using a simple method... not the best ' GCB_1 = 1 PAUSE 500 GCB_2 = 1 PAUSE 500 GCB_3 = 1 PAUSE 500 GCB_1 = 0 PAUSE 500 GCB_2 = 0 PAUSE 500 GCB_3 = 0 PAUSE 500 GOTO Start ' '--------------------------------------------------------------------------------- ' Mustard used on brats, find ssubstitute. ' Substituted kidney stones for rocks here but had to remove ' Sorry I had to go! ' Insert Stolen code from T. Jackson and Darrel here




Bookmarks