Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

16F88 IRP Problem

Status
Not open for further replies.

jerryd

New Member
Electro Tech,

Tried this post on another forum and didn't get an answer.

When I build my 16F88 program with Mikrobasic Pro I get this
error message:

27 1519 IRP bit must be set manually for indirect access to 'bits' variable

The variable "bits' is defined as dim bits as byte[18][5]
18 * 5 = 90 so there shouldn't be a bank switching problem.

I put this at the top of my variable definitions thinking that
would put all of this array in bank0 but it didn't help.

I do have other variables defined.

Can I the IRP=X command to get around this limitation?

jerryd
 
The IRP bit is in the STATUS register and is the 9th bit (bit 8) of the indirect addressing pointer FSR. I'm guessing you're accessing an array in banks 2 or 3, if so try IRP=1. If in bank 0 and 1 then do IRP=0.

Mike.
 
Pommie,

Where do I put the IRP commands before the dim of the variable
or when I do the indirect addressing?

IRP=1
dim bits as byte[18][5]
IRP=0

or

IRP=1
PORTA = bits[n][x]
IRP-0


Also I read about the "absolute" directive but it didn't
seem to help much.

dim bits as byte[18][5] absolute 0x32

jerryd
 
I have no idea how your compiler deals with it. Most compilers handle it automatically. Try reading the "indirect" addressing mode. Note, IRP = Indirect Address Pointer.

Mike.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top