PIC18F452.INC not found


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    May 2004
    Location
    brighton
    Posts
    149

    Question PIC18F452.INC not found

    Hi All

    I have been off programming for quite a while now and i am finding it really difficuit
    to get my 18F452 to program.
    i am using pbp 2.45 and Mplab V8.
    Each time i try to complier gives the following errors which i have attached.
    "Cannot open file (Include file "PIC18F452.INC" not found)
    it complies ok on 16F series thought.
    i know its something to do with the include file but i not sure

    Please help

    Isaac
    Attached Images Attached Images  

  2. #2
    Join Date
    May 2004
    Location
    brighton
    Posts
    149


    Did you find this post helpful? Yes | No

    Default

    I have also included the code i am running and the include file

    @ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H

    Define OSC 20
    clear

    DEFINE LCD_DREG PORTD ' Use Portd for LCD Data
    DEFINE LCD_DBIT 4 ' Use Upper(4) 4 bits of Port
    ' PORTD-4 thru PORTD-7 connects to
    ' LCD DB4 thru LCD DB-7 respectively
    DEFINE LCD_RSREG PORTE ' PORTE for RegisterSelect (RS) bit
    DEFINE LCD_RSBIT 0 ' PORTE-0 pin for LCD's RS line
    DEFINE LCD_EREG PORTE ' PORTE for Enable (E) bit
    DEFINE LCD_EBIT 1 ' PORTE-1 pin for LCD's E line

    DEFINE LCD_BITS 4 ' Using 4-bit bus
    DEFINE LCD_LINES 2 ' Using 2 line Display
    DEFINE LCD_COMMANDUS 2000 ' Command Delay (uS)
    DEFINE LCD_DATAUS 50 ' Data Delay (uS)

    ' ** Define LCD Control Constants **

    I CON 254 ' Control Byte
    Clr CON 1 ' Clear the display
    Line1 CON 128 ' Point to beginning of line 1
    Line2 CON 192 ' Point to beginning of line 2


    ' Software Defines
    ' ----------------
    ' ** Declare the Variables **
    Temp VAR word ' General Purpose
    Data_Out VAR word ' Data read from the Eeprom
    Data_In VAR word ' Data written to the Eeprom
    address VAR word' Address

    '
    ' Initialise Hardware
    ' -------------------
    ADCON1=7
    TRISA=%00000000
    TRISB=%00000000
    TRISC=%10000000
    TRISD=%00000000


    Pause 1000
    lcdout I,Clr:Pause 30
    lcdout I,Line1," 18F452 TEST "
    lcdout I,Line2+2,"..Power On.. !!"
    Pause 1000 '
    Data_Out=0: Data_In =0: Temp =0

    'WRITE SUB
    '=======
    For address = 0 TO 100 STEP 2 ' Loop 50 times
    Data_In =Temp ' Data_In is data for EPPROM
    WRITE address,Data_In.LowByte
    WRITE (address+1),Data_In.HighByte
    Pause 10 ' Delay 10ms after each write
    Temp =Temp + 1000 ' Add 1000 to the previous value
    Next address



    loop:
    'READ SUB
    '=======
    For address = 0 TO 100 STEP 2 ' Loop 50 times
    lcdout I,Clr:Pause 30
    READ address,Data_Out.LowByte
    READ (address+1),Data_Out.HighByte
    lcdout I,Line1+2," Eprom Values :"
    lcdout I,Line2+2,#address,": ",#Data_Out ' Display Eprom Data

    Pause 1000
    Next address
    GoTo loop

    End
    Attached Images Attached Images  

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Have you tried a complete reinstall yet?

    Ya know, the upgrade to PBP 2.50a is only $25...
    Why waste the time with a reinstall when you can have the latest/greatest for a minimal cost?

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Question

    Hi, Zaac

    do you Use MPASM as an assembler ??? the Error file shows some MCS ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    do you Use MPASM as an assembler ???
    Doesn't that kick out a totally different error? Something like "18F not supported with PM" or something like that?

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi, Ski

    You're right ... there's a window appearing in MCS if wrong assembler selected.

    the worst is the program compiles and assembles fine here ...


    Isaac,

    check : VIEW\Compile and Program options\ assembler tab and verify if good locations given.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

  8. #8
    Join Date
    May 2004
    Location
    brighton
    Posts
    149


    Did you find this post helpful? Yes | No

    Smile

    Thank All

    i have got it to compile now.
    Darrel Taylor hit the nail on the head .
    I pointed to it as he describe below andit worked
    ================================================== ====
    In MCS, go to the View | Compile and Program Options | Assembler Tab

    Click the Find Manually ... button and point it to
    C:\program files\microchip\mpasm suite
    ===========================================
    i thinkit was trying to use the mpasm that came with Microcode studio

    Thanks a million
    Isaac

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. PBPro error "Macro USBINIT? not found in macro file"
    By Bonxy in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th October 2011, 09:06
  3. Replies: 6
    Last Post: - 4th November 2009, 13:36
  4. I have found that ......(RF message)
    By gringobomba14 in forum General
    Replies: 0
    Last Post: - 29th June 2008, 19:17
  5. 18F452 "Unknown Processor" errors
    By schwinn_rider in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th April 2006, 03:56

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