Thread: [Flashforth-devel] fl+ in FF4.8
Brought to you by:
oh2aun
From: Mike M. <mi...@mo...> - 2013-09-03 19:50:36
|
We are nearing completion of our project, using FF4.8 on the PIC24FJ256GB110. FF has proven to be a robust platform. We have found and fixed some minor bugs, which we will later post. Tovar has worked out a good interface to C that has C and FF cooperating. When it is ready we will post it. I am currently stuck trying to use fl+ to protect flash. BTW: The words.txt file has the definitions of fl- and fl+ reversed. I have a few variables that need to be in flash. I would like to call fl+ at startup, locking flash. Then, when the code needs to write to a flash variable, it would call fl-, write, and then call fl+. The problem is that I cannot call fl+ from the word that writes to flash, or even from the same line at the console. When I try, the routine LOCKED: calls an address error, apparently because it is not done writing? Adding a long delay before fl+ does not work. I can call fl+ from a new line at the console after the write without error. Is there a bit or flag that I can test to tell when the flash write is done, before calling fl+ ? 73 -- Mike Miller WB6TMH Moon Valley Circuits mike@moonvalleycircuits (dot) com http://www.moonvalleycircuits.com/ (707) 996-4157 12350 Maple Glen Rd. Glen Ellen, CA 95442 |
From: Mikael N. <mik...@pp...> - 2013-09-04 04:15:16
|
Hi Mike, Great to hear that FlashForth is working out for you. The fl+ and fl- are correct in words.txt but reversed in the code. Just correct the code and it will work the same way as in other FlashForths. I will fix that in git. The flash write should succeed like this: fl+ 1234 flashVar ! iflush fl- IFLUSH triggers the write to flash. Waiting for the C-interface ! BR Mike On 09/03/2013 10:35 PM, Mike Miller wrote: > We are nearing completion of our project, using FF4.8 on the > PIC24FJ256GB110. > FF has proven to be a robust platform. > We have found and fixed some minor bugs, which we will later post. > Tovar has worked out a good interface to C that has C and FF cooperating. > When it is ready we will post it. > > I am currently stuck trying to use fl+ to protect flash. > BTW: The words.txt file has the definitions of fl- and fl+ reversed. > I have a few variables that need to be in flash. I would like to call > fl+ at startup, locking flash. > Then, when the code needs to write to a flash variable, it would call > fl-, write, and then call fl+. > > The problem is that I cannot call fl+ from the word that writes to > flash, or even from the same line at the console. When I try, the > routine LOCKED: calls an address error, apparently because it is not > done writing? > Adding a long delay before fl+ does not work. > I can call fl+ from a new line at the console after the write without error. > > Is there a bit or flag that I can test to tell when the flash write is > done, before calling fl+ ? > > 73 > |
From: Pete Z. <pza...@pz...> - 2013-09-07 14:50:09
|
Hi Mike, Also very interested in your results with FF4.8 on the PIC24FJ256GB110. Just received the PIC24F Starter Kit DM240011 with the PIC24FJ256GB106. Still looking for a good solution for our needs of a 16-bit PIC with USB to run FF on (EEPROM or not). Any hints would be appreciated. Thanks, Pete |
From: Mike M. <mi...@mo...> - 2013-09-07 15:42:13
|
Pete, We brought FF4.8 up first on the PIC24FJ128GA110 with the Microchip Explorer16 board. All that was needed was to get the clock and PFLASH settings right, and switching serial ports. Switching later to the PIC24FJ256GB110 was a bit more trouble, only because Microchip's documentation is so confusing. We had trouble getting the config bits right, and the programmable pin assignments are Byzantine. The PIC24FJ256GB110has flash, but not eeprom. The flash can be used as eeprom, as long as you don't exceed 10000 writes. We are using a battery to support the RAM, which works as long as you put it in sleep while power is down. When asleep, it draws a microamp or two. They do have lower power chips, too. Mike Miller Moon Valley Circuits mike@moonvalleycircuits (dot)com http://www.moonvalleycircuits.com/ (707) 996-4157 12350 Maple Glen Rd. Glen Ellen, CA 95442 On 9/7/13 7:38 AM, Pete Zawasky wrote: > Hi Mike, > > Also very interested in your results with FF4.8 on the PIC24FJ256GB110. > Just received the PIC24F Starter Kit DM240011 with the PIC24FJ256GB106. > Still looking for a good solution for our needs of a 16-bit PIC with USB > to run FF on (EEPROM or not). > > Any hints would be appreciated. > > Thanks, > Pete > > > > > ------------------------------------------------------------------------------ > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! > Discover the easy way to master current and previous Microsoft technologies > and advance your career. Get an incredible 1,500+ hours of step-by-step > tutorial videos with LearnDevNow. Subscribe today and save! > http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > |
From: Pete Z. <pza...@pz...> - 2013-09-08 22:44:49
|
Hi Mike, Thanks for the info. The config bits and the programmable pin assignments are "challenging". I thought I was the only one confused..... Are you using the uart or usb function on the PIC24FJ256G110 ? Pete |
From: Michael P. <mp...@ca...> - 2013-09-09 04:21:43
|
Can someone point me to a working method that will yield a hex file I can use to put FF into an atMega 2560, or is there someone that's already accomplished this that wouldn't mind sharing their hex file? Thanks, Michael K6MLE |
From: Mike M. <mi...@mo...> - 2013-09-10 14:00:00
|
Pete We are using 4 uarts, 2 spi, 2 a/d inputs, and the rtc We are not using the PIC usb. Mike On 9/8/13 3:45 PM, Pete Zawasky wrote: > Hi Mike, > > Thanks for the info. The config bits and the programmable pin > assignments are "challenging". > I thought I was the only one confused..... > > Are you using the uart or usb function on the PIC24FJ256G110 ? > > Pete > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > |