Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/17/03 14:47
Read: times


 
#58838 - Help Returning to same program location
I have a short program that is outputting text to an LCD one character at a time with about a 1s delay between characters. In between characters the user can press a button to go to a different mode in which a short tone is played through the speaker that corresponds to that letter. When they press the button again I'd like the display to go back to the next letter in order, not the beginning of the message.

My problem is that these 2 routines need to be independant, so using CALLs and RETs does not seem possible to me. I'm new to the 8051, but it seems that I should be able to use a combination of PUSH and POP with the DPTR? I'd like to just store my current position somewhere safe (a register?) and be able to call that when I get back into the message routine if it is non-zero. I'm using the DPTR elsewhere for a lookup table, so I don't have exclusive use of it for this.

Would anyone have any suggestions or pointers to articles? Thanks a lot.

List of 4 messages in thread
TopicAuthorDate
Help Returning to same program location            01/01/70 00:00      
   RE: Help Returning to same program location            01/01/70 00:00      
   RE: Help Returning to same program location            01/01/70 00:00      
      RE: Help Returning to same program location            01/01/70 00:00      

Back to Subject List