PIC18f87J90 question

Discussion in 'Embedded Systems and Microcontrollers' started by RG23, Oct 17, 2011.

  1. RG23

    Thread Starter Active Member

    Dec 6, 2010
    301
    2
    I am programming PIC18f87J90

    When the program memory address is more than 2100 the program is not building successfully in MPLAB v8.36

    Is there any setting of program counter that needs to be changed?

    If anyone has an idea please let me know

    Thanks
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    It could be two thing. Your compiler is in demo mode and do not support larger programs. This may be valid for some l C/BASIC compilers. DO you program in assembler or C/basic. If you program in assembler take a look at the range for for different branch instructions. The Call and Goto instructions do have 20 bit range so they may not be the problem
    Bu the way I am not so good then it comes to assembler programming and the PIC18f micros so others may pitch in if I am totaly wrong here....:eek:
     
  3. RG23

    Thread Starter Active Member

    Dec 6, 2010
    301
    2
    its not the demo

    i program in assembler

    Before when i programmed PIC16f887 when the program memory became larger than 2k I could use the paging concept to acces the subroutines in different pages by setting or resetting the PCLATH bits 3 or 4

    The above concept worked for PIC16f887

    I wonder if I need to do similar in PIC18f87J90

    But here the PC is 21 bits
    PCL is directly accessible

    but not PCLATH and PCLATU
     
  4. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,684
    2,745
    Are you getting a build error? If so, post it here.
     
  5. RG23

    Thread Starter Active Member

    Dec 6, 2010
    301
    2
    i figured it out

    thank you
     
Loading...