Use of DA directive in MPLAB assembler(MPASM)

Status
Not open for further replies.

megahurtz

New Member
i have to interface an LCD to my PIC 16F877 and send a character string "Welcome". i am using the directive DA for storing the string in the PIC's flash memory. the end template would look like:

org 1000h
wlcm da "Welcome"

i wish to know how would the program will access each byte in the string so dat i can send it one by one to the LCD. Plz guide.....
 
Hi,

Check under "Reading the EEPROM" and reading flash memory.
It's accessed a little like reading the EEPROM, at least in several
PIC chips.
Check out the data sheet as there should be plenty info on this.
 
ya, dis idea had definitely hit me. Hwever i was wondering if there could be some way to access it directly, as in, if there might be some directive in MPASM to directly load the string character by character into W-reg.
For eg, there's one set of instructions in 8051 for the same, which is :

mov dptr,<label>
movc a,@a+dptr
.
.
.
org xxxH
<label> db "ABCDEF..."

Isn't there any such shortcut in PIC? else i'll have to resort to loading the data from the flash memory using the very typical set of inst'ns to load the flash memory data into WREG.

Plz guide. Awaiting precious suggestions.....
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…