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
Use the DE directive. It works much the same way as DB.
<label> DE <expr>
<label> DE <expr>
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?
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.
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.