Help on first time use of 18FXX2 PICS


Closed Thread
Results 1 to 2 of 2
  1. #1
    johngb's Avatar
    johngb Guest

    Default Help on first time use of 18FXX2 PICS

    I have just tried to move my 16F876 program on to a 18F252.

    I set up the following registers settings:

    ' Hardware initialisation - Set Hardware Directions --------------------
    ADCON1 = %0000110 ' Disable AD Converters
    TRISA = %00000000 ' PORTA all set to Output - LCD Control
    TRISB = %11111001 ' PORTB Heat & Pump Demand set to output - all others set to Input
    TRISC = %11101001 ' Speaker set to Output
    'OPTION_REG.7=0 ' Enable Weak Pull-Ups on 16F87X Series
    INTCON2.7 = 0 ' Enable Weak Pull-Ups on 18FX52 Series

    Compiles OK but I get an error reported back from MPASM
    "Error[122] pbppic18.lib 806: Illegal opcode FFF9"

    When I try and download it Mecanique's Microcode Loader reports that the hex file is not compatible with the current microcontroller

    I'm using PIC Basic Pro 2.43, MPASM Ver 3.20.07

    What does this mean and how can I get around it?
    Last edited by johngb; - 13th February 2004 at 12:01.

  2. #2
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    I have just tried your code with

    MPASM 3.60.02
    MicroCode Studio 2.1.0.7
    Microcode Loader 2.0.0.1

    There is no problem.

    Have you set the Target Processor in Microcode Studio to 18F252?
    (when starting a new project it defaults to 16F877)

    rgds.
    Last edited by NavMicroSystems; - 6th March 2004 at 00:57.

Similar Threads

  1. I don't understand this code!
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 13th February 2008, 02:55
  2. Measuring time
    By AugustoPedrone in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th July 2007, 23:46
  3. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  4. Alarm Time
    By Santana in forum Code Examples
    Replies: 1
    Last Post: - 8th December 2006, 13:58
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

Members who have read this thread : 1

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