On 28.10.2011 20:32, Mikael Nordman wrote:
> 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
To access the flash between ec00 - ffff one would need to expose i@ ic@
i! ic! as words in the wordlist.
BR Mike
|