12f675_fuse_about_to_blow!


Results 1 to 40 of 929

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    If you copied the HEX and pasted it into notepad... probably why you had problems.

    Now, the PICkit1 board has the LEDs in a matrix. So the coding is a little different than just HIGH this and LOW that.

    Lesson #1
    The PIC has three states a pin can be in.
    OUTPUT HIGH
    OUTPUT LOW
    INPUT

    Here is the code to light the first three LEDs on the PICkit1 on and off, in sequence.
    The HEX is attached. Save it and re-name it taking the ".txt" off.
    Code:
    '16F676     PICKIT1 TEST
    ' PORTA 1,2 4, AND 5 ARE THE LED PINS
        @  __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF
        ANSEL = %00000000
        CMCON = %00000111
        
        START: 
        'D0 HIGH
        TRISA = %11001111
        PORTA = %00010000
        PAUSE 500
        'D1 HIGH
        TRISA = %11001111
        PORTA = %00100000
        PAUSE 500
        'D2 HIGH
        TRISA = %11101011
        PORTA = %00010000
        PAUSE 500
        GOTO START
    Attached Files Attached Files
    Dave
    Always wear safety glasses while programming.

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