My first Blinky!


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1

    Default My first Blinky!





    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

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Thumbs up Way to go!

    Another one ADDICTED.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Congratulations

    Congratulations nomad,
    Now you have an excuse to live without sleep or the company of your significant others.
    Your family and friends will give you strange looks if you tell them you stayed up all night playing with your blinky . . . Glad you shared it !
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Sep 2007
    Location
    Australia
    Posts
    15


    Did you find this post helpful? Yes | No

    Thumbs up

    Well Done!!



    Wilson

  5. #5
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Smile Congrats

    Well, congratulations! Just don't get too hooked, and don't go around submitting your work to magazines for publication, unless you want people to get some crazy thoughts in their head that you have sundry inventions and whatnot. Because before you know it - you'll have the secret service staking you out in your neighbors backyard.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by T.Jackson View Post
    - you'll have the secret service staking you out in your neighbors backyard.
    As long as they share their donuts I'm all for it.
    Dave
    Always wear safety glasses while programming.

  7. #7


    Did you find this post helpful? Yes | No

    Wink Thanks!

    Quote Originally Posted by mackrackit
    Another one ADDICTED
    Yip!

    Quote Originally Posted by Joe S.
    Your family and friends will give you strange looks if you tell them you stayed up all night playing with your blinky . . . Glad you shared it !
    Actually I did spend a few hours trying to get it programmed, my serial port was bad so had to remove my wifes dongle and use her port. :P

    crazy thoughts, wiretaps, yeehaw! count me in!

    *homer voice* MMMMMmmmmmmmmmm Donuts!

    it actually was my first blinky..

    And plagarized is spelled correctly for my planet ( I reject your reality and substitute my own - "mythbusters")

  8. #8
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by nomad View Post


    I'm so proud to have done this I had to share.


    ...

    Hey Nomad, unfortunately, I found a mistake. I know this will make you unhappy as this is the first time you wanted to share your code.

    The mistake:
    "plagarized" is mistyped. It should be as "plagiarized".



    Keep sharing.
    Last edited by sayzer; - 20th September 2007 at 11:14.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. DT-INTs Blinky Light question
    By circuitpro in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th February 2010, 03:29
  3. Blinky not working with TOGGLE
    By AndrewC in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 08:45
  4. Why is my LED not blinking?
    By Gary Goddard in forum General
    Replies: 14
    Last Post: - 1st January 2007, 20:23
  5. An other newby, an other blinky probem
    By Maniac in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd September 2005, 15:16

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts