Hi, I have been just playing around with MPLAB IDE and I have some PIC16F628, I recently wrote a simple program for the PIC to flash an LED hooked up to PORTA of the chip and it worked. So I was wondering how to define bytes in the Data EEPROM, within MPLAB IDE (so it can output to HEX file) so I can pull off some more advanced effects :D Thanks
Posted on 2004-03-28 19:08:46 by x86asm
Use the DE directive. It works much the same way as DB.

<label> DE <expr>
Posted on 2004-03-29 11:31:23 by VVV

Use the DE directive. It works much the same way as DB.

<label> DE <expr>

Could I define a linear array of bytes, and I am under the impression that if I use the label to load the "W" register with it, that the assembler will give me the offset into the EEPROM so I can use it to get the data from the EEPROM?
Posted on 2004-03-30 15:14:25 by x86asm
Sorry it took me so long to reply.
Yes, you can store arrays in the EEPROM, even character strings:

<label> de "My prog. ver. 1.01", 0

Whenever you reference <label> the assembler will understand the address of the first byte of the array, which is what you want.
Posted on 2004-04-05 12:11:54 by VVV