12F675 Code Help


Results 1 to 6 of 6

Threaded View

  1. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    The PICkit1 has 8 LEDs all being controlled by GPIO.1, 2, 4 and 5.

    If you want to blink a single LED, this will work to blink D7.

    @ DEVICE PIC12F675, INTRC_OSC_NOCLKOUT, WDT_OFF, MCLR_OFF

    ANSEL=0
    CMCON=%00000111
    TRISIO=0
    LEDS VAR GPIO

    Loop:
    LEDS = 2
    Pause 200
    LEDS = 1
    PAUSE 200
    goto Loop

    End

    If you look at the PICkit1 schematic, you'll see why & how this works.
    Last edited by Bruce; - 9th August 2004 at 18:37.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. LANC code 12F675
    By MikeDD in forum General
    Replies: 4
    Last Post: - 9th May 2008, 05:44
  5. 12F675 code sample
    By marad73 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 23rd May 2006, 13:53

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