Menu

PIC18F25K20 Problem

joe rocci
2014-04-30
2014-04-30
  • joe rocci

    joe rocci - 2014-04-30

    Error message "Processor type is undefined". Works fine with other processor types.

    I'm using the "Hot Release" version of GCB in the "Downloads" section.

    Joe

     

    Last edit: joe rocci 2014-04-30
  • Anobium

    Anobium - 2014-04-30

    Thank you.

    Would you please post your code? I am not being funny but the code really helps.

     
  • joe rocci

    joe rocci - 2014-04-30

    I paired it down to one line:

    "#chip 18f25k20,4"

    It won't even work with that. Seems to compile but not assemble.

     

    Last edit: joe rocci 2014-04-30
  • Anobium

    Anobium - 2014-04-30

    Please check you have the chip file installed in folder ..\GreatCowBasic\chipdata\18F25K20.dat

     
  • joe rocci

    joe rocci - 2014-04-30

    Yup, it's there

     
  • Anobium

    Anobium - 2014-04-30

    Post the error file. Works ok here and on my two test machines.

     
  • joe rocci

    joe rocci - 2014-04-30

    I was looking for an error file, in the same folder as asm and lst, but couldn't find it. What's it called?

     
  • Anobium

    Anobium - 2014-04-30

    errors.txt

     
  • joe rocci

    joe rocci - 2014-04-30

    I can't find it, either in the GCB folder or in the folder that has the application source & asm files. Besides, I think that's a compiler error file, isn't it? It seems to get through the compilation phase but it hiccups in the assembler.

     
  • Anobium

    Anobium - 2014-04-30

    What assembler are you using?

    Did this work in previous versions of Great Cow Basic ?

     
  • Anobium

    Anobium - 2014-04-30

    Are you missing the P18F25K20.inc for your assembler?

    Here is my ASM. Works for me.

    ;Program compiled by Great Cow BASIC (0.9 28/4/2014)
    ;Need help? See the GCBASIC forums at http://sourceforge.net/projects/gcbasic/forums,
    ;check the documentation or email w_cholmondeley at users dot sourceforge dot net.
    
    ;********************************************************************************
    
    ;Set up the assembler options (Chip type, clock source, other bits and pieces)
     LIST p=18F25K20, r=DEC
    #include <P18F25K20.inc>
     CONFIG LVP = OFF, MCLRE = OFF, WDTEN = OFF, FOSC = INTIO67
    
    ;********************************************************************************
    
    ;Vectors
        ORG 0
        goto    BASPROGRAMSTART
        ORG 8
        retfie
    
    ;********************************************************************************
    
    ;Start of program memory page 0
        ORG 12
    BASPROGRAMSTART
    ;Call initialisation routines
        rcall   INITSYS
    
    ;Start of the main program
    BASPROGRAMEND
        sleep
        bra BASPROGRAMEND
    
    ;********************************************************************************
    
    INITSYS
    ;OSCCON = OSCCON AND b'10001111'
        movlw   143
        andwf   OSCCON,F,ACCESS
    ;OSCCON = OSCCON OR b'01100000'
        movlw   96
        iorwf   OSCCON,F,ACCESS
    ;BSR = 0
        clrf    BSR,ACCESS
    ;TBLPTRU = 0
        clrf    TBLPTRU,ACCESS
    ;SET ADCON0.ADON OFF
        bcf ADCON0,ADON,ACCESS
    ;SET ADFM OFF
        bcf ADCON2,ADFM,ACCESS
    ;ANSEL = 0
        clrf    ANSEL,ACCESS
    ;ANSELH = 0
        clrf    ANSELH,ACCESS
    ;C2ON = 0
        bcf CM2CON0,C2ON,ACCESS
    ;C1ON = 0
        bcf CM1CON0,C1ON,ACCESS
    ;PORTA = 0
        clrf    PORTA,ACCESS
    ;PORTB = 0
        clrf    PORTB,ACCESS
    ;PORTC = 0
        clrf    PORTC,ACCESS
    ;PORTE = 0
        clrf    PORTE,ACCESS
        return
    
    ;********************************************************************************
    
     END
    
     
  • joe rocci

    joe rocci - 2014-04-30

    This started when I switched my previously working project from a 18F4455 to the 18F25K20. I then updated my installation version to see if that fixed it, which it didn't. I eventually paired it down to just the one line, which works with other processors. It seems to get through the compile process, but it spits out numerous "unknown processor type" errors once it gets in the assembly phase. The assembler is the stock GPASM that ships with GCB.

    FYI, I have a folder in my GCB installation (which is under the Prithvi folder) called "header" and that has the P18F25K20.inc file and another folder called "chipdata" that has the corresponding .dat file.

    I'd say it's a problem with my installation, but it works with other processors, so I'm baffled.

     
  • Anobium

    Anobium - 2014-04-30

    Me too, I guess it is your config. I now only @syn.

    Try @syn please, get things working then revert back gpasm.

     
  • joe rocci

    joe rocci - 2014-04-30

    BTW, you won't see the problem in the asm file, as the compilation from GCB to assembly code seems to work OK. You DO see it in the assembler's lst file, as the following snippet shows:

    gpasm-0.13.6 beta C:\Documents and Settings\Joe Rocci\test.asm4-30-2014 16:00:38 PAGE 1

    LOC OBJECT CODE LINE SOURCE TEXT
    VALUE

               00001 ;Program compiled by Great Cow BASIC (0.9 17/2/2014)
               00002 ;Need help? See the GCBASIC forums at http://sourceforge.net/projects/gcbasic/forums,
               00003 ;check the documentation or email w_cholmondeley at users dot sourceforge dot net.
               00004 
               00005 ;********************************************************************************
               00006 
               00007 ;Set up the assembler options (Chip type, clock source, other bits and pieces)
    

    Error [132] : Unknown processor.
    00008 LIST p=18F25K20, r=DEC
    00009 #include <P18F25K20.inc>
    00001 LIST
    00002
    00003 ;==========================================================================
    00004 ; MPASM PIC18F25K20 processor include
    00005 ;
    00006 ; (c) Copyright 1999-2008 Microchip Technology, All rights reserved
    00007 ;==========================================================================
    00008
    Error [131] : Processor type is undefined.
    Error [131] : Processor type is undefined.
    Error [131] : Processor type is undefined.
    Error [131] : Processor type is undefined.
    Error [131] : Processor type is undefined.
    Error [131] : Processor type is undefined.
    Error [131] : Processor type is undefined.
    Error [131] : Processor type is undefined.
    Error [131] : Processor type is undefined.
    Error [131] : Processor type is undefined.
    01351 LIST
    Error [131] : Processor type is undefined.
    00010 CONFIG LVP = OFF, MCLRE = OFF, WDTEN = OFF, FOSC = INTIO67
    00011
    00012 ;***********
    00013
    00014 ;Vectors
    Error [131] : Processor type is undefined.
    00015 ORG 0
    Error [131] : Processor type is undefined.
    00016 goto BASPROGRAMSTART
    Error [131] : Processor type is undefined.
    00017 ORG 8
    Error [131] : Processor type is undefined.
    00018 retfie
    00019
    00020 ;
    ***********
    00021
    00022 ;Start of program memory page 0
    Error [131] : Processor type is undefined.
    00023 ORG 12
    0000 00024 BASPROGRAMSTART
    00025 ;Call initialisation routines
    Error [131] : Processor type is undefined.
    00026 rcall INITSYS
    00027
    gpasm-0.13.6 beta C:\Documents and Settings\Joe Rocci\test.asm4-30-2014 16:00:38 PAGE 2

    LOC OBJECT CODE LINE SOURCE TEXT
    VALUE

               00028 ;Start of the main program
    

    0000 00029 BASPROGRAMEND
    Error [131] : Processor type is undefined.
    00030 sleep
    Error [131] : Processor type is undefined.
    00031 bra BASPROGRAMEND
    00032
    00033 ;***********
    00034
    0000 00035 INITSYS
    Error [131] : Processor type is undefined.
    00036 movlw 143
    Error [131] : Processor type is undefined.
    00037 andwf OSCCON,F,ACCESS
    Error [131] : Processor type is undefined.
    00038 movlw 96
    Error [131] : Processor type is undefined.
    00039 iorwf OSCCON,F,ACCESS
    Error [131] : Processor type is undefined.
    00040 clrf BSR,ACCESS
    Error [131] : Processor type is undefined.
    00041 clrf TBLPTRU,ACCESS
    Error [131] : Processor type is undefined.
    00042 bcf ADCON0,ADON,ACCESS
    Error [131] : Processor type is undefined.
    00043 bcf ADCON2,ADFM,ACCESS
    Error [131] : Processor type is undefined.
    00044 clrf ANSEL,ACCESS
    Error [131] : Processor type is undefined.
    00045 clrf ANSELH,ACCESS
    Error [131] : Processor type is undefined.
    00046 bcf CM2CON0,C2ON,ACCESS
    Error [131] : Processor type is undefined.
    00047 bcf CM1CON0,C1ON,ACCESS
    Error [131] : Processor type is undefined.
    00048 clrf PORTA,ACCESS
    Error [131] : Processor type is undefined.
    00049 clrf PORTB,ACCESS
    Error [131] : Processor type is undefined.
    00050 clrf PORTC,ACCESS
    Error [131] : Processor type is undefined.
    00051 clrf PORTE,ACCESS
    Error [131] : Processor type is undefined.
    00052 return
    00053
    00054 ;
    ***********
    00055
    00056
    gpasm-0.13.6 beta C:\Documents and Settings\Joe Rocci\test.asm4-30-2014 16:00:38 PAGE 3

     
  • joe rocci

    joe rocci - 2014-04-30

    What's @SYN?

     
  • joe rocci

    joe rocci - 2014-04-30

    Oh...GCB@SYN. I forgot I had it installed already.

    Well, it seems to work there, so the problem's definitely something in my Prithvi environment. I guess it's bye-bye for Prithvi, though I do seem to keep returning to it after trying several other IDE's. I guess I'll just have to learn to love GCB@SYN.

    Thanks for the help.

     
  • Anobium

    Anobium - 2014-04-30

    :-)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.