Shop OBEX P1 Docs P2 Docs Learn Events
PropForth4.6 is available for download — Parallax Forums

PropForth4.6 is available for download

prof_brainoprof_braino Posts: 4,313
edited 2012-03-07 06:23 in Propeller 1
Please note: As of 2012-03-04 proforth 4.6 is no longer the current release

PLease the the new thread

http://forums.parallax.com/showthread.php?138399-Propforth-5.0-is-available-for-download

PropForth4.6 is available for download at

http://code.google.com/p/propforth/downloads/list

This version contains corrections for all issues corrected in the 4.x release series.

All existing 4.x PropForth code is expected to work as in previous versions (minus the bugs).

This release contains corrections for all issues found in the 4.x release series that were reported and reproduced to date. Each issue that was reported has been analyzed. Each issue determined to be an error has been corrected and tested. All issues that have been reported have been reproduced except one. All reproduced errors have been analyzed. All analysis has been applied and resulted in a bug fix.

Note: one issue has been reported that has not been reproduced in the test environment. This is the issue reported by Brian Riley and involves large custom EEPROM hardware. Plans are underway to send the exact hardware for testing, but we did not want to hold up the release any longer. Since the error was not reported by any other user with any other hardware, it should not affect typical configurations.

For more Forth Application for the Propeller, the Forth Interest Group Thread
http://forums.parallax.com/showthread.php?131047-Propeller-Forth-Interest-Group
«13456

Comments

  • TrapperBobTrapperBob Posts: 142
    edited 2011-07-26 09:03
    Hello prof_braino,

    Not a big deal to me but it appears as if the latest PropForth4.6 still identifies itself as PropForth4.5.

    Thanks in advance
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-07-26 09:18
    Could somebody help with an experiment? I would appreciate if someone (maybe several?) could run the regression tests, and report results. Could someone give this a try?

    I'm hoping a first-timer that has not run them before will give feedback from that perspective, but all feedback is appreciated. This involves downloading the release archive, loading propforth.spin to the prop EEPROM, find the tests in the doc directory, and following the instructions. It takes less than a couple hours.

    The idea is that the more people that check the proper functions, the less likely we miss something. Also, we are attempting to combine the documentation, requirements, tutorial, and tests in the smallest, most efficient package. The result is the suplied "regression suite". The intent is that if runs the regression suite, one will have exercised all propforth functions, seen them execute successfully, and have some idea of how they are used; or at least know where to look to find an example of correct use and operation.

    In next release series, the Regression Suite will be automated, such that a single command will launch the entire suite, and one can determine if something got broke within 45 seconds, rather than wait until something blows up in the field. More testing sooner means fixing issues now when they are easy; and less problems later, when they are expensive.

    The experiment is to determine the dgree of success of this approach, and discover areas for improvement.

    There is no deadline. Results reported before v5.0 release will be used in 5.0 developement, so sooner is better.

    For each release, I re-run everything from scratch after posting, including re-assembling the test bed from scratch. But I won't be able to get started till this weekend. If anybody can beat me to it and find something, I would be grateful.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-07-26 09:42
    TrapperBob wrote: »
    Hello prof_braino,

    Not a big deal to me but it appears as if the latest PropForth4.6 still identifies itself as PropForth4.5.

    Thanks in advance

    This actually is a big deal, but at least we got the date right. There will be a new version with corrections, hopefully this weekend.

    Thanks for the feedback!
  • max72max72 Posts: 1,155
    edited 2011-07-27 14:00
    I downloaded the 4.6 version, and installed it on a custom PCB, pin equivalent (in theory) with the prop platform with uSD.
    I had little time, so I did the first test, at the moment,
    There is no echo when a function is defined via : (in the reference it is supposed to be echoed).
    Is there a way to automate it, let's say with Perl or Python, saving the output to a file and simply diff it with a reference? It would simplify a lot the tests.
    Massimo

    edit: I reread your posts, and I see you are already planning the automation. Sorry..
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-07-27 16:12
    max72 wrote: »
    There is no echo when a function is defined via : (in the reference it is supposed to be echoed).
    Is there a way to automate it, let's say with Perl or Python, saving the output to a file and simply diff it with a reference? It would simplify a lot the tests.
    Massimo

    edit: I reread your posts, and I see you are already planning the automation. Sorry..

    Thanks for the feedback, I intend to put this in the documentation, once I figure out how I want to say it.

    The idea is that the terminal program (teraterm) already does logging.

    Also, the definition started with : and ending with ; echo "ok" if successful. This is by design.

    Which reference says it is to be echoed? I should change it.

    When the word is executed, in this case
    overflowtest
    
    the lines after the --- are the test input and
    the lines after the ### are the screen captute of your input and the expected output
    +++
    Run_overflowtest
    ---
    overflowtest
    ###
    Prop0 Cog6 ok
    overflowtest
    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
    CON:Prop0 Cog6 RESET - last status: 1 MAIN STACK OVERFLOW
    
    Prop0 Cog6 RESET - last status: 1 MAIN STACK OVERFLOW
    Prop0 Cog6 ok
    %%%
    
    
    
    +++               <- test-identifier marker
    Run_overflowtest   <- test-identifier text  
    ---                 <-test input marker 
    overflowtest            <-test input text
    ###               <-test output marker
    Prop0 Cog6 ok      <-test output lines of text
    overflowtest      <-test output lines of text
    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  <-test output lines of text
    CON:Prop0 Cog6 RESET - last status: 1 MAIN STACK OVERFLOW   <-test output lines of text
                                <-test output lines of text
    Prop0 Cog6 RESET - last status: 1 MAIN STACK OVERFLOW  <-test output lines of text
    Prop0 Cog6 ok      <-test output lines of text
    %%%            <-test output termination marker
    
    
    

    The plan is that if the actual output of the test matches the predicted text, the test can pass.
    If the text does not match, the test identifier and offending lines will be echoed to the screen for logging by teraterm or other logging utility; AND will be logged to a file on the EEPROM/SD if present and enabled.

    There will also be an ability to do general match for things that are not expected to be predictable, for example time stamps.

    The thought was that on version 4.x, the tests were still fairly simple and the checking could still be done visually.
  • max72max72 Posts: 1,155
    edited 2011-07-27 23:54
    the lines after the ### are the screen captute of your input and the expected output

    I missed the AND..
    Massimo
  • caskazcaskaz Posts: 957
    edited 2011-08-07 00:05
    Hi.

    I have trouble.
    I installed PropForth4.6 to protoboard.
    MicroSD-card is 2Gbyte(SDSC).
    Card is formatted by WindowsXP.

    Procedure;
    1. Loading PropForthKernel.spin
    2. Loading fs.f
    Executing fsclear and fsls
    3. Loading fswr.f
    4. Loading fsrd.f
    5. Executing saveforth
    6. reboot

    I connected microSD-adapter on protoboard and modified sd_driver.f;
    P0 cs
    P1 di
    P2 clk
    P3 do

    I checked sd_init on sd_driver.f(modified). It's no error. (A3 error don't occur)

    7. Loading sd_driver.f(modified)
    8. Loading sdfs.f
    9. reboot
    CON: Prop0 Cog0 RESET - last status: 0 ok
    .
    ..
    CON: Prop0 Cog5 RESET - last status: 0 ok
    CON: Prop0 Cog6 RESET - last status: 163 UNKNOWN ERROR <-- (A3 read timed out)
    CON: Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    Prop0 Cog0 RESET - last status: 7 LOCK TIMEOUT
    Prop0 Cog0 ok

    What is wrong?
    In this case, I must repeat from 1st step(Loading PropForthKernel.spin)?
  • caskazcaskaz Posts: 957
    edited 2011-08-07 01:51
    When _sd_debug is on, messages are below;
    sd_init
    
    sd_init ENTER
    
    Lock: 0
    
    Lock: 1
    
    Lock: 2
    
    Lock: 3
    
    Lock: 4
    
    Lock: 5
    
    Lock: 6
    
    Lock: 7
    
    _sd_init ENTER
    
    _sd_cmdr8 CMD: 0 ARG: 0 RESPONSE: 1
    
    _sd_cmdr40 CMD: 8 ARG: 426
    
    _sd_cmdr8 CMD: 8 ARG: 426 RESPONSE: 1
    
    RESPONSE: 1 426
    
    _sd_cmdr8 CMD: 55 ARG: 0 RESPONSE: 1
    
    _sd_cmdr8 CMD: 41 ARG: 1073741824 RESPONSE: 1
    
    _sd_cmdr8 CMD: 55 ARG: 0 RESPONSE: 1
    
    _sd_cmdr8 CMD: 41 ARG: 1073741824 RESPONSE: 0
    
    _sd_cmdr40 CMD: 58 ARG: 0
    
    _sd_cmdr8 CMD: 58 ARG: 0 RESPONSE: 0
    
    RESPONSE: 0 -2130739200
    
    _sd_cmdr8 CMD: 16 ARG: 512 RESPONSE: 0
    
    _sd_cmdr8data readlen: 16
    
    _sd_cmdr8 CMD: 9 ARG: 0 RESPONSE: 0
    
    _sd_readdata readlen: 16
    
    00364 00128:
    
    00364: 0008388402 1532658618 4141604863 0243269813
    
    00368: 0000000000 0000000000 0000000000 0000000000
    
    00372: 0000000000 0000000000 0000000000 0000000000
    
    00376: 0000000000 0000000000 0000000000 0000000000
    
    00380: 0000000000 0000000000 0000000000 0000000000
    
    00384: 0000000000 0000000000 0000000000 0000000000
    
    00388: 0000000000 0000000000 0000000000 0000000000
    
    00392: 0000000000 0000000000 0000000000 0000000000
    
    00396: 0000000000 0000000000 0000000000 0000000000
    
    00400: 0000000000 0000000000 0000000000 0000000000
    
    00404: 0000000000 0000000000 0000000000 0000000000
    
    00408: 0000000000 0000000000 0000000000 0000000000
    
    00412: 0000000000 0000000000 0000000000 0000000000
    
    00416: 0000000000 0000000000 0000000000 0000000000
    
    00420: 0000000000 0000000000 0000000000 0000000000
    
    00424: 0000000000 0000000000 0000000000 0000000000
    
    00428: 0000000000 0000000000 0000000000 0000000000
    
    00432: 0000000000 0000000000 0000000000 0000000000
    
    00436: 0000000000 0000000000 0000000000 0000000000
    
    00440: 0000000000 0000000000 0000000000 0000000000
    
    00444: 0000000000 0000000000 0000000000 0000000000
    
    00448: 0000000000 0000000000 0000000000 0000000000
    
    00452: 0000000000 0000000000 0000000000 0000000000
    
    00456: 0000000000 0000000000 0000000000 0000000000
    
    00460: 0000000000 0000000000 0000000000 0000000000
    
    00464: 0000000000 0000000000 0000000000 0000000000
    
    00468: 0000000000 0000000000 0000000000 0000000000
    
    00472: 0000000000 0000000000 0000000000 0000000000
    
    00476: 0000000000 0000000000 0000000000 0000000000
    
    00480: 0000000000 0000000000 0000000000 0000000000
    
    00484: 0000000000 0000000000 0000000000 0000000000
    
    00488: 0000000000 0000000000 0000000000 0000000000
    
    SDSC initialize success # of Blocks: 3911680
    
    _sd_init EXIT
    
    sd_init EXIT
    
    
    Prop0 Cog6 ok
    
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-08-07 06:06
    caskaz wrote: »
    trouble PropForth4.6 to protoboard MicroSD-card is 2Gbyte(SDSC).

    3. Loading fswr.f
    4. Loading fsrd.f
    5. Executing saveforth
    What is wrong?

    Did you run the regression test? ...\Propforth\PropFroth4.6-20110725\doc\tests
    test-1.3.1 EEPROMfsRW.txt
    test-1.3.2 EEPROMfsRD.txt
    You must run the regression test successfully to show that your hardware works correctly.

    But this is what I think from reading your post:
    - fs.f is the entire file system, includes read, also write functionality. Usually use this, load propforth.spin, load fs.f and do saveforth.
    - fsrd.f is READ ONLY, use this when you have something in EEPROM, and you want to "protect" it from modification. It can still be modified, but it is less likely to do it accidentally. Use this after the final application is complete, and the files that reside in EEPROM are stable. Load propforth.spin, load fs.f and do saveforth.
    - fswr.f is the set of WRITE extensions for fsrd. If you are using fsrd, and you want the ability to write to EEPROM temporarily, add fswr on top of fsrd. Load fswr.f into RAM, write to EEPROM, and reboot. The data will remain in EEPROM, and the file system will remain read only.

    It looks like you are loading fswr after you already have the full file system loaded, this is an error.
    It looks like you are loading fsrd after you already have the full file system loaded, this is an error.
    It looks like you are loading fswr before you load fsrd, this is an error.

    1) Load Propforth.spin
    2) Choose EITHER fs.f or fsrd.f Load ONE of these
    3) do saveforth

    If you loaded fsrs but need to clear and re-write the EEPROM, load fswr, modify the EEPROM, and reboot.

    If this fixes your error, I should put this in the instructions for fs.f. Should this go in the comments in the code, or in a web page?
  • caskazcaskaz Posts: 957
    edited 2011-08-07 06:56
    Hi prof_braino.

    I did;
    1) Loading Propforth.spin
    2) Loading fs.f
    3) do saveforth
    4) Loading sd_driver
    5) Loading sdfs
    6) do saveforth

    I checked SD-card.
    Only 1-card is usable, although sd_init of all card is successful(check before saveforth).

    No error card (saveforth after loading sd_driver and sdfs)
    Kingston standard-SDSC 2GB

    Error SD-card(saveforth after loading sd_driver and sdfs)
    Transcend standard-SDHC 4GB --> CON: Prop0 Cog6 RESET - last status: 172 UNKNOWN ERROR
    Transcend micro-SDSC 2GB --> CON: Prop0 Cog6 RESET - last status: 163 UNKNOWN ERROR
    No-Brand micro-SDSC 2GB --> CON: Prop0 Cog6 RESET - last status: 163 UNKNOWN ERROR
    Transcend standard SDHC 4GB --> CON: Prop0 Cog6 RESET - last status: 163 UNKNOWN ERROR
    SiliconPower standard SDHC 4GB --> CON: Prop0 Cog6 RESET - last status: 172 UNKNOWN ERROR
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-08-07 07:23
    caskaz wrote: »
    4) Loading sd_driver
    5) Loading sdfs
    6) do saveforth

    I checked SD-card.

    Did you run the regression test
    test-2.1.1 SD.txt
    on each card?
    After step 5, the saveforth, the board should be able to test multiple cards. Power down the board, swap working SD card for the next card, then power up the board, and if no error, continue with step six.

    If a card that gives an error was formatted by windows, please try to format the carrd with a camera or other device, and with the manufacturer's format utility.

    If the cards still give an error, please open a new issue. You might have to send one of your problem cards to Sal.
  • caskazcaskaz Posts: 957
    edited 2011-08-07 08:07
    Hi prof_braino.

    I tested each card after saveforth.
    Only Kingston-card was ok.

    I formatted all SD-card by WindowsXP.
    All SD-card is successful on sd_init.

    I don't have camera(using SD-card). I will format SD-card after borrowing camera or other devices.
  • SapiehaSapieha Posts: 2,964
    edited 2011-08-07 08:18
    Hi caskaz

    Look at this Software -- I have good experiences on it.

    SDSDHCSDXC Memory Card Formatting Software

    caskaz wrote: »
    Hi prof_braino.

    I tested each card after saveforth.
    Only Kingston-card was ok.

    I formatted all SD-card by WindowsXP.
    All SD-card is successful on sd_init.

    I don't have camera(using SD-card). I will format SD-card after borrowing camera or other devices.
  • caskazcaskaz Posts: 957
    edited 2011-08-07 15:34
    Hi Sapieha.
    Thanks for your advice.
    Formatting are ok.

    But result is same as #11.
    Only Kingston SDSC-card is ok.
  • caskazcaskaz Posts: 957
    edited 2011-08-07 17:38
    Hi.

    I tested skipping .autoload.
    Using no-brand micro2GB(SDSC).
    reboot<Enter>
    <ESC>     <--- skipping .autoload
    
    CON: Prop0 Cog0 RESET - last status: 0 ok
    CON: Prop0 Cog1 RESET - last status: 0 ok
    CON: Prop0 Cog2 RESET - last status: 0 ok
    CON: Prop0 Cog3 RESET - last status: 0 ok
    CON: Prop0 Cog4 RESET - last status: 0 ok
    CON: Prop0 PROP REBBOT PropForth v4.5 2011JUL25 7:10 2
    CON: Prop0 Cog5 RESET - last status: 0 ok
    CON: Prop0 Cog6 RESET - last status: 0 ok
    Prop0 Cog6 RESET - last status: 0 ok
    Prop0 Cog6 ok
    
    1 sd_mount<Enter>
    Prop0 Cog6 ok
    
    Loading sd_script.f
    ..
    
    ..
    
    
    Prop0 Cog6 ok
    
    ls<Enter>
    337 .partion-sys/
    130 .sdcardinfo
    136 .autousr.f
    133 .autoload.f
    
    Prop0 Cog6 ok
    
    After power-cycle, its card is successfull.

    I did another card(Transcend standard4GB SDHC). It is ok, too.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-08-08 09:10
    caskaz wrote: »
    Using no-brand micro2GB(SDSC). After power-cycle, its card is successfull.
    I did another card(Transcend standard4GB SDHC). It is ok, too.

    So you problem is fixed? To summarize the answer, the software is set-up as described in test-2.1.1 SD.txt, up to step 5, the saveforth. After that, power cycle when the card is swapped. Remember, the design for THIS driver assumes that the SD card is INTERNAL to the system, and is not intended to be swapped after power up.

    Support for FAT and hot swap is yet to be implemented, but it looks like caskaz is already started. If possible, can you make the FAT and hot swap SD support for a SECOND sd slot? I was thinking to have one SD as permenant, internal, and teh second for transfer to the PC, since the second driver will be much slower and much larger memory footprint.
  • caskazcaskaz Posts: 957
    edited 2011-08-08 15:53
    Hi prof_braino.

    Yes, error has gone.
    I don't understand its reason.
    I think I need to understand sdfs.f.
    I will make 2nd SD-slot for FAT after understanding sdfs.f and sd_script.f.
  • caskazcaskaz Posts: 957
    edited 2011-08-09 07:31
    Hi.
    I made DS1337(rtc)-demo.
    Time-setting use Denpatokei(Radio Controlled Clock).
    Denpatokei's decode-code cannot use in other country, because it is for Japan.
    1) Loading DS_1337_0.2
    2) Loading Denpatokei_0.2
    3) Loading demo_DS1337
    Prop0 Cog6 ok
    
    set_DS1337 <Enter>
    
    64569280 63734246 63095433 62222007 38701622 64576283 16299724 65444754 62984589 63262709 38417569 64282581 63216334 63543005 62741510 62246061 14475645 65350188 63425975 63419559 62804196 38119244 64468010 63553529 63031373 38639033 17708193 65763377 39094445 64479822 63538977 62960371 62219183 62500128 61896588 62244332 14079380 19685048 40579010  1
    64499961  0
    39388081  1
    64796583  0
    63628782  0
    38687236  1
    40143520  1
    64260550  0
    16010962 P1
    65486588  0
    62808738  0
    39203826  1
    64711530  0
    63091167  0
    63136891  0
    62765272  0
    38412008  1
    64835689  0
    15819085 P2
    65475250  0
    62894342  0
    38215973  1
    64288940  0
    63715616  0
    63364546  0
    63243094  0
    38297158  1
    64698585  0
    16461411 P3
    65381881  0
    63015026  0
    63727980  0
    38918580  1
    64793599  0
    64005644  0
    63031170  0
    62840648  0
    62743289  0
    14628224 P4
    65176034  0
    62732755  0
    62632350  0
    62857737  0
    38327903  1
    64508916  0
    63709703  0
    63710420  0
    38228415  1
    18101142 P5
    65025066  0
    38895525  1
    65250507  0
    63650158  0
    62898034  0
    62369086  0
    62275041  0
    62485408  0
    62416381  0
    15036558 success
    Year  2011 Month 8 Day   9 Week  2 Hour  22 Minute57
    
    Prop0 Cog6 ok
    
    read_DS1337 <Enter>
    
    Year  :2011
    Month :AUG
    Day   :9
    week  :TUE
    Hour  :23
    Minute:3
    Second:17
    
    Prop0 Cog6 ok
    
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-08-09 08:18
    caskaz wrote: »
    Yes, error has gone. I don't understand its reason.

    I believe the reason is initialization at power up.

    To save memory space and complexity, the driver only initializes once at power up. It does NOT detect if the card is unplugged, and does NOT give many error messages. These are left to the user to define for a particular application.

    However, the usage is "obvious" to Sal, but maybe not so obvious to the rest of us. I'll tell him about the problem you had, made we will make some better instructions, or change the way the functions are coded to make it clearer.

    Thanks for looking at this. You input continues to be a main driver for progress. :)

    EDIT - Opened Issue #50 - better docs for EEPROM and SD.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-08-09 08:33
    caskaz wrote: »
    I made DS1337(rtc)-demo.
    Time-setting use Denpatokei(Radio Controlled Clock).

    Good stuff!

    Your code looks great. The only comment I would make at this time is about the word
    : denpatokei ... ;
    

    It is very long and contains many nested if..thens. The "rule of thumb" is for the highest level words to contain no more than around 7 items. For example I might suggest breaking the word into its functional areas: Initialize_depatokei, Loop_denpatokei, Parse_frame_denpatokei, .display_denpatokei. This makes looking at the code easier, and thus will be easier to maintain in 3 months when you come back to it after looking at something else (i.e. to answer a new user's questions, this is a real possibility since you are the expert for all of Japan, the propforth expert for the whole world for many functions). This is considered "best practice", but is of course optional and totally up to you.

    Arrigato, Sensei!
  • caskazcaskaz Posts: 957
    edited 2011-08-09 15:35
    Hi prof_braino.

    Thanks for your advice.
    Now,I write DS3231(rtc) code.
    I'm going to re-make denpatokei's code.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2011-08-12 19:43
    Hi prof,
    I played with PropForth yesterday and it seems to work well (nice job Sal) and so I may look at developing a real application (PLC) around it. The big scary question is where is the documentation or even user guides?

    If you need contributors for the kernel or other utilities I am sure I can help.

    BTW, I'm very glad it's not ANSI Forth, proof that a committee of experts can get it so wrong (and impractical). Forth's strengths IMO are not PC centric but embedded and real-time systems, right where Forth got it's roots.
  • caskazcaskaz Posts: 957
    edited 2011-08-13 17:59
    Hi.

    There were bugs in denpatokei_0.2.

    I made DS3231's code.
    I tried to re-write denpatokei's deep nest. But it was difficult for me.
    Although deep nest seems to be difficult to read, it is acutually simple.

    Loading DS_3231, denpatokei_0.3, demo_DS3231
    Prop0 Cog6 ok
    
    set_DS3231
    ..
    ..
    14376395 signal-receive is success
    Year  2011 Month 8 Day   14 Week  7 Hour  9 Minute5
    
    Prop0 Cog6 ok
    
    read_DS3231
    
    Year  :2011
    Month :AUG
    Day   :14
    week  :SUN
    Hour  :9
    Minute:8
    Second:47
    Temperature:31.50degree
    
    Prop0 Cog6 ok
    
    check_1Hz
    
    1sec(ticks):80003760
    Difference(ticks):3760   
    
    Prop0 Cog6 ok
    
    127 conpensate
    
    ............................................................................................
    
    1sec(ticks):80004144
    Difference(ticks):4144
    
    Prop0 Cog6 ok
    

    1second is 1.000047sec(80003760ticks).
    This may be caused by using PropForth. <-- maybe incorrect
    Needing to use assembler on check_1Hz. <-- meaningless
    Crystal on protoboard is +-30ppm. DS3231's spec is +-2ppm.
    Measurement by propeller is meaningless.


    Later, I will use battery-backup and observe time-shift for long time.

    I don't understand well DS3231's temperature-compenation.
    Anyone teach me about temperature-compenation?
    How to use it?
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-08-13 18:16
    it seems to work well (nice job Sal) and so I may look at developing a real application (PLC) around it.

    Thanks! Looking forward to seeing your work. Version 5.0 should be even cooler, so you are joining at a good time.
    The big scary question is where is the documentation or even user guides?
    The only documentation at this time are Sal's comments in the source code, and a few of my own weak attempts on the wiki list.
    http://code.google.com/p/propforth/w/list
    There are a couple of pages added by other team members, but not nearly enough.
    The pages are created and updated in response to user questions, but most users don't ask so many questions, so the pages are not updated often. Most pages are in fact my notes to my questions that Sal answered, and so only go as deep as my understanding. Ask questions or supply answers and explanations, I will see to it that they are added.
    If you need contributors for the kernel or other utilities I am sure I can help.
    Excellent, yes I do, please do.
    BTW, I'm very glad it's not ANSI Forth, proof that a committee of experts can get it so wrong (and impractical). Forth's strengths IMO are not PC centric but embedded and real-time systems, right where Forth got it's roots.
    Just as the original Forth was Chuck Moore's personal tool, and he does not particularly care one way or another how anyone uses it, Sal's forth is Sal's personal tool, and he does not particiularly care if anyone else uses it. He is amused that I want to to use it for teaching kids, so has allowed me to ask for standardization, consistency, and added functions. But its still his tool done his way for his purpose. He wants folks to change it anyway they want or need, but deviations cannot be supported, each main branch is the responsibility of the author. That being said, we have not seen any deviations from th main branch, all the extensions are on top of the main branch (so far). This may change once the final 5.0 kernel comes out, but they would be great.

    I'm looking forward to your feedback, and additions to the main branch or a branch in your own direction. :)
  • caskazcaskaz Posts: 957
    edited 2011-08-15 07:29
    Hi.

    I translated WiiNunchuck-driver from OBEX to PropForth.
    Sorry, only display of datas.
    Don't connect 3rd 64keeprom(A2=0 A1=1 A0=0) because of using P28 and P29.

    WiiNunchuck adapter
    http://www.sparkfun.com/products/9281
    1024 x 768 - 86K
    1024 x 768 - 84K
  • caskazcaskaz Posts: 957
    edited 2011-08-21 07:45
    Hi.

    I installed battery-back-up DS3231(rtc) on protoboard.
    Today,I have adjusted DS3231 by radio-controlled clock.
    1second for DS3231 is 80003520ticks for propeller system-counter.
    Maybe it is a little bigger than 80MHz.
    I will measure DS3231's time-lag in a month.
    1024 x 768 - 103K
  • Ron SutcliffeRon Sutcliffe Posts: 420
    edited 2011-08-25 07:35
    @Prof

    I have just downloaded the latest version of Propforth.

    Might I suggest that the propforth.spin defines the FIRST TIME BOOT I/O Pins using the CON statement.

    The RamBlade board( which supports 512k SRAM and SD card) uses pins 30 and 31 for addresssing the SRAM. Once

    Propforth.spin is compiled and downloaded to eeprom via P30 and P31, these Pins are no longer available.

    I/O is redirected through Pins $16 and $17 following an eeprom load. (see ramblade handware and drivers below)

    This leaves users like myself having to modify propforth.spin. Defining the rx and tx pins using a CON statement in the spin file
    would be most helpful. This first time boot pin config can be over written later if need be, by words in the forth Dict.

    There are alot of Boards around with external Ram.


    Below see Ramblade hardware Access

    ' P0-18 = A0-18 SRAM address
    ' P19 = -CS microSD
    ' P20 = -CE SRAM & enable eeprom
    ' P21 = -WE SRAM & enable eeprom
    ' P22 = SO \ not used by this driver
    ' P23 = SI / I/O RX TX
    ' P24-31 = D0-7 SRAM \ * see below
    ' | P28 = SCL eeprom
    ' | P29 = SDA eeprom
    ' | P30 = prog SO programming only
    ' / P31 = prog SI programmimg only
    '




    Forth Drivers for SRAM


    17ffff constant ram_dr
    0ff07ffff constant ram_dw
    0ff37ffff constant ram_strobe
    3ffff constant mem_top


    : rd_ina ina COG@ ;

    : xrd dup 0 dira COG! \ Random read
    mem_top < if
    outa COG!
    ram_dr dira COG!
    rd_ina
    18 rshift
    then ;

    : xwr dup \ Random write
    0 dira COG!
    mem_top < if
    ram_dw dira COG!
    swap
    18 lshift
    or
    outa COG!
    ram_strobe dira COG!
    ram_dw dira COG!
    then ;


    : xmv s_adr W@ xrd \ Copy scr to dest x bytes
    d_adr W@ xwr
    0 do
    s_adr W@ i - xrd
    d_adr W@ i - xwr
    loop ;

    : xclr hex swap s_adr W! \ fill with spaces
    0 do
    20 s_adr W@ i + xwr
    loop ;

    : xdump hex swap s_adr W! \ Sram dump from start adr, n bytes
    0 do
    i 4 u/mod 4* i swap - 0= if cr then drop
    s_adr W@ i + dup xrd swap .word space .word space space
    loop
    cr ;





    Random access to External Ram does not get any faster or easier than this. Hence my reason for using this RamBlade.

    I would appreciate if you would pass this on to Sal for his comments.

    Ron Sutcliffe
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-08-25 09:50
    Hooray! Ron's back! I was afraid you fell off the world.

    Sal is still out on vacation, he should be back in a couple weeks. I'll bring this up next time we talk.

    We're getting ready for 5.0 in little while, and the editor work is becoming germane.

    FYI-
    The current design specifies the kernel is compatible with any propchip, and not specific to any particular hardware. We'll discuss this change and make sure it has no impact on this or other design decisions, and evaluate from there. The current set of design decisions would indicate SRAM support as an extension to the standard kernel, and not permit kernel modifications for specific hardware unless there is no impact on the standard hardware. When specific hardware applications are present, these are handled with extensions as in the case of the spineret board.

    So far you are the only one to use the RamBlade with forth and request this change. Another forth user with SRAM is drohne235 at Hive-project.de. The hive board uses a different configuration for SRAM, and so a change for either risks presenting a conflict for the other. If a user has an alternate hardware configuration IE remapping the standard serial terminal pins, the user is responsible for determining the best way to handle that hardware.

    In general, if in fact a kernel change specific to the RamBlade is required, you would become maintainer of the "RamBlade branch". Modifying propforth.spin as the recommend solution in this case, but confined to the branch.

    This is a good time to have this discussion, I'll post the results.

    EDIT added Issue 53 for this

    http://code.google.com/p/propforth/issues/detail?id=53
  • Ron SutcliffeRon Sutcliffe Posts: 420
    edited 2011-08-25 11:17
    Prof

    I am not in favour of any modified version if it can be avoided.

    I think we all want a common PropForth.spin, but it needs be portable.

    I look forward to hearing what comes out of your discussion with SAL

    Cheers
  • caskazcaskaz Posts: 957
    edited 2011-08-25 22:26
    Hi.
    I made fs.f for 128k-eeprom.

    24LC1025
    address:0x20000 - 0x3ffff
    Pin1 A0
    +3.3V
    Pin2 A1
    GND
    Pin3 A2
    3.3V
    Pin4 Vss
    GND
    Pin5 SDA
    P29
    Pin6 SCL
    P28
    Pin7 WP
    GND
    Pin8 Vcc
    3.3V
    Prop0 Cog6 ok
    
    hex <Enter>
    
    Prop0 Cog6 ok
    
    fsls <Enter>
    
    00020000 033B fswrite.f
    00020380 20BA asm.f
    
    
    1DB80 bytes free in EEPROM file system
    
    Prop0 Cog6 ok
    
    fsfree <Enter>
    
    1DB80 bytes free in EEPROM file system
    
    Prop0 Cog6 ok
    
    20000 100 edump <Enter>
    
    0000 0100:
    
    0000: 3B 03 09 66 73 77 72 69 74 65 2E 66 0D 0D 0D 0D   ;..fswrite.f....
    0010: 68 65 78 0D 0D 0D 31 20 77 63 6F 6E 73 74 61 6E   hex...1 wconstan
    0020: 74 20 62 75 69 6C 64 5F 66 73 77 72 0D 0D 3A 20   t build_fswr..:
    0030: 28 66 73 77 72 29 0D 64 75 70 20 3E 72 20 72 6F   (fswr).dup >r ro
    0040: 74 20 64 75 70 20 72 3E 20 2B 20 66 73 74 6F 70   t dup r> + fstop
    0050: 20 31 2D 20 3E 0D 69 66 0D 41 20 45 52 52 20 0D    1- >.if.A ERR .
    0060: 74 68 65 6E 0D 72 6F 74 32 20 65 65 77 72 69 74   then.rot2 eewrit
    0070: 65 70 61 67 65 0D 69 66 0D 41 20 45 52 52 0D 74   epage.if.A ERR.t
    0080: 68 65 6E 0D 3B 0D 3A 20 66 73 63 6C 72 0D 70 61   hen.;.: fsclr.pa
    0090: 64 62 6C 20 66 73 62 6F 74 20 34 30 30 20 2B 20   dbl fsbot 400 +
    00A0: 66 73 62 6F 74 0D 64 6F 0D 69 20 70 61 64 20 66   fsbot.do.i pad f
    00B0: 73 70 73 20 28 66 73 77 72 29 20 32 65 20 65 6D   sps (fswr) 2e em
    00C0: 69 74 0D 66 73 70 73 20 2B 6C 6F 6F 70 0D 2D 31   it.fsps +loop.-1
    00D0: 20 66 73 62 6F 74 20 45 57 21 0D 3B 0D 0D 3A 20    fsbot EW!.;..:
    00E0: 66 73 63 6C 65 61 72 0D 2D 31 20 66 73 62 6F 74   fsclear.-1 fsbot
    00F0: 20 45 57 21 0D 3B 20 0D 3A 20 66 73 77 72 69 74    EW!.; .: fswrit
    
    Prop0 Cog6 ok
    

    I had trouble when I made this codes.
    Somtimes read/write error occured.
    Reason was pull-up-resisterfor SDA/SCL.
    I had installed DS3231S(rtc) on protoboard.
    So SDA/SCL line connected 64k-eeprom(on board) and DS3231S and 128k-eeprom.
    64k-eeprom and DS3231S had no trouble.
    I added pull-up-resister(10k ohm) beside 128k-eeprom.
    Read/write's error has gone.

    I also tested QuicStart board(32k-eeprom on board).
    Not need extra pull-upresister(10k ohm) when 128k-eeprom read/write.


    Maybe pull-up-resister(10k ohm) on protoboard is a little big.
    If extra 64k-eeprom(7pcs) installed on prop-board, read/write's error might cause.
Sign In or Register to comment.