PDA

View Full Version : Help on first time use of 18FXX2 PICS



johngb
- 13th February 2004, 12:28
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?

NavMicroSystems
- 6th March 2004, 01:54
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.