PIC18F452.INC not found


Results 1 to 8 of 8

Threaded View

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

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