Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: hazzer123 on April 12, 2007, 12:38:36 PM
-
Hi
I have written a program to display a message that i hard-coded into it.
Next I want to write a program that will display a user inputted message. The user will input using 2 buttons, 1 to scroll through the alphabet and the other to confirm.
The problem is that the message will need to be stored even after the PIC is turned on and then off. Is this possible?
-
This is what EEPROM is for, no?
-
Yeh sorry that was a silly question ::)
I have another though...
If i have the address of a byte in my W register, how can i copy the byte at the address into the w register.
It could be another silly question, but... ow well :D
Thank you
Harry
-
So ...... this is in assembly?
-
Yes it is :)
-
MOVF f,w
where f is the file and w says put the f value into the working register.
then you can simply save the w into whatever file you want using MOVWF
-
I found a solution :D
Theres aomething called an indirect address register.
You can copy an address to the FSR register. and then the byte at that address can be found at the INDF address.
VARIABLE EQU 0X1C
MOVLW VARIABLE
MOVWF FSR
MOVF INDF,W
Thanks