Re: [Flashforth-devel] P18F Accessing FLASH above 0xebff
Brought to you by:
oh2aun
From: Mikael N. <mik...@pp...> - 2011-10-28 17:32:49
|
On 28.10.2011 19:03, Pete Zawasky wrote: > HI Mikael, > > As you know I currently use the PIC18F6527 quite often. As for using > the PIC18F6722, any thoughts/recommendations for accessing the FLASH > memory above 0xebff? Perhaps not so much for program space as the > storage of somewhat permanent data for LCD screens, etc. > It could work by setting TBLPTRU to 1 and then moving data with memory operators. The catch is, you cannot use the interpreter in between so you have to first compile a word that does the actual moving of data. For example like this: : flash_to_ram ( flashaddr ramaddr count 64Kbyte_flash_page --- ) iflush tblptru c! cmove 0 tblptru c! ; : ram_to flash ( ramaddr flashaddr count 64Kbyte_flash_page --- ) iflush tblptru c! cmove 0 tblptru c! ; To be able to set the tblptru interactively, then LIT: DOCREATE: DODOES: DOUSER: would need to push tblptru, clear tblptru, do their stuff and pop tblptru. If using forth interrupt words, then i] and [i needs to push and pop also tblptru. Heres your chance to hack FlashForth :-) Best Regards Mike |