Using indirect addressing

View: New views
2 Messages — Rating Filter:   Alert me  

Using indirect addressing

by seventh guardian-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

First of all, this is my first post to the list, and since I've
received no confirmation of my subscription, I'd kindly ask you to
keep my e-mail in CC.

I'm trying to figure out how to use the indirect data addressing
facilities of the newer pic18 MCU's. I've reserved X bytes on a
relocatable data segment, and I've labeled the base address. Now in
order to access the data in indexed mode, I need to put the full base
address in FSRn, manipulate it and read/write to INDFn. My problem is
that there is no documentation on how to get the full 12 bit address
from the label, or how to put it on FSRnL and FSRnH (the low/high 8
bit address registers).

Can this be done?

Thanks!
  Renato Caldas

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: Using indirect addressing

by Robert Pearce-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 29 Apr 2008, seventh guardian <seventhguardian@...> wrote
:
>My problem is
>that there is no documentation on how to get the full 12 bit address
>from the label, or how to put it on FSRnL and FSRnH (the low/high 8
>bit address registers).

I've not used the 16-bit cores, but...

Surely the label should already have a full 12-bit address. You can then
access the two halves using the high() and low() operators as you would
when setting up for a computed jump or similar.
--
Rob Pearce                       http://www.bdt-home.demon.co.uk

The contents of this | Windows NT crashed.
message are purely   | I am the Blue Screen of Death.
my opinion. Don't    | No one hears your screams.
believe a word.      |

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...

LightInTheBox - Buy quality products at wholesale price!