Searching \ for 'table' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/mems.htm?key=table
Search entire site for: 'table'.

Truncated match.
PICList Thread
'table'
1998\01\05@130554 by Rob Aerts

flavicon
face
part 0 1217 bytes
!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
hello,
 
i need some help.
in a program, i have 16 bytes (in ram)
i want to read and modify these bytes using a counter (witch points to the specified byte)
normaly you use a base and a index register to point a byte in this list/table 
pic16cr84 hasn't got any index related cmd's for this purpose,  
so how do i program this table
 
Kind regards,
Rob Aerts 
 

1998\01\05@140807 by Bob Blick

face
flavicon
face
Hi Rob,

You might check your mail program, it sends messages that I cannot read
at work(using PINE)without a lot of trouble, everything is sent as an
attachment.

At home I use Eudora, which understands these kinds of messages, but the
point I'm making is that some people don't ever see your messages because
they are so non-standard(perhaps Microsoft).

Cheers,

Bob

1998\01\05@152451 by Norm Cramer

flavicon
face
There are two registers that can be used for indirect addressing.  They are
FSR and INDF.  FSR contains the "address" or pointer to the RAM location
and INDF provides read and write access to it.

So load FSR with the base of your table.  Use INDF to acces it and
increment FSR to index through the table.

Hope this helps.

Norm

1998\01\05@153335 by Mike Keitz

picon face
On Mon, 5 Jan 1998 18:31:06 +0100 Rob Aerts <spam_OUTrob.aertsTakeThisOuTspamTIP.NL> writes:
>in a program, i have 16 bytes (in ram)
>i want to read and modify these bytes using a counter
>(witch points to the specified byte)

All the PIC instructions access RAM directly.  But the PIC has special
hardware to indirectly access RAM.  It works through two special function
registers: FSR and INDF.

The FSR (File Select Register) register holds the address of the RAM byte
to be accessed.  It is the pointer or index register.

The INDF (INDirect File) register acts as a 'shadow' copy of the register
selected by FSR.  Reading the INDF register returns a copy of the data
found at the RAM location [FSR].  Writing to the INDF register stores the
data at the location indexed by FSR.  For example:

table   equ     h'10'           ;Start of the table in RAM.
; Store some values in the table using direct access.
       movlw   1
       movwf   table           ;Entry 0 in the table = 1
       movlw   2
       movwf   table+2         ;Entry 1 in the table = 2
; Read entries in the table sequentially using indirect access.
       movlw   table           ;Address of entry 0 in table.
       movwf   FSR
; Now INDF is a copy of entry 0.
       movfw   INDF            ;Get data from entry 0
       call    output          ;Send data out (for example)
       incf    FSR
       movfw   INDF            ;Get data from entry 1.
       call    output

To access any byte in the table, compute the true address in RAM and
write it to FSR.  Then read or write the table data to INDF.

; Read a byte from the table.  Table index (0-16) in W.
       addlw   table           ;Offset to start of table.
       movwf   FSR             ;Point to desired data in table.
       movfw   INDF            ;Read it.

1998\01\06@154710 by Tom Mariner

flavicon
face
At home I use Eudora, which understands these kinds of messages, but the
point I'm making is that some people don't ever see your messages because
they are so non-standard(perhaps Microsoft).

Cheers,

Bob
[Tom Mariner]
I presume you are referring to MSN which up to now has been a somewhat
non-standard mail interface. Although I have had no trouble with this list,
one partner on Netcom seemed unable to read my attachments.

Well, the wait is over -- the new upgrades to 2.5 of MSN makes it a
(seemingly) totally compliant mail interface. The upgrade ain't for the
faint of heart if you want to keep using Outlook for your groupware, but it
has cured all the previous problems.

Tom

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...