Shop OBEX P1 Docs P2 Docs Learn Events
Propforth v5.5 is available for download - Page 21 — Parallax Forums

Propforth v5.5 is available for download

1181921232426

Comments

  • caskaz, the download link/filenaming issue has been reported here.

    It's on the list of things to fix.
  • caskazcaskaz Posts: 957
    edited 2015-08-06 08:01
    Hi.
    I got CH375 board.
    http://www.amazon.com/Solu-Read-write-interface-Communication-communication/dp/B00XDLRNTY
    But I don't understand how to use this yet.
    Anybody can read and write files inside USB-memory?
    And can read descriptor by using ch375?

    Now only sertial communication is ok.
    Prop0 Cog6 ok
    RESET
    If USB-device is connected, LED on CH375-board is off by H/W reset
    
    Prop0 Cog6 ok
    Set_USBmode
    Detected USB device
    If connected USB-device, LED on CH375-board is on.
    
    Prop0 Cog6 ok
    DiskSize
    BlockPerSector:8
    BytePerSector512
    TotalSize:517996032
    
    Prop0 Cog6 ok
    
    7z
    275K
  • Today's Call:

    Sal's work load has tampered off, but now he's setting up a new house. PF6 is next on his list, at last!

    Caskaz had a question about indexing in assembler. Sal intends to provide an example of how to go about this correctly in propforth.

    Sal is working out a proper tool set for releasing PF6. He's decided to move to GIT, and is looking for an interface tool that works on Mac, Windows, and Linux. Yes, there is the command line, but not everybody in our target audience is equipped to deal with the command line to the depth that would be requirerd. So Sal is looking for a gui for git. We were all set to go with Atlassian Source Tree, but we noticed it does not work with linux, and the other options on the list to dont work with XP. So Sal is going to do some more investigation.

    PF6 itself is stable for a year, FPGA kernel "goes and goes". Only build procedure is changing. The task at hand is to determine an approproate method to distribute the automated build package using git, such that it works on the three main OS platforms, and each produces the identical result.

    FPGA kernel is tiny, should go over well for long term. FPGA goal is use fewest resources, leaving as many extra resources to built virtual circuits, rather than physical circuits. And of course the identical PF6 kernel will run on the physical prop and tthe FPGA prop, the only different being the that FPGA prop will not contain the resources that are unused on the physical prop.

    Next week: I should recieve a version of PF6 for GIT testing.
  • caskazcaskaz Posts: 957
    edited 2015-09-02 06:47
    I wrote code for LPS25H(pressure-sensor).
    Prop0 Cog6 ok
    i2c_detect
             0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
    00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- -- -- -- -- -- 5C -- -- --  h50:eeprom  h5C:LPS25H
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    i2c_device:3
    
    
    Prop0 Cog6 ok
    disp_reg
    Register        Value
            8       0
            9       0
            A       0
            F       BD
            10      F
            20      0
            21      0
            22      0
            23      0
            24      0
            25      0
            27      0
            28      0
            29      48
            2A      2F
            2B      0
            2C      0
            2E      0
            2F      20
            30      0
            31      0
            39      38
            3A      0
    Prop0 Cog6 ok
    measure_1shot
    29 .9 degree    101654 Pa
    29 .5 degree    101659 Pa
    29 .5 degree    101656 Pa
    29 .4 degree    101656 Pa
    29 .4 degree    101660 Pa
    29 .4 degree    101659 Pa
    29 .3 degree    101659 Pa
    29 .3 degree    101658 Pa
    29 .3 degree    101655 Pa
    29 .3 degree    101655 Pa
    29 .3 degree    101658 Pa
    Prop0 Cog6 ok
    measure_FIFO
    28 .9 degree    101610 Pa
    28 .9 degree    101613 Pa
    28 .9 degree    101612 Pa
    29 .2 degree    101609 Pa
    29 .8 degree    101600 Pa
    30 .1 degree    101606 Pa
    30 .3 degree    101614 Pa
    30 .5 degree    101609 Pa
    30 .2 degree    101614 Pa
    30 .0 degree    101612 Pa
    29 .9 degree    101611 Pa
    29 .8 degree    101615 Pa
    29 .8 degree    101617 Pa
    29 .7 degree    101621 Pa
    Prop0 Cog6 ok
    
    101654 Pa=1016.54hPa=1016.54mbar
  • Modified LPS25H a little.
    Prop0 Cog6 ok
    disp_reg
    Register:hex            Value[hex]
    REF_P_XL:8              0
    REF_P_L:9               0
    REF_P_H:A               0
    WHO_AM_I:F              BD
    RES_CONF:10             F
    CTRL_REG1:20            0
    CTRL_REG2:21            0
    CTRL_REG3:22            0
    CTRL_REG4:23            0
    INT_CFG:24              0
    INT_SOURCE:25           0
    STATUS_REG:27           0
    PRESS_OUTXL:28          0
    PRESS_OUT_L:29          48
    PRESS_OUT_H:2A          2F
    TEMP_OUT_L:2B           0
    TEMP_OUT_H:2C           0
    FIFO_CTRL:2E            0
    FIFO_STATUS:2F          20
    THS_P_L:30              0
    THS_P_H:31              0
    RPDS_L:39               38
    RPDS_H:3A               0
    
    Prop0 Cog6 ok
    measure_FIFO
    27 .4 degree    1014 .54 hPa
    27 .4 degree    1014 .69 hPa
    27 .4 degree    1014 .74 hPa
    27 .4 degree    1014 .61 hPa
    27 .4 degree    1014 .54 hPa
    27 .4 degree    1014 .54 hPa
    27 .4 degree    1014 .48 hPa
    Prop0 Cog6 ok
    measure_1shot
    27 .4 degree    1014 .53 hPa
    27 .4 degree    1014 .52 hPa
    27 .4 degree    1014 .52 hPa
    27 .4 degree    1014 .53 hPa
    27 .4 degree    1014 .56 hPa
    27 .4 degree    1014 .53 hPa
    27 .4 degree    1014 .47 hPa
    Prop0 Cog6 ok
    
  • Hi All

    PropForthV5.5 is now on GitHub. Please take a look and tell me if this looks right:

    https://github.com/prof-braino/PropForth5.5.git

    For now, this is just the ready to use kernels and extensions in the PropForth5.5-20130316 directory, and the build and test automation scripts and tools in the mygo directory.

    There is no longer a nested zip file in the misc subdirectory.

    Anyone have any suggestions on what to do about the wiki and downloads sections from google code? https://code.google.com/p/propforth/

    Can the wiki pages be imported? I probably should read and edit or delete each page one by one, some are old and some were trash from start, but many probably can be brought in as is.

    What about all the PDFs and docs that folks contributed? Can I put those in a Documentation directory, is that kosher?

    Thanks
  • caskazcaskaz Posts: 957
    edited 2015-09-08 01:09
    Rotated HDD-motor.
    Only rotating slowly because not used H-bridge.

    [video] [/video]
  • caskazcaskaz Posts: 957
    edited 2015-09-08 11:39
    Rotated HDDmotor to cw and ccw.
    [video] [/video]
  • Used SLA5064.

    [video] [/video]
  • Code for i2c charcterLCD(ST7032i).

    [video] [/video]
  • caskazcaskaz Posts: 957
    edited 2015-09-13 14:04
    i2c_charLCD use i2c_utility_0.3.
  • caskazcaskaz Posts: 957
    edited 2015-09-16 03:18
    switch-input code
    {
                    3.3V
                     |
                    10kohm
                     |
          P14 -------|
                     |
                    sw
                     |
                    GND
                    
                    |\|
          P15 ------| |-----220ohm---GND  
                    |/| 
                    LED           
    }
    
    \ =========================================================================== 
    \ Constants 
    \ =========================================================================== 
    d14 wconstant swpin
    d15 wconstant ledpin
    d4000000 constant 50msec
    swpin >m constant swMask
    ledpin >m constant ledMask
    
    \ =========================================================================== 
    \ Variables 
    \ =========================================================================== 
    wvariable swState
    wvariable debounce
    wvariable lastswState
    variable lastDebounceTime
    wvariable alternate
    
    \ =========================================================================== 
    \ Main
    \ =========================================================================== 
    
    \ read current sw-state
    \ ( -- n1 ) n1:1[sw:off] 0[sw:on]
    : rd_sw ina COG@ swMask and if 1 else 0 then ;
    
    
    : init
    \ Set initial values
    1 swState W!
    0 lastDebounceTime L!
    1 lastswState W!
    0 debounce W!
        
    ledMask dira COG@ or dira COG!     \ Set led to uutput
    ;
    
    \ On/Off switch
    \ LED on when pushed sw, LED off when released sw
    \ ( -- )
    : sw1
    init
    begin
         \ Read current sw and check if pushed or released
         rd_sw dup lastswState W@ <>                      
         if
              \ If sw is under debouncong
              debounce W@ 0=
              if
                   cnt COG@ lastDebounceTime L!           
                   1 debounce W!
              then
         else
              0 debounce W!
         then
         
         debounce W@
         if
              cnt COG@ lastDebounceTime L@ - 50msec >    
              if
                   \ Update current swState and lastswState
                   dup
                   swState W! lastswState W!    
              else
                   drop
              then
         else
              drop
         then
                            
         \ Activate LED when sw-on
         outa COG@ ledMask 
         swState W@                    
         if invert and else or then              
         outa COG!     
              
         fkey? swap drop
    until
    ;     
    
    \ Alternative switch
    \ Switching LED on/off when pushed sw
    \ ( -- )
    : sw2
    init
    1 alternate W!   
    ledMask dira COG@ or dira COG!     \ Set led to uutput
    
    begin
         \ Read current sw and check if pushed or released
         rd_sw dup lastswState W@ <>                      
         if
              \ If sw is under debouncong
              debounce W@ 0=
              if
                   cnt COG@ lastDebounceTime L!           
                   1 debounce W!
              then
         else
              0 debounce W!
         then
         
         debounce W@
         if
              cnt COG@ lastDebounceTime L@ - 50msec >    
              if
                   \ Treat only when pushed switch
                   lastswState W@ 
                   if                    
                        lastswState W!                               \ Update current lastswState
                        alternate W@ if 0 else 1 then swState W!     \ Set swState  
                        alternate W@ if 0 else 1 then alternate W!   \ set alternate
                   else
                        lastswState W!                               \ Update current lastswState
                   then
              else
                   drop
              then
         else
              drop
         then
                            
         \  Swiching LED on/off when sw-on
         outa COG@ ledMask 
         swState W@                 
         if invert and else or then              
         outa COG!     
              
         fkey? swap drop
    until
    ;     
    
  • caskazcaskaz Posts: 957
    edited 2015-09-29 09:30
    Wrote 'DogLifeClock'code.
    Not yet 'saveforth'.
    Not yet HW.

    Analog Clock indicate Dog's TimeStream.(It pass faster than human)
    Upper line on charaLCD display current date and time.
    Lower line on it display Dog'd birthday and livingdays.

    I will short Dead-contact when Dog is dead.
    Data is witten in eeprom.
    AnalogClock stop.
    CharLCD display merely Dog's birthday and Deathday and livingdays.

    [video] [/video]
  • TorTor Posts: 2,010
    Well, I hope your dog is alive and well still? For a long time, I hope.. is it a Shiba? There's one just outside, she wants dinner now so I'll better see to it.

    -Tor
  • caskazcaskaz Posts: 957
    edited 2015-09-29 10:27
    Hi.
    Of course, she is energetic now.
    Image is photo in yestaday.

    She is pure Shiba.
    Her father name is Tetsuhidemarugou.
    Her mother name is Tamahanahimegou.
    ...I had never seen them.
    562 x 1000 - 77K
  • caskazcaskaz Posts: 957
    edited 2015-10-01 11:58
    Updated encorder_0.5.f
    fl
    
    {
    PropForth 5.5
    2015/10/01 20:59:53
    
             3.3V
              |
            10kohm
              |     A -----------
    P3 --------------| Rotary    |
             GND ----|  Encorder |
    P4 --------------|           |
              |     B -----------
            10kohm
              |
             3.3V
             
         prev  current status
           0     0      stop           0
           0     1      CW             1
           0     2      CCW           -1
           0     3      invalid(=stop) 0
           4     0      CCW           -1
           4     1      stop           0
           4     2      invalid(=stop) 0
           4     3      CW             1
           8     0      CW             1
           8     1      invalid(=stop) 0
           8     2      stop           0
           8     3      CCW           -1
           C     0      invalid(=stop) 0
           C     1      CCW           -1
           C     2      CW             1
           C     3      stop           0
             
    }
    
    \ =========================================================================== 
    \ Constants 
    \ =========================================================================== 
    3 wconstant phaseA
    3 phaseA lshift constant m_encorder
    variable encoder_tbl -4 allot 
    0 l, 1 l, -1 l, 0 l, 
    -1 l, 0 l, 0 l, 1 l, 
    1 l, 0 l, 0 l, -1 l, 
    0 l, -1 l, 1 l, 0 l, 
    
    \ =========================================================================== 
    \ Variables 
    \ =========================================================================== 
    variable pos
    wvariable prev
    
    \ =========================================================================== 
    \ Main 
    \ =========================================================================== 
    \ Count up/down encorder's position
    \ ( -- )
    : encorder
    0 pos L!
    0 prev W!
    begin                                                          
         ina COG@ m_encorder and phaseA rshift        \ Shift right to get current
         dup                                                        
         prev W@ or 4* encoder_tbl + L@               \ Get value 
         pos L@ + pos L!                              \ Update pos
         2 lshift prev W!                             \ Save prev to shift 2bit left 
    0 until
    ;
    
    \ Display position
    : test 
    c" encorder" 5 cogx
    begin pos L@ . d10 delms fkey? swap drop until
    5 cogreset 
    ;
    
  • Updated DogLifeClock.
    Setting year/month/day/weekday/hour/minute/sec by RotaryEncorder.
  • Updated i2c_utility_0.4.f.
    Code also are re-written

    DS1337:rtc
    DS3231:rtc
    ST7032i:i2c-characterLCD
    PCA9546:I2C-bus-switch
    PCF2129:rtc
    PCF85263:rtc
  • caskazcaskaz Posts: 957
    edited 2015-10-08 04:30
    Upload file max 2M!!
  • Greetings all.

    As a newcomer to propForth (but neither forth nor the propeller), can I say I'm having a whale of a time with it! Thank you, to all, for what is obviously a labour of love!

    I apologise if there is a more appropriate place for a 'new boy' to ask a question, but I've spend a good few hours getting as familiar with the various sources as I can but I'm left with one bothersome problem that I can't answer. When the console handler code/cog fires up, it seems to be set to an assumed 132 col terminal mode - as seen in the output of some words, e.g. "words"! In my intended application, only an 80 col display will be connected.

    So my question is this: is there some system-wide setting I have yet to find to set this, or is it simply down to my code to manage? Are the words like "words" simply built for 132 col output?

    Apologies if this is a dumb, code-blind-on-a-Sunday-afternoon, question.

    Pablo
  • caskazcaskaz Posts: 957
    edited 2015-10-23 09:45
    I wrote code for GestureSensor(APDS9960).
    But not yet near and far.
    This code have bugs yet.

    Refer charlieplexing about 8x8Matrix below;
    http://forums.parallax.com/discussion/146693/propforth-v5-5-is-available-for-download/p18
    Prop0 Cog6 ok
    i2c_detect
         0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
    00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- -- <-- APDS9960
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <-- eeprom
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    i2c_device:2
    
    
    Prop0 Cog6 ok
    

    [video] [/video]


    Hi Pablo2000.
    I don't understand what is your problem.
    What is 132 col terminal mode?
    Problem about TeraTerm?
  • @Pablo

    Welcome to propforth and the parallax forums!

    words is a diagnostic, and was arbitrarily set at 132 columns. My system displays 132 columns, and nobody said otherwise at the time. Also I am the primary source of feedback to the developer, so my requests tend to make it into the requirements. :)

    FYI, we tend to use the prop embedded, and use the PC display during development. So we use teraterm (windows) or minicom (linux) and adjust columns displayed by stretching the window on the PC as needed. For narrow displays, we don't use the diagnostic, or just let it wrap. For example, I tend to use bluetooth HC05 on the serial port and use my crazy smart phone as a terminal in the field, in portrait mode I just let it wrap, in landscape I let it scroll. (I write the display for landscape so they don't scroll, mostly).

    That being said:

    You can redefine the definition for words to use 80 columns, or you can change the definition in the kernel.

    Changing the kernel involves figuring out the build and test automation. This is a bit involved for first timers, but is being re-arranged in PropForth6 and should (might) be easier to figure out if you wait a bit longer.

    Re-writing the definition for words to use 80 columns would only cost a few bytes, and would be a good exercise in familiarizing yourself with propforth.

    The entire kernel is present as source code, and build automation uses the high level source to build itself. If you look in the mygo.zip archive (buried in the Propforth5.5.zip download) this has everything we use to build the kernels. The source definition for words is in there (I hope).

    I am switched over to linux and am working on PF6, so I can't easily get back to windows and PF5.5; but if 80/132 columns is a show-stopper I can try to set something up if you get stuck.

  • prof_brainoprof_braino Posts: 4,313
    edited 2015-10-25 19:02
    +LOOP

    we had a question about +LOOP

    +LOOP is an alternate to the do...loop construct, and like loop, can only be used inside a colon definition.

    The primary construct using LOOP automatically increments the loop counter by +1, and then jumps to the "do" for another iteration.

    +LOOP takes the top value from the stack, and increment the loop counter by that amount.

    Compare these two examples:
    : test 10 0 do i . loop ;
    

    will print the i iterations

    9 8 7 6 5 4 3 2 1 0
    : test+loop 10 0 do i . 2 +loop  ;
    

    will print by 2

    8 6 4 2 0

    using a 3 will count by threes, etc.

    I never tried changing the loop increment value on the fly, or counting by negative numbers. But now that you mention it, this could be very interesting to experiment with.

  • @prof_braino
    Many thanks for the reply.

    My immediate application is also embedded, but with a status display, which for legacy reasons is 80 wide. Just wanted to check if there was any fundamental aspect of serial/terminal handling that I needed to be aware of. If I know I can just completely manage it myself, no problem :)

    The main reason for investigating propforth for this is the work you have done with multi-prop setups and making a 'virtual prop' with lots of cogs and pins which can have tasks allocated at runtime. I know this is technically mostly experimental, from a support point of view, but you've already done most of the work for me - fantastic! I'll let you know how I get on.

    You mentioned v6 ... is there a timescale for this, or 'as and when'?

    P
  • We're working on release now. We thought release was imminent, but work got in the way, for about the last 23 months. One new hurdle is I have to learn git and github. Git is cool, but its another personal tool written for the developer's personal convenience, and is not necessarily the best for a casual user. So I have to get to a "more than casual user" level, and make a process that anybody can follow to get the identical result as the team members. Its a fun puzzle, but it takes a little time.

    I will update the PF6 thread (or maybe start a fresh one) when I get my act together.
  • Feel free to message with any questions you have regarding github. We (the development team) use it for the 'picochess' project (a standalone chess system, see http://www.picochess.org/).

    Once you get your head around it (and there's a git joke in there) it's pretty easy and very flexible.
  • Hi prof_braino.
    : test 0 d10 do i . -2 +loop ;
    

    This result "10 Prop0 Cog6 ok".
    Word'do..+loop" cannot use negative number as increment-part.

    Same as PF6?
  • PF6 should be the same as PF5.5 and earlier. PF6 is only changing the build automation to include the FPGA prop(s) and add the pooled multitasker kernels to the standard DevKernel, EEpromKernel, and SDkernel.

    I think that "do...loop" constructs probably terminates when the end value is less than the start value, so the loop terminates at the "do" before it even sees the -2 and the +loop. Thanks for testing this.
Sign In or Register to comment.