Page 1 of 1

Posted: 30 Jun 2008 12:15
by yo2lio
HI,

It's easy ... Use INDIRECT ADDRESSING !

IRP bit from STATUS register must be 0 for BANK 0/1 and 1 for BANK 2/3

Code: Select all

function ReadBank23(data_addr : byte) : byte;
begin
  STATUS.7 := 1;
  FSR := data_addr;
  result := INDF;
  STATUS.7 := 0;
end;

procedure WriteBank23(data_addr,value : byte);
begin
  STATUS.7 := 1;
  FSR := data_addr;
  INDF := value;
  STATUS.7 := 0;
end;

Posted: 30 Jun 2008 12:41
by BaCaRdi
You Rock Florin!

Thanks again.

-Marc

how to access some bytes in bank 2/3 ?

Posted: 30 Jun 2008 20:57
by AlbrechtMe
Whow! Well done. It works (of course...).

Thanks to Florin!