18F2550 and Blink Led


Closed Thread
Results 1 to 40 of 50

Hybrid View

  1. #1
    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

  2. #2
    Join Date
    May 2012
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Another thing is in ASM file (after compile), it starts with:

    #define CODE_SIZE 8
    #define MCS_STEP 73H
    #define MCS_DUMP 64H
    #define MCS_HANDSHAKE 68H
    #define MCS_RESET 72H
    #define MCS_WRITE 77H
    #define HSER_TXSTA 36
    #define HSER_SPBRG

    In my program, i don't define nothing of this...

    Anyone understand it??

    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 think the best thing to do is un-install everything (PBP, MCS, MPLAB) and start over.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    MCS_STEP, MCS_DUMP, MCS_HANDSHAKE etc. come from the ICD (In-Circuit Debugger) in MicroCode Studio.

    They only get added when you click the "ICD Compile Program" button.

    When you compile a program for ICD, it will not run unless you are set up to use the ICD. (Serial connection to the PC).

    If you use the normal "Compile Program" or just "Compile" buttons, the program will probably run better.

    If you do not see a "Compile Program" or "Compile" button, right click on the toolbar and check the "Compile and Program" option.
    You can turn off the ICD toolbar so you don't get confused in the future.
    DT

  5. #5
    Join Date
    May 2012
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    Hello,

    What a silly mistake... You are wright Darrel, i'm compiling always with the ICD Compile...

    Thanks for your help, it's solved.

    Thanks,
    Nuno

  6. #6
    Join Date
    Feb 2013
    Posts
    1,165


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    I'm trying to just compile the code below:

    Code:
    ' PIC18F2550 
     DEFINE OSC 8 
     ADCON1 = %00001111
     CMCON = 7
     OSCCON = %01110000
     TRISB = %00000000
     START
    
     LATB.2 = 1
     PAUSE 250
     LATB.2 = 0
     PAUSE 250
     GOTO START
    It gives Block overflow for #ENDCONFIG.

    MCU is 18F2550

    What might be the reason?

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: 18F2550 and Blink Led

    START label missing colon?

    Robert

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