18F2550 and Blink Led


Closed Thread
Results 1 to 40 of 50

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    The below works using the internal OSC for a test.
    ' PIC18F2550
    DEFINE OSC 8
    ASM
    __CONFIG _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
    __CONFIG _CONFIG1H, _FOSC_INTOSCIO_EC_1H
    __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
    __CONFIG _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H
    __CONFIG _CONFIG4L, _LVP_OFF_4L
    ENDASM

    ADCON1 = %00001111
    CMCON = 7
    OSCCON = %01110000
    TRISB = %00000000
    START

    LATB.2 = 1
    PAUSE 250
    LATB.2 = 0
    PAUSE 250
    GOTO START
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    May 2012
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Hello,

    Compiling it, gives me some Warnings "Found Directive in column 1.(_CONFIG), but it compile. At the oshon simulator, the same result, the pins of the microcontroller doesn't change at all...

    Thanks,
    Nuno

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


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    I do not use simulators, I can not help you there.

    For the warning, SPACE the
    __CONFIG
    over by one.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    May 2012
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Yes, the warning disapears... Thanks

    I'll try to program the chip and test it.

    Thanks,
    Nuno

  5. #5
    Join Date
    May 2012
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Hello,

    I've tested with the Pic, but without luck, nothing happens...

    Are this configurations correct?

    Thanks,
    Nuno

    Name:  Compile_2.JPG
Views: 4184
Size:  22.2 KBName:  Compile_1.JPG
Views: 3559
Size:  22.8 KB

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


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    The default location for PBP is
    c:\pbp

    But if it is compiling where it is...
    How did PBP get installed inside of MCS?
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    May 2012
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Hello mackrackit,

    I don't know how pbp intalled there... i've intalled it a long time ago.

    I'm looking at the assembler code, and it loops at:

    CLRWDT --> Clear WTD
    BTFSS PIR1,RCIF,A --> Check if Receiving bits... but i don't have nothing in my code...
    BRA-3 --> Goto the CLRWDT again

    anyone understand it??

    Thanks,
    Nuno

Members who have read this thread : 1

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