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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/26/07 06:56
Read: times


 
#131529 - solution?
Responding to: ???'s previous message
I guess the solution is to use a loop of MOVC operations to copy the current flash contents to a temporary register, then use MOVX to copy that temp to the XRAM.

Then the flash page can be erased.

Then you do another loop: for each byte, use MOVX to read the byte into a temp register, then twiddle the right bits to enable flash writes, then MOVX to copy the temp to the flash, then disable flash writes (set MOVX access back to XRAM), then lather, rinse, repeat.

A bit PITA, but it'll work.

It'd be nice if there was a way to divvy up the XDATA space so that accesses between 0x0000 and 0x7FFF go to XRAM and accesses above 0x8000 (with appropriate write enable, etc) access flash. Of course the flash normally lives in code space and there could be much confusion if you have more than 32K of flash (or XRAM) so I understand why it's done the way it's done.

-a

List of 9 messages in thread
TopicAuthorDate
Tonight's annoyance            01/01/70 00:00      
   solution?            01/01/70 00:00      
      MOVX read instructions always target XRAM            01/01/70 00:00      
         whoops, saw it later!            01/01/70 00:00      
      what is PITA (except the bread)?            01/01/70 00:00      
         Pain in the ...            01/01/70 00:00      
            aaaaah, thanks :-)            01/01/70 00:00      
   you can .. and you cant            01/01/70 00:00      
   Penguin check.            01/01/70 00:00      

Back to Subject List