RE: 18F, table read, sdcc

<[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.gnupic
Message-ID <[email protected]>
You need to load the following registers first:

	TBLPTRL
	TBLPTRH
	TBLPTRU 

then you need to use

	tblrd  *	or
	tblrd  *+	or
	tblrd  *-	

Read data to latch.

Finally, you can get data by

	movf	TABLAT, W, 0	or
	movff	TABLAT, location

- Mengjin -

-----Original Message-----
From: Alessandro Zummo [mailto:[email protected]] 
Sent: Friday, August 05, 2005 3:43 PM
To: [email protected]
Subject: [gnupic] 18F, table read, sdcc



 Hello,

  anyone has suggestions on the best way to read data  stored in program memory using SDCC/PIC16?

  in assembly I would use a DB directive,  TBLPTR and the table read istruction..

  I was planning to keep using the DB directive,  assemble with gpasm -c into an object file,  and loading the data from C.

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Turin, Italy

  http://www.towertech.it


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.