18F2550 Blinking LED With Pickit 2


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Hello

    Thanks mackrackit, but unfortunately it doesn't work. I made the changes you recommended, but the PIC continues not working

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


    Did you find this post helpful? Yes | No

    Default

    How is the MCLR pin connected?

    If it is not connected to anything then change the 3H line to
    Code:
    __CONFIG    _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    I just tested this on a 4550 (I do not have a 2550) and it works as expected.
    Code:
    DEFINE OSC 8
    @ __CONFIG    _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
    @ __CONFIG    _CONFIG1H, _FOSC_INTOSCIO_EC_1H
    @ __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
    @ __CONFIG    _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H
    @ __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L & 0DFh
    OSCCON = %01110000
    
        TRISD = %00000000
        TRISC = %00000000
        flip:
        HIGH PORTD.7
        PORTD.6 = 1             'Turn on LED
        PORTC.0 = 1
        PAUSE 500               'Delay for .5 seconds
        PORTD.6 = 0             'Turn off LED
        PORTC.0 = 0
        PAUSE 500
        GOTO flip
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Apr 2010
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Mmm nop

    The MCLR pin is connected directly to the first pin of the Pickit 2.

    I tried changing that configuration, but nothing happened.

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


    Did you find this post helpful? Yes | No

    Default

    Might be a stupid question but are you compiling for the correct chip?
    Are you using MCS?
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Apr 2010
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Yes

    Yes, 18F2550 is selected on the combo box.

    I'm using MicroCode Studio 3.0.0.5 and PICBASIC PRO 2.50B. When I compile, it uses the MPLAB assembler and it opens and closes a console window.

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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