Tachyon NEON V5 (FAT32 and Ethernet Servers in 32kB EEPROM!)

1131416181921

Comments

  • Ok Vacation is over and back to work I âm scheduled 6 days straight so I may not get to try this out for a while. Damn auto complétion is driving me nuts Right now il is trying to do everything in French!
    Jim
  • CtlAltDelCtlAltDel Posts: 38
    edited 2018-10-23 - 05:58:24
    Hi all,

    A question regarding inter-cog sharing of variables: I have written a custom ROM that continually reads an external ADC. The values that the cog reads are needed (after a certain amount of processing) by another cog. Am I correct in assuming that the way to do this is to declare a variable in the 'supervisory' cog, and then have the supervisory cog, when it loads the ROM, pass the address of the variable as a LOADCOG parameter, which the ROM cog then uses to write the data to?

    Cheers!

    Andrew
  • CtlAltDel wrote: »
    Hi all,

    A question regarding inter-cog sharing of variables: I have written a custom ROM that continually reads an external ADC. The values that the cog reads are needed (after a certain amount of processing) by another cog. Am I correct in assuming that the way to do this is to declare a variable in the 'supervisory' cog, and then have the supervisory cog, when it loads the ROM, pass the address of the variable as a LOADCOG parameter, which the ROM cog then uses to write the data to?

    Cheers!

    Andrew

    Yes, this long address is passed in 14-bits of the destination register that is used in the coginit instruction itself.
    COGINIT ( dest -- cog ) PAR(14), CODE(14), NEW(1),COG(3)
    

    When you load a ROM this ends up calling coginit so "par" is the full long address that ends up being encoded into coginit. If your code doesn't use PAR then it doesn't matter and this value can be zero.
    pub LOADCOG ( name cog par  -- )
    

    In VGA.FTH you can find an example:
    " VGA32x15  " 3 vgapars LOADCOG
    

    Then vgapars is the address of a data structure that in this case holds the setup parameters for VGA.
    TABLE vgapars PRIVATE
        0 ,                --- 0:status              ' 0/1/2 = off/visible/invisible - read-only
        1 ,                --- 1:enable              ' 0=off (disabled completely)
        16 7 + ,           --- 2:pins                ' vga pin group 0,8, or 16.
        %1000 ,            --- 3:mode                ' %tihv = tile,interlace,hpol,vpol   write-only
        vgabuf , colors ,  --- 4:screen 5:colors     ' pointers to screen (words) and colors (longs)
        32 , 15 ,          --- 6:cols 7:rows         ' horz and vert tiles (characters)
        1 , 1 ,            --- 8:hx 9:vx             ' horz and vert tile expansion
        0 , 0 ,            --- 10:ho 11:vo           ' horz and vert offset
        512 , 10 ,         --- 12:hd 13:hf           ' horz display ticks, front porch
        75 , 43 ,          --- 14:hs 15:hb           ' horz synch ticks, back porch
        480 , 11 ,         --- 16:vd 17:vf           ' vert display lines, front porch
        2 , 31 ,           --- 18:vs 19:vb           ' vert synch lines, back porch
        CLKFREQ 2 >> ,     --- 20:rate		         ' tick rate (Hz)
    
    

    So if you have a simple variable then just pass the address of that variable
    long romdata
    "MYNEWROM32" 3 romdata LOADCOG
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • Thanks Peter, supplementary question: if I have uploaded a ROM, then later uploaded a corrected version, both versions appear (although at different addresses). Is there a way to delete ROMs from the EEPROM (e.g. using EFILL)? I've checked the EXTEND source, nothing obvious there.
    Also, after uploading my first ROM, the VGA, UART, HSUART and F32 ROMs are now appearing in the detected ROMs list on bootup - is this a relic of a previous tachyon install?
  • CtlAltDel wrote: »
    Thanks Peter, supplementary question: if I have uploaded a ROM, then later uploaded a corrected version, both versions appear (although at different addresses). Is there a way to delete ROMs from the EEPROM (e.g. using EFILL)? I've checked the EXTEND source, nothing obvious there.
    Also, after uploading my first ROM, the VGA, UART, HSUART and F32 ROMs are now appearing in the detected ROMs list on bootup - is this a relic of a previous tachyon install?

    The old system used from $E000 onwards but the new ones are from $C000 onwards. Best to wipe that whole section with $C000 $4000 $FF EFILL. It might be possible to replace a ROM if the new ROM was the same size, but I will have to add some functionality to permit it to do that. As it is, I'm having too much fun with the P2 :)


    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • Understood! Thanks again Peter :smile:
  • Sorry to bother you yet again Peter - having problems getting the ROM to write values to the hub variable. To help get to the bottom of it I have written a simple ROM that should do nothing but write $AAAAAAAA to the supplied hub address over and over:
    {{ testrom.spin }}
    
    PUB start
    { }
    
    CON
    
    DAT
    { }
    	org
    	byte ".ROM"                       ' ROM signature
    	word @testend-@testrm               ' size
    	byte "TESTRM    "                 ' name
    	'     1234567890
    
    	org
    							
    testrm
    			wrlong	val, PAR
    			jmp		#testrm
    
    val		long		$aaaaaaaa				
    testend
    			fit 496
    

    I compiled it to a binary:
    ./bstc.linux -b testrom.spin
    

    converted it to hex:
    python bh.py --binaries=0,testrom.binary
    

    and added the SAVEROM command:
    SAVEROM
    :20000000001BB70000821000380040003400440028000200240000002E524F4D0C0054457D
    :180020005354524D20202020F0053C0800007C5CAAAAAAAA3200000017
    :00000001FF
    

    Here's the resulting output:
    Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000                                                          
      *** MODULES ***  Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000                                         
    2ECA: TOOLS            DEV TOOLS                                                                                        
    1A00: EXTEND           Primary extensions to TACHYON V5 kernel  - 18104-0900                                            
                                                                                                                            
                                                                                                                            
    FREQ = 128.00MHZ                                                                                                        
    *** INITS ***                                                                                                           
    *** ROMS ***                                                                                                            
    C01C: TESTRM       12                                                                                                   
    *** I2C ***                                                                                                             
    $A0 EE/RTC                                                                                                              
    I/O =  31 :UHUU 27 :~DD~ 23 :~~~~ 19 :~~~~ 15 :~~~~ 11 :~~~D 7 :~~~~ 3 :~~~~                                            
    INTERCOM:                                                                                                               
                                                                                                                            
    CODE:$3AA0 = 14496 bytes                                                                                                
    NAME:$5E08 = 5624 bytes                                                                                                 
    DATA:$75D9 = 201 bytes                                                                                                  
    FREE:      = 9064 bytes                                                                                                 
     Data Stack (0)                                                                                                         
    Mon, 01 Jan 2001 00:00:01 UTC                                                                                           
    --------------------------------------------------------------------------------                                        
    ...  long testvar                                                                                                       
    ...  " TESTRM"  7 testvar LOADCOG -->  ok                                                                               
    ...  testvar @ .LONG --> 0000.0000 ok                                                                                   
    ...  testvar @ .LONG --> 0000.0000 ok                                                                                   
    ...  
    

    Instead of AAAA.AAAA, testvar value is 0000.0000

    Where am I going wrong?
  • It looks fine except that the name must be exactly 10 characters with the way it was done so just use
    " TESTTRM   " 7 testvar LOADCOG
    

    I suppose I could process shorter strings and also make sure we get a success/fail response.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • Yes, that sorted it - many thanks again Peter!!
  • Does anyone use the F32 ROM?

    I need to populate an SPI flash chip (connected to the P1) with a LUT of 20-bit log values for use in another application, but I'm having difficulty figuring out what how to call the functions in the ROM. From reading the source, I gather that your application provides the address of the first of 3 consecutive longs: cmd, fnuma, fnumb. The command is stored in cmd, and the numbers stored in fnuma and fnumb. A non-zero cmd causes F32 to inject the contents of cmd as an instruction to call the desired function. I've tried generating a list file from the F32 spin source, and using the compiled call table entries as cmds, but no go.

    Can anyone shed a ray of light here?
  • Actually never mind - I generated a text file programmatically that consists of lines of the format:
    address value WRFLASH
    

    WRFLASH writes 'value' into the flash at 'address'

    I can then 'select all' and paste a la EXTEND...much more sensible :smile:
  • Peter JakackiPeter Jakacki Posts: 8,795
    edited 2018-10-24 - 08:35:05
    CtlAltDel wrote: »
    Does anyone use the F32 ROM?

    I need to populate an SPI flash chip (connected to the P1) with a LUT of 20-bit log values for use in another application, but I'm having difficulty figuring out what how to call the functions in the ROM. From reading the source, I gather that your application provides the address of the first of 3 consecutive longs: cmd, fnuma, fnumb. The command is stored in cmd, and the numbers stored in fnuma and fnumb. A non-zero cmd causes F32 to inject the contents of cmd as an instruction to call the desired function. I've tried generating a list file from the F32 spin source, and using the compiled call table entries as cmds, but no go.

    Can anyone shed a ray of light here?

    I have the F32 ROM in there for anyone who wants to use FP but I don't use it myself and so I have never written any of the interface and conversion functions for it although you could probably look at the Spin source if you wanted to give it a go :)

    There is some basic test code I used to make sure it was working fine. When I find it later on I will post it.


    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • Hi Peter,

    Yep I read the source (I mentioned in my previous comment I generated a list file to try and figure out the command mapping) but meh, my text file is a much easier way to solve the problem. I need the external LUT as I'm doing some fast integer PI control, and have to linearise the input quantity, which has an exponential relationship with the control output.

    I'd be curious to see your example source, though.
  • Peter,
    Did you ever create the code to use the counters to measure incoming PWM signals?
    Jim
  • LtechLtech Posts: 230
    edited 2019-01-27 - 13:47:15
    Little help please.
    I have a +P8 IOT5500 set.
    I try to learn Tachyon.

    I use the recipe:
    Build sequence for an IoT5500 is:
    * Kernel
    * EXTEND
    * P8 in more/hardware headers/
    * EASYFILE (combined SDCARD + EASYFILE)
    * COMPACT
    * BACKUP
    * EASYNET (combined W5500 + EASYNET)

    I start install NEON, with BST and 5r4.spin. loading , working minimal.
    I can load EASYFILE with serial com, it is working.
    Then I try to install the last (more/hardware headers/) P8.FHT file from dropbox, but this give errors.
    Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000[5n
    *** MODULES *** Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000
    2ECA: TOOLS DEV TOOLS
    1A00: EXTEND Primary extensions to TACHYON V5 kernel - 18104-0900


    FREQ = 96.00MHZ
    *** INITS ***
    NO ROMS
    *** I2C ***
    $A0 EE/RTC
    I/O = 31 :UHU~ 27 :U~~U 23 :~~~U 19 :~~U~ 15 :~~~~ 11 :~~~~ 7 :~~~~ 3 :~~UU
    INTERCOM:

    CODE:$3AA0 = 14496 bytes
    NAME:$5E08 = 5624 bytes
    DATA:$75D9 = 201 bytes
    FREE: = 9064 bytes
    Data Stack (0)
    Mon, 01 Jan 2001 00:00:00 UTC

    ... TACHYON [~ ??? --> Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000
    ok
    �0001
    �0002 not found
    �0003
    �0004
    �0005
    �0006
    �0007
    �0008
    �0009
    �0010
    �0011 ??? ??? --> ok
    �0012 ??? ??? --> ok
    �0013 ??? ??? --> ok
    �0014 ??? ??? --> ok
    �0015 ??? ??? --> ok
    �0016 ??? ??? --> ok
    �0017 ??? ??? --> ok
    �0018 ??? ??? --> ok
    �0019 ??? ??? --> ok
    �0020 ??? ??? --> ok
    �0021
    �0022
    �0023
    �0024
    �0025
    �0026
    �0027 ??? ??? ??? ??? ??? ??? --> ok
    �0028 ??? ??? ??? ??? ??? ??? --> ok
    �0029
    �0030
    �0031
    �0032
    �0033
    �0034
    �0035
    �0036
    �0037
    �0038
    �0039
    �0040
    �0041 ??? in !PCB at &WNCS

    �0042 ??? in !PCB at &SFCS

    �0043 ??? in !PCB at &SDCS

    �0044
    �0045
    �0046 ??? --> ok
    �0047 ??? ??? --> ok
    �0048
    �0049 ???
    �0050 -->

    End of source code, 0039 errors found Load time = 1.8
    Code bytes used = 102
    Name bytes used = 60

    CODE:$3B06 = 14598 bytes
    NAME:$5DCC = 5684 bytes
    DATA:$75D9 = 201 bytes
    FREE: = 8902 bytes
    Data Stack (1)
    $0000.0598 - 1432

  • @Ltech - I've zipped all the V5.4 files plus a few extra that you should be using. I notice that one file you used reported "TACHYON [~" so straightaway I knew you must be using some older V3 file. The newer files also fully support dynamic pin allocation so there is no need for a P8 file but you can make sure it is setup correctly with this:
    ( P8 CONFIG )
    &27.24.26.25 SDPINS
    &17.20.19.18 WIZPINS
    
    When you do a BACKUP those settings will be locked in unless overridden.

    After you load the Prop with Tachyon5r4.spin you should load EXTEND, then EASYFILE then RECLAIM private headers, then load EASYNET and optionally RECLAIM private headers. Paste in the SDPINS and WIZPIN configuration and BACKUP. I will test this out myself just to make sure.

    I'll pm you shortly with some updates and other info too.


    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • LtechLtech Posts: 230
    edited 2019-01-27 - 14:26:17
    Ok, when loading EASYNET , I get "0838 Dictionary full! *error*".
    after EASYFILE, reclaim give "Reclaimed 1,028 bytes ... "


    Memory full I guess ?

  • Ltech wrote: »
    Ok, when loading EASYNET , I get "0838 Dictionary full! *error*".
    after EASYFILE, reclaim give "Reclaimed 1,028 bytes ... "


    Memory full I guess ?

    I'm just getting around to checking it although it should have enough memory. I'll let you know shortly....


    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • @Ltech - The trick was to do a FORGET TOOLS after loading EXTEND since these were extras that aren't needed. After loading EASYFILE you can RECLAIM and then load EASYNET. If you want FTP you can load that too although it seems that FTP.FTH needs these two lines added at the start:
    1	:= FTP
    2	:= FTPDAT
    


    End of source code, 0000  errors found  Load time = 9.0
    Code bytes used = 1292
    Name bytes used = 240
    
    CODE:$4EB2 = 19634 bytes 
    NAME:$5604 = 7676 bytes 
    DATA:$78EA = 986 bytes 
    FREE:      = 1874 bytes 
     Data Stack (0)
    
     ok
    ...  
    ...  
    ...  BACKUP --> BACKUP  ok
    ...  
    
      Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000
    CODE:$4EB2 = 19634 bytes 
    NAME:$5604 = 7676 bytes 
    DATA:$78EA = 986 bytes 
    FREE:      = 1874 bytes 
     Data Stack (0)
    
    CARD: SL08G SD03.80 #D20D.AA60 2016/2 !C0FF.80AF 1,527us
    FAT: #CB4A.74CF mkfs.fat IOT5500     FAT32   7,947,157,504 bytes (4kB clusters)
    
    Setting default IP configuration 
    *** Tachyon Forth EASYNET Network Servers and EASYFILE File Server *** 
    
    
    NETWORK STATUS:
    LINK DOWN
    HARDWARE: WIZnet W5500 V4
    SRC IP    &192.160.0.33
    MASK      &255.255.255.0
    GATEWAY   &192.160.0.1
    MAC       02.FF.65.00.51.20.
    SKT HH:MM:SS MODE  PORT  DEST TXRD TXWR RXRD RXWR RXSZ  IR STATUS            IP ADDR
    #1   00:00:02 TCP  18516 18516 0000.0000.0000.0000.0000. 00 14 14              &0.0.0.0
    #3   00:00:02 TCP  25185 18516 0000.0000.0000.0000.0000. 00 14 14              &0.0.0.0
    
    * Servers running * 
    
    --------------------------------------------------------------------------------
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • LtechLtech Posts: 230
    edited 2019-01-27 - 22:21:03
    It compiles.

    but using the +P8 bin original file, I can read the SD card(A).
    With Neon, I do not have the SD(A)

    EDIT: I do not have the same SD(A) card of 8G, but an other SD(B) of 32G works in NEON?

    In ESYFILE.NET I see "pub SDPINS ( ce-miso-mosi-clk -- )"
    Is this correct with " &27.24.26.25 SDPINS ( SD8 )" ???


    For FTP, I do not know where to put the two command. At top of the file ?

    Thank-you
    Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000[5n
    CODE:$49A6 = 18342 bytes
    NAME:$56F4 = 7436 bytes
    DATA:$78B3 = 931 bytes
    FREE: = 3406 bytes
    Data Stack (0)

    *** Tachyon Forth EASYNET Network Servers and EASYFILE File Server ***


    NETWORK STATUS:
    LINK DOWN
    HARDWARE: WIZnet W5500 V4
    SRC IP &192.168.0.99
    MASK &255.255.255.0
    GATEWAY &192.168.0.1
    MAC 02.FF.BD.5B.CE.06.
    SKT HH:MM:SS MODE PORT DEST TXRD TXWR RXRD RXWR RXSZ IR STATUS IP ADDR
    #3 00:00:01 TCP 71 55296 0000.0000.0000.0000.0000. 00 14 14 &0.0.0.0

    * Servers running *


    ... ls
    CARD: SD08G PH27.30 #9242.DF01 2016/10 !C0FF.8075 9,983us
    FAT: #0000.0000 �������� ����������� ��������0 bytes (0kB clusters)

    �����������...
  • Peter JakackiPeter Jakacki Posts: 8,795
    edited 2019-01-28 - 03:13:29
    If you look in the V5 Dropbox folder you will find all the current files including FTP.FTH which has this already added to the start:
    TACHYON V5
    
    1	:= FTP
    2	:= FTPDAT
    
    pri .IPD			4 FOR DUP 24 >> PRINT 8<< DUP IF ',' EMIT THEN NEXT DROP ;
    
    

    BTW, your SD looks a little strange since it is reporting a sector read speed + latency of almost 10ms plus it sounds like it is not formatted. Just try MOUNT again and then list the directory as maybe this card is really slow and we may need to adjust some timeouts to compensate.

    For reference, this is my Sandisk 8GB.
    CARD: SL08G SD03.80 #D20D.AA60 2016/2 !C0FF.80AF 1,527us
    FAT: #CB4A.74CF mkfs.fat IOT5500     FAT32   7,947,157,504 bytes (4kB clusters)
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • I'll be right back to SAVEROM.

    Now I have tried from your zip file, and it will still not succeed in making a SAVEROM.
    I can see that some words are removed, including GET8 and roms, and maybe more that are used in SAVEROM.

    When I use the binary file, SAVEROM works well.


    In the one that doesn't works: 1A00: EXTEND Primary extensions to TACHYON V5 kernel - 18104-0900
     
    In the one that works: 1980: EXTEND Primary extensions to TACHYON V5 kernel - 180814-1145


    Is it possible to get a copy of the EXTEND.FTH that works?
      Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000
     Cold start - no user code - setting defaults  
    
    --------------------------------------------------------------------------------
    ...  TACHYON V5 -->   Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000
    0100  -->  ok
    0200 
    0300  -->  ok
    0400  -->  ok
    0500  -->  ok
    0600 
    0700  -->  ok
    0800 
    0900  -->  ok
    1000  -->  ok
    1100 
    1200  -->  ok
    1300  -->  ok
    1400  -->  ok
    1500  -->  ok
    1700  -->  ok
    1800 
    1900 
    2300  -->  ok
    2400  -->  ok
    2500 
    2600 
    2700 
    2775  -->  ok
    
       End of source code, 0000  errors found  Load time = 44.2
    Code bytes used = 8290
    Name bytes used = 3742
    
    CODE:$3A62 = 14434 bytes 
    NAME:$5AEA = 6422 bytes 
    DATA:$75D9 = 201 bytes 
    FREE:      = 8328 bytes 
     Data Stack (0)
    
     ok
    ...  
    ...  RECLAIM
    Removing R$
    Removing GET8
    Removing lsword
    Removing ~V
    Removing ~MOD
    Removing ncol
    Removing ~I
    Removing ~p
    Removing fnumB
    Removing fnumA
    Removing result
    Removing f32cmd
    Removing .ES
    Removing FINDROM
    Removing NEXTROM
    Removing .rom
    Removing romsz
    Removing roms
    Removing servos
    Removing PWM.TASK
    Removing pwmpins
    Removing pwmfreq
    Removing pwmtbl
    Removing ansi
    Removing brg
    Removing DHTBYTE
    Removing DHTBIT
    Removing dt
    Removing htsav
    Removing htref
    Removing htck
    Removing x1
    Removing ?DEFER
    Removing ,WORD$
    Removing TIMERS
    Removing _job
    Removing CountDown
    Removing .DTS
    Removing .DATEF
    Removing .TIMEF
    Removing WRRTC
    Removing ~S
    Removing RDRTC
    Removing <RTC>
    Removing <RTC
    Removing sec#
    Removing rtc#
    Removing rtc!
    Removing rtc@
    Removing @rtc
    Removing rtc
    Removing day
    Removing wdt
    Removing +TIMER
    Removing ttint
    Removing tid
    Removing EERDW
    Removing RDI2C
    Removing ENDRD
    Removing ~D
    Removing ~1
    Removing *spkr
    Removing CTR!
    Removing ~1
    Removing CTR@
    Removing +CTR
    Removing CTR
    Removing _ctr
    Removing ~S
    Removing ~S
    Removing TXSER
    Removing baudcnt
    Removing trap
    Removing ~v
    Removing (STRIP)
    Removing ATR
    Removing asw
    Removing .PAR
    Removing CUR
    Removing COL
    Removing ESCB
    Removing AEMIT
    Removing ANSI?
    Removing _ansi
    Removing ~P
    Removing .AST
    Removing AS#
    Removing #NUM
    Removing D0=
    Removing pbase
    Removing pflg
    Removing seed
    Removing WAIT!
    Removing ~c
    Removing DROP;
    Removing >SWITCH<
    Removing SWITCH=
    Removing CALIGN
    Removing ulong
    Removing HZCON
    Reclaimed 798 bytes
    ...  HERE $8000 + ' DEFAULTS 2 + W! -->  ok
    ...  @NAMES $8000 + ' DEFAULTS W! -->  ok
    ...  @org W@ $8000 + ' DEFAULTS 4 + W! -->  ok
    ...  
    ...  ?BACKUP --> BACKUP  ok
    ...  REBOOT --> 
    
      Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000
      *** MODULES ***  Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000
    2ECA: TOOLS            DEV TOOLS 
    1A00: EXTEND           Primary extensions to TACHYON V5 kernel  - 18104-0900
    
    
    FREQ = 80.00MHZ
    *** INITS ***
    *** ROMS ***
    *** I2C ***
    $A0 EE/RTC
    I/O =  31 :UHU~ 27 :~~~~ 23 :~~~~ 19 :~~~~ 15 :~~~~ 11 :~~~~ 7 :~~~~ 3 :~~~~
    INTERCOM: 
    
    CODE:$3A62 = 14434 bytes 
    NAME:$5E08 = 5624 bytes 
    DATA:$75D9 = 201 bytes 
    FREE:      = 9126 bytes 
     Data Stack (0)
    Mon, 01 Jan 2001 00:00:02 UTC 
    --------------------------------------------------------------------------------
    ...  
    
      Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540180811.0000
      *** MODULES ***  Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540180811.0000
    4E70: CHARLCD          BUFFERED CHARACTER LCD 
    4D08: ANYKEYS          ANYKEY KEYPAD 171005
    4A68: VGATEXT          VGA text driver (minimal) 180218-0000
    397A: EASYFILE         SDHC card + FAT32 Virtual Memory File System V1.2 171024-0000 
    31A8: TOOLS            DEV TOOLS 
    1980: EXTEND           Primary extensions to TACHYON V5 kernel  - 180814-1145
    
    AUTORUN BOOT 3140
    FREQ = 80.00MHZ
    *** INITS ***
    MOUNT 3FB8
    *** ROMS ***
    *** I2C ***
    $A0 EE/RTC
    I/O =  31 :UHU~ 27 :~~~~ 23 :~~~~ 19 :~~~~ 15 :~~~~ 11 :~~~~ 7 :~~~~ 3 :~~~~
    INTERCOM: 
    
    CODE:$5118 = 20248 bytes 
    NAME:$5A52 = 6574 bytes 
    DATA:$78D6 = 966 bytes 
    FREE:      = 2362 bytes 
     Data Stack (0)
    Mon, 01 Jan 2001 00:00:00 UTC 
    --------------------------------------------------------------------------------
    ...  
    
    Yes Frida is my watchdog!
  • Peter, I do not understand the stuff.

    when I look @ the terminal the port numbers are strange.
    I set " 1 SOCKET 21 PORT!" but get PORT 32292 on the terminal ?
    I can't reach the Wiz using FTP.




    ... 1 SOCKET 21 PORT! --> ok
    ... id --> ok
    ... ifup -->
    *** Tachyon Forth EASYNET Network Servers and EASYFILE File Server ***


    NETWORK STATUS:
    LINK *UP*
    HARDWARE: WIZnet W5500 V4
    SRC IP &192.168.0.99
    MASK &255.255.255.0
    GATEWAY &192.168.0.1
    MAC 02.FF.70.1A.C5.10.
    SKT HH:MM:SS MODE PORT DEST TXRD TXWR RXRD RXWR RXSZ IR STATUS IP ADDR
    #1 00:04:24 TCP 32292 18516 0000.0000.0000.0000.0000. 00 14 14 &0.0.0.0
    #3 00:04:24 TCP 71 18516 0000.0000.0000.0000.0000. 00 14 14 &0.0.0.0

    * Servers running *
    ok
  • I can't check it right now but I'm assuming you have FTP.FTH loaded after EASYNET.FTH and this hooks in automatically for initialization and polling.
    In !FTP the default port is not set, leaving user settings intact. Maybe just try that whole line without the comment for the moment just to make sure something else isn't screwy.
    pub !FTP
    	" anonymous" user$ $!
    	#20 dataport W!			\ Default FTP data port
    	FTP SOCKET sCLOSE TCP ( #21 PORT! ) sOPEN sLISTEN				--- Setup FTP
            ;
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • And the Port number in the serial terminal window ?
    Why are they wrong?

    The P8-W5500 set see my computer, but no web page and no FTP ?




    Serial terminal:

    REBOOT -->

    Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000.[5n
    CODE:$4EB2 = 19634 bytes
    NAME:$55FC = 7684 bytes
    DATA:$78EA = 986 bytes
    FREE: = 1866 bytes
    Data Stack (0)

    CARD: SC32G SD03.80 #5D44.2C2C 2018/10 !C0FF.80C3 1,482us
    FAT: #6435.3434 NONAME FAT32 31,910,789,120 bytes (32kB clusters)

    *** Tachyon Forth EASYNET Network Servers and EASYFILE File Server ***


    NETWORK STATUS:
    LINK *UP*
    HARDWARE: WIZnet W5500 V4
    SRC IP &192.168.0.99
    MASK &255.255.255.0
    GATEWAY &192.168.0.1
    MAC 02.FF.70.1A.C5.10.
    SKT HH:MM:SS MODE PORT DEST TXRD TXWR RXRD RXWR RXSZ IR STATUS IP ADDR
    #0 00:00:02 TCP 18516 57895 0000.0000.0000.0000.0000. 15 14 14 &192.168.0.58
    #1 00:00:02 TCP 32292 59138 0000.0000.0000.0000.0000. 05 14 14 &192.168.0.58
    #3 00:00:02 TCP 71 18516 0000.0000.0000.0000.0000. 00 14 14 &0.0.0.0

    * Servers running *



    ...
  • @Ltech - I will check this shortly but FTP and HTTP modules are added onto EASYNET afterwards but it may seem that there is not enough memory for that even after a RECLAIM. This is because EXTEND has a section called TOOLS that is not normally needed in an EASYNET environment. So after loading EXTEND you should FORGET TOOLS before proceeding to add EASYFILE and EASYNET and then FTP and HTTP. As I said I will check all this but you might also need to do an individual RECLAIM after EASYNET and FTP and HTTP since memory is pretty much used up by then. There might be some optimization I can do so I will see if this is possible when I check it.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • Hi Peter,
    When I load the sensors file it works fine. The problem is the second file it gets overridden by the display file and stop working.

    Thanks Ken
    word mm		--- current ping distance in mm
    word 'c		--- current DHT22 temperature in Celcius *10
    word rh		--- current DHT22 relative humidity *10
    
    --- Task for PING, TEMPERATURE and HUMIDITY ---
    ---	    run this on 3    T  R  ping mm  save   H&T    save  save  wait
    128 bytes regs
    pri SENSORS	3 RUN: regs 8 COG! BEGIN   12 13 DISTANCE mm W!   1 DHT 'c W! rh W! 60 ms AGAIN ; --- 60 ms loop reading variables
    
    --- Add SENSORS as an init at boot
    ' SENSORS +INIT 
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    TACHYON V5
    {  Send DATA to Seetron oLED Display from the DHT22 sensor }
    
     4 COGSTOP \ To run in cog 3 (default)...     CLOCK
    
     FORGET OledDisplay
     module OledDisplay            PRINT" oLED CLOCK & WEATHER  " ;
     
     pub C->F ( n -- n ) --- Celsius to Fahrenheit
      90 50 */ 320 + ;
    
    \ CREATE A DEVICE FOR THE SERIAL LCD ON P0 (use SEROUT instead for normal logic level) 
    \ Display the temperature and humidity
    
    pub SERLCD     9600 SERBAUD EMIT: 0 SEROUT ;
    
    128 bytes clkregs \ each cog needs own registers
    
    pub OledDisplay ( -- )  
    \ main clock run in cog 3
        4 RUN: clkregs 8 COG!
           \   display on  clear display
        SERLCD  $0C EMIT 
       BEGIN
            $01 EMIT \ Home
          1 SPACES
       \ 1 DHT C->F .AS" #~#.#'F  " .AS" #~#.#%RH "
         rh W@ 'c W@ C->F .AS" #~#.#'F  " .AS" #~#.#%RH "  \ DHT22 Data-- rh is humidity 'c is temperature( ACCESS VARS FROM ANY WHERE IN PROGRAM )
         AGAIN ;
        
      ' OledDisplay +INIT \ don't forget the ' or it will not work
        
    END
     BACKUP
     REBOOT
    

  • It looks like the code is out of order and you are FORGETing OledDisplay when there are two words with the exact same name, the module header, and the main clock. Try moving this to the start while renaming the module.
    TACHYON V5
     FORGET [OledDisplay]
     module [OledDisplay]            PRINT" oLED CLOCK & WEATHER  " ;
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
    phone.png
  • Hi Peter,
    The below code is running on two Propeller Chips, one as a tx and one as rx. The data that is transmitted is different on the receive side. tx-> 123
    rx ->249

    tx ->255
    rx->255 (this works)
    Thanks again Ken..
    { First Propeller Chip with 915 MHZ transmitter }  
    
    word hot
    123 hot W!
    pub TS 9600 SERBAUD BEGIN  hot W@ DUP CR . 1 SEROUT 300 ms KEY UNTIL ;
     
    { second Propeller Chip with 915 MHZ transmitter running the code below. }
    
    pub TS1 9600 SERBAUD
       BEGIN
             1 SERIN  . 300 ms KEY CR UNTIL ;
    
  • MJBMJB Posts: 1,135
    edited 2019-05-15 - 11:11:30
    kdewey wrote: »
    Hi Peter,
    The below code is running on two Propeller Chips, one as a tx and one as rx. The data that is transmitted is different on the receive side. tx-> 123
    rx ->249

    tx ->255
    rx->255 (this works)
    Thanks again Ken..
    { First Propeller Chip with 915 MHZ transmitter }  
    
    word hot
    123 hot W!
    pub TS 9600 SERBAUD BEGIN  hot W@ DUP CR . 1 SEROUT 300 ms KEY UNTIL ;
     
    { second Propeller Chip with 915 MHZ transmitter running the code below. }
    
    pub TS1 9600 SERBAUD
       BEGIN
             1 SERIN  . 300 ms KEY CR UNTIL ;
    

    It is easy enough to play a bit more ...
    Make hot a byte and increment it every loop.

    Also make the second loop a bit faster than the first.... just in case.

    Tachyon is made for experimenting....
    Many times faster than looking up the documentation ... or asking ;-)


    Addit:
    Or get really advanced ;-)
    And put the sender ìn its own cog
    And run the receiver on the first prop
Sign In or Register to comment.