gnupic: Re: [gnupic] 18F, table read, sdcc


Previous by date: 5 Aug 2005 23:52:30 +0100 18F, table read, sdcc, Alessandro Zummo
Next by date: 5 Aug 2005 23:52:30 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion
Previous in thread:
Next in thread: 5 Aug 2005 23:52:30 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion

Subject: RE: [gnupic] 18F, table read, sdcc
From: ####@####.####
Date: 5 Aug 2005 23:52:30 +0100
Message-Id: <F770B96908E9C64192A137817B8198BD03CA36@wcosmb06.cos.agilent.com>

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 ####@####.#### 
Sent: Friday, August 05, 2005 3:43 PM
To: ####@####.####
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: ####@####.####
For additional commands, e-mail: ####@####.####




Previous by date: 5 Aug 2005 23:52:30 +0100 18F, table read, sdcc, Alessandro Zummo
Next by date: 5 Aug 2005 23:52:30 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion
Previous in thread:
Next in thread: 5 Aug 2005 23:52:30 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion


Powered by ezmlm-browse 0.20.