Shop OBEX P1 Docs P2 Docs Learn Events
Tachyon NEON V5 (FAT32 and Ethernet Servers in 32kB EEPROM!) - Page 19 — Parallax Forums

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

1161719212225

Comments

  • Peter,
    I hope you are enjoying your vacation. When you get a chance, can you explain how to lookup an entry into a TABLE?
    Jim
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-08-16 04:08
    RS_Jim wrote: »
    Peter,
    I hope you are enjoying your vacation. When you get a chance, can you explain how to lookup an entry into a TABLE?
    Jim

    Hi Jim, I don't know how much of a vacation it is as I'm always run off my feet! :)

    However a TABLE is basically the same as a variable in that it returns the start address of the memory location. In the case of a variable that is declared with byte/bytes,word,words,long,longs etc this memory location is normally in an area separate from code and the dictionary.
    EDIT: Unlike code or data memory any data memory is not maintained between power-ups (unless you BACKUP that data).

    In the case of TABLE it sits in code memory and does not allocate any memory itself but subsequent | or || or , words will compile a byte/word/long into code memory. Therefore a TABLE definition will simply return the start address of this structure that you create and it is up to you to decide how you want to access it. Here is an example of a simple byte lookup table that converts 0..$0F into an ASCII character (although it is very easy to do so without a table).
    TABLE hextbl ( -- ptr )
    	$30 | $31 | $32 | $33 | $34 | $35 | $36 | $37 | $38 | $39 | $41 | $42 | $43 | $44 | $45 | $46 |
    

    You can dump the memory for this and see all the values stored in sequence:
    hextbl 16 DUMP
    
    ...  hextbl 16 DUMP --> 
    0000.5180:   30 31 32 33  34 35 36 37  38 39 41 42  43 44 45 46    0123456789ABCDEF ok
    

    To use it just add in your binary value as an offset and fetch the byte:
    pub BINHEX ( n -- char )	hextbl + C@ ;
    

    Of course you can even mix lengths or arrays etc.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-08-16 03:58
    @ltech - I finally made some time to slowly go through and find out where the system was playing up. It turned out that EASYNET was not discovering the initialization routine !HTTP although it would discover (via the dictionary) the polling routine ?HTTP, and this was causing it a lot of grief.

    The build steps are simple and have been tested many times:
    BUILDING EASYNET
    1 - Load EEPROM with TACHYONxxx.spin kernel
    2 - Paste EXTEND.FTH
    ( SYSTEM REBOOTS WHEN DONE )
    3 - FORGET TOOLS  (HIT THE ENTER TWICE)
    4 - Paste EASYFILE.FTH
    5 - RECLAIM
    6 - Paste EASYNET.FTH
    7 - Paste FTP.FTH
    8 - Paste HTTP.FTH
    
    The system is now complete.
    

    BTW, if you have a running system that performs some kind of initialization at boot-time and you want to add to it or change it then it is best to boot it back up without any active modules running to perform the changes, otherwise start from a clean kernel. To get it to do that you should send a break or reset it but hold down ctrl+A until you get a startup message that says it is <aborting startup>. If it does abort startup and you reload a module for some reason then you will need to reload the initialization for EASYNET like this:
    ' ifup +INIT BACKUP
    
    "ifup" will bring the interface up and also mount the SD card.


    I didn't have an Ethernet port to plug into but everything looks ok.
    *** 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.143.255.255
    GATEWAY   &192.168.0.1
    MAC       02.FF.24.7E.DC.C0.
    SKT HH:MM:SS MODE  PORT  DEST TXRD TXWR RXRD RXWR RXSZ  IR STATUS            IP ADDR
    #1   00:00:02 TCP     21     0 0000.0000.0000.0000.0000. 00 14 14              &0.0.0.0
    #3   00:00:02 TCP  10001     0 0000.0000.0000.0000.0000. 00 14 14              &0.0.0.0
    #4   00:00:02 TCP     80     0 0000.0000.0000.0000.0000. 00 14 14              &0.0.0.0
    
    * Servers running * 
    
    --------------------------------------------------------------------------------
    
  • YESS !

    Now I can start play.
    THANK-YOU for you time putting in Tachyon.

    Note:
    1) you need to put index.htm behind the IP address for webpage from SD card. "http://192.168.0.99/index.htm". Normal site take a blank "GET" automatic to index.htm.

    2) What is the need of "3 - FORGET TOOLS HIT THE ENTER TWICE " ? Before you advice to do reclaim after forget tools.

    3) GETTIME do not work, it freeze "-->" for some times, and do not update ".DT " or give some text.
    SKT HH:MM:SS MODE  PORT  DEST TXRD TXWR RXRD RXWR RXSZ  IR STATUS            IP ADDR
    #4   00:10:16 TCP     80 59235 0000.0000.0000.0000.0000. 00 14 14              &192.168.0.58
    ...   	 HTTP SOCKET -->  ok
    ...  
    ...  ---	 
    ...  
    ...   	 " google.com"  RESOLVE HTTP SOCKET $0C L! -->  ok
    ...  
    ...  ---	 
    ...  
    ...   	 LAN PRINT" GET /"  CR ( Date: Sun, 25 Jan 2015 05:29:52 GMT ) --> 
    

    SKT HH:MM:SS MODE  PORT  DEST TXRD TXWR RXRD RXWR RXSZ  IR STATUS            IP ADDR
    #4   00:07:10 TCP     80 59213 0000.0000.0000.0000.0000. 00 14 14              &192.168.0.58
    ...  
    ...  GETTIME -->
    

    4) FTP trough browser works, FileZilla connect but i do not see the SD card content using anonymous
  • @Ltech -
    3 - looks like the GETTIME uses RESOLVE which is implemented in name only. You could try dummying that with an IP such as 172.217.6.206

    2 - I noticed that I needed an extra enter to make it go to the prompt. That's something I will check but otherwise non-fatal.

    1 - Added an extra line to test for a null GET and insert "index.htm"
    DUP LEN$ 0= IF DROP " index.htm" THEN
    
  • FTP log: I get a time out of the server next to the list dump of the SD card.

    Can I make the time out of the ftp longer ?

    Dump:
    20:40:34	Connecting to server: 192.168.0.99:21.
    20:40:34	Response:  220 WELCOME TO THE TACHYON WIZNET FTP SESSION!
    20:40:34	Command: USER anonymous
    20:40:34	Response:  331 User anonymous OK. Password required
    20:40:34	Command: PASS 
    20:40:34	Response:  230 OK. Current restricted directory is /
    20:40:34	Connected OK.
    20:40:34	Changing directory to /
    20:40:34	Command: CWD /
    20:40:34	Response:  250 okay
    20:40:34	Command: PWD
    20:40:34	Response:  257 "/" is your current location
    20:40:34	Command: FEAT
    20:40:34	Command: TYPE A
    20:40:34	Response:  200 TYPE is now A
    20:40:34	Command: PASV
    20:40:34	Response:  227 Entering Passive Mode with port (192,168,0,99,188,188)
    20:40:34	Command: LIST
    20:40:34	Response:  150 Here comes the directory listing
    20:40:35	Response:  226 Directory send OK
    20:40:36	Command: CWD /
    20:40:36	The server has timed out the connection.
    20:40:36	Disconnected from server.
    20:40:36	Command: QUIT
    
  • Peter,
    I have been experimenting with using the alt_table for the altimeter and seem to be hitting my head against the wall. The first entry in the table is 1 so if I use
    1 1 - alt_table + @ .
    
    I get the first entry into the table. I have found that each entry in the table is 4 bytes so if I take the entry into the table say the tenth entry and enter
    10 1 - 4 * alt_table + .
    
    I get the correct value. However beyond that everything goes sideways.
    Here is a copy of my log file for the session:
    Jim
  • MJBMJB Posts: 1,235
    RS_Jim wrote: »
    Peter,
    I have been experimenting with using the alt_table for the altimeter and seem to be hitting my head against the wall. The first entry in the table is 1 so if I use
    1 1 - alt_table + @ .
    
    I get the first entry into the table. I have found that each entry in the table is 4 bytes so if I take the entry into the table say the tenth entry and enter
    10 1 - 4 * alt_table + .
    
    I get the correct value. However beyond that everything goes sideways.
    Here is a copy of my log file for the session:
    Jim

    if alt_table is a table of longs then you define an 'indexer'as
    - for 0 based indexing
    pub @alt_table ( index -- address ) 4 * alt_table + ;

    - for 1 based indexing
    pub @alt_table ( index -- address ) 1- 4 * alt_table + ;

    then
    the 'getter'
    pub alt_table@ ( index -- valuelong ) @alt_table @ ;


    and
    if you give the full code - here incl the table definition it makes it more easy to help you.


  • MJB,
    Thanks for the reply, the full code is not written thus cannot be published here. What I am attempting to do here is set up a binary search of the table. I was able to find all of the values in the table by entering various index values up to 152. What I was attempting to do was create an easy way to get my next index value. Back to the drawing board.
    Jim
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-06 13:14
    You only have room for 39 longs in your table (assuming CODE:$3AC4) but only the first 24 are positive values, perhaps the rest are uninitialized, is that what you want?
    I'm not sure how you created alt_table so any code you used is always going to be better than no code. Besides even though you haven't done the full code yet, it doesn't stop you developing with what you have, does it? Same for anyone helping.

    However looking at your log file I see that after the first couple of manual indexing attempts to prove your method you should have created a definition to access the table and taken it from there.
    : alt@ ( index -- long ) 1 - 4* alt_table + @ ;
    
    (Note: 4 * will work but 4* is defined in the kernel as a very fast 2-bit shift left , so use it. A general-purpose 32x32 multiply on the P1 is relatively slow)
    ...  12 LAP 4 * LAP .LAP 416 cycles = 4.333us  ok
    ...  12 LAP 4* LAP .LAP 32 cycles = 0.333us  ok
    ...  12 4 * . 48  ok
    ...  12 4* . 48  ok
    
    Also by using DUMPL rather than DUMP it would have dumped longs rather than bytes.
    As far as I can see there is no problem with the array or code to access it. Surely you have some code to share, even if it is only a few lines.
  • Ltech wrote: »
    FTP log: I get a time out of the server next to the list dump of the SD card.

    Can I make the time out of the ftp longer ?

    Sorry, I must have missed this post. I'm checking it out now.
  • Peter,
    This is the alt_table:
    Hi Jim, I managed to dig up that Altimeter code (after I eventually found it) so I will look at how it can be implemented based upon PhiPi's excellent documentation. There's already some 64-bit mixed mode maths in Tachyon but it would be easy enough to fill that in for this requirement. In fact there is the built-in F32 floating-point ROM that could be loaded into a cog if need be. However if integer methods are available using a table then that is where it is best to start.
    In Tachyon this table is entered like this:
    TABLE alt_table
    4433077 , 2323037 , 2025546 , 1832444 , 1686113 , 1566963 , 1465785 , 1377458 ,
    1298823 , 1227784 , 1162875 , 1103025 , 1047431 ,  995470 ,  946651 ,  900579 ,
    856930 ,  815437 ,  775876 ,  738056 ,  701815 ,  667012 ,  633527 ,  601252 ,
    570095 ,  539971 ,  510808 ,  482539 ,  455106 ,  428455 ,  402538 ,  377311 ,
    352735 ,  328773 ,  305392 ,  282561 ,  260253 ,  238441 ,  217101 ,  196211 ,
    175750 ,  155700 ,  136041 ,  116758 ,   97835 ,   79257 ,   61010 ,   43082 ,
     25459 ,    8132 ,   -8910 ,  -25680 ,  -42185 ,  -58436 ,  -74439 ,  -90205 ,
    -105740 , -121053 , -136149 , -151036 , -165720 , -180207 , -194503 , -208614 ,
    -222544 ,
    

    The I2C code is very easy and yes, if you want 24-bit values you simply build them and given that the device outputs the bytes descending order (23..16,15..8,7..0) like this:
    ackI2C@ 8<< ackI2C@ OR 8<< nakI2C@ OR
    
    You don't need to visualize this in your head, just interact with Tachyon, in this I have TAQOZ in front of me:
    TAQOZ# $12 8<< $34 OR 8<< $56 OR .L --- $0012_3456 ok
    

    Be careful about porting code to Tachyon, while it is tempting to just convert each routine, you may end up with a hard to read and debug mess of code. The idea is to extend the language as necessary so that the program should be readable and self-commenting. Figuring out where and how to factor snippets and choosing an apt name is a rewarding art.

    I will provide some updates to the kernel to extend the 64-bit maths to include simple add and subtract as well, just to help you along. But don't be too worried if some of your routines look a bit "ugly" or inefficient, as long as it works. I call this Q&D (quick & dirty) because it lets me check out functionality first, and then I can improve it later, but not too much later, do that incrementally.

    I was trying to setup a binary search of the table when I ran amok of the indexing into the table issue. The log file shows the various entries into the table and I gained confidence in my ability to look something up in the table, just having an issue getting the indexing function to work out.
    Jim
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-07 09:03
    That's a long time ago, I'd forgotten about that post!
    You have 65 table entries in your source but the log reveals room for only 39. It could be that when the source is pasted into the terminal that it is dropping some so try increasing the line delay or simply chop those long lines in two. Some editors save text with a line feed rather then a cr or cr+lf but the terminal normally adds a line delay when it sees a cr. So make sure it has a CR so that the terminal can add a line delay.

    BTW, I calculated 39 entries simply by subtracting the take address from the HERE pointer which points to the next free code location from your log file (CODE:$3AC4 = 14532 bytes) and then divided that by 4.
    edit: code address

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-07 09:14
    @RS_Jim
    I just had an opportunity to try this on my system and pasted in your table but when I did the calculation it only came up with 39 entries rather than 65.
    ...  HERE alt_table - 4 / . --> 39  ok
    

    So I pasted the table into an editor and made sure it has cr+lf line endings and then pasted it
    ...  HERE alt_table - 4 / . --> 65  ok
    


    So that's your problem. Any good code editor will let you choose the type of line ending you want.
    853 x 344 - 66K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-08 14:26
    @RS_Jim - in case you haven't gotten around to it yet, here is the lookup function and a quick test.
    TABLE alt_table
    4433077 , 2323037 , 2025546 , 1832444 , 1686113 , 1566963 , 1465785 , 1377458 ,
    1298823 , 1227784 , 1162875 , 1103025 , 1047431 ,  995470 ,  946651 ,  900579 ,
    856930 ,  815437 ,  775876 ,  738056 ,  701815 ,  667012 ,  633527 ,  601252 ,
    570095 ,  539971 ,  510808 ,  482539 ,  455106 ,  428455 ,  402538 ,  377311 ,
    352735 ,  328773 ,  305392 ,  282561 ,  260253 ,  238441 ,  217101 ,  196211 ,
    175750 ,  155700 ,  136041 ,  116758 ,   97835 ,   79257 ,   61010 ,   43082 ,
     25459 ,    8132 ,   -8910 ,  -25680 ,  -42185 ,  -58436 ,  -74439 ,  -90205 ,
    -105740 , -121053 , -136149 , -151036 , -165720 , -180207 , -194503 , -208614 ,
    -222544 ,
    : alt@ ( index -- long )	1- 4* alt_table + @ ;
    

    Now test it by displaying the table in the same format
    ...  1 FROM 65 FOR I 7 AND 1 = IF CR THEN I alt@ PRINT PRINT"  , "  NEXT --> 
    4433077 , 2323037 , 2025546 , 1832444 , 1686113 , 1566963 , 1465785 , 1377458 , 
    1298823 , 1227784 , 1162875 , 1103025 , 1047431 , 995470 , 946651 , 900579 , 
    856930 , 815437 , 775876 , 738056 , 701815 , 667012 , 633527 , 601252 , 
    570095 , 539971 , 510808 , 482539 , 455106 , 428455 , 402538 , 377311 , 
    352735 , 328773 , 305392 , 282561 , 260253 , 238441 , 217101 , 196211 , 
    175750 , 155700 , 136041 , 116758 , 97835 , 79257 , 61010 , 43082 , 
    25459 , 8132 , -8910 , -25680 , -42185 , -58436 , -74439 , -90205 , 
    -105740 , -121053 , -136149 , -151036 , -165720 , -180207 , -194503 , -208614 , 
    -222544 ,  ok
    ...
    

  • Great Peter, Thanks. Hopefully I will have an opportunity to get this loaded and tested later today or tomorrow. I need to forget my old alt table that will be?
    ...alt_table forget
    
    Jim
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-09 17:01
    RS_Jim wrote: »
    Great Peter, Thanks. Hopefully I will have an opportunity to get this loaded and tested later today or tomorrow. I need to forget my old alt table that will be?
    ...alt_table forget
    
    Jim

    FORGET is an immediate word. In Tachyon there are immediate words that execute immediately they are encountered in the text stream. Some of these words are comment words such as \ ( { --- etc while other words such as IF ELSE THEN etc need to execute immediately during compilation to modify what is being compiled. In this case FORGET waits for the "name" of a valid word and if it is found in the dictionary proceeds to remove all dictionary entries up to that point and resets the code pointer to where that word pointed, thus freeing up memory.

    Use it in this format as "FORGET alt_table".

    However unless you are just pasting snippets and even then I find it better to always encapsulate my source using TACHYON and END to place the command line into a kind of module block mode that doesn't echo every character back, only the line numbers and compiler messages. As part of the source I start with a simple header that describes the module and also a quick check beforehand to see if that module already exists, and if so, to FORGET it. Like this:
    TACHYON V5
    IFDEF ALTIMETER
    myvar org		--- reset the data memory pointer
    FORGET ALTIMETER	--- reset the dictionary and code
    }
    
    --- first definition
    module ALTIMETER      PRINT" My high flying altimeter project 190910 etc" ;
    
    long myvar  --- dummy variable for demo or your first variable
    
    TABLE alt_table
    4433077 , 2323037 , 2025546 , 1832444 , 1686113 , 1566963 , 1465785 , 1377458 ,
    1298823 , 1227784 , 1162875 , 1103025 , 1047431 ,  995470 ,  946651 ,  900579 ,
    856930 ,  815437 ,  775876 ,  738056 ,  701815 ,  667012 ,  633527 ,  601252 ,
    570095 ,  539971 ,  510808 ,  482539 ,  455106 ,  428455 ,  402538 ,  377311 ,
    352735 ,  328773 ,  305392 ,  282561 ,  260253 ,  238441 ,  217101 ,  196211 ,
    175750 ,  155700 ,  136041 ,  116758 ,   97835 ,   79257 ,   61010 ,   43082 ,
     25459 ,    8132 ,   -8910 ,  -25680 ,  -42185 ,  -58436 ,  -74439 ,  -90205 ,
    -105740 , -121053 , -136149 , -151036 , -165720 , -180207 , -194503 , -208614 ,
    -222544 ,
    
    --- fetch the corresponding value to the index in the alt_table
    pub alt@ ( index -- long )	1- 4* alt_table + @ ;
    
    END
    

    When you copy and paste this whole section not only does it reset any previous version, it also reports back a summary.
    ...  TACHYON V5 -->   Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000
    0054  --> 
    
       End of source code, 0000  errors found  Load time = 0.7
    Code bytes used = 322
    Name bytes used = 40
    
    CODE:$52D0 = 20688 bytes 
    NAME:$5522 = 7902 bytes 
    DATA:$792C = 1052 bytes 
    FREE:      = 594 bytes 
     Data Stack (0)
    

    BTW, this system reported so little free memory simply because it is loaded up with EASYNET and the unneeded dictionary entries haven't been reclaimed yet.


  • Wahoo! I re-downloaded alt_table and ran your print test and The table finally came back like it should have. Now to move on to completing the binary search of the table.

    Thanks for all you do.

    Jim
  • RS_Jim wrote: »
    Wahoo! I re-downloaded alt_table and ran your print test and The table finally came back like it should have. Now to move on to completing the binary search of the table.

    Thanks for all you do.

    Jim

    See, there wasn't any code problem, just a setup problem. Painless really. Maybe you could update your progress more frequently and it would be even less painless :lol:
  • Peter,
    trying to set up some constants and having issues. Here is the log file:

    := $0a0C_604 quickstart ???
    ... := $0A0C quickstart ???
    ... [D ???
    ... := $0a0c_0604 qkstrt ???
    ... qkstrt ???
    ... := $0A)
    ... := $0A0C_60
    ... := $0A0C_0604 QKSTRT ???
    ... QKSTRT ???
    ... := 2572 qk_strt ???
    ... := 25 qk_p1 ???
    ...

    Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540180811.0000
    *** MODULES *** Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540180811.0000
    2E4A: TOOLS DEV TOOLS
    1980: EXTEND Primary extensions to TACHYON V5 kernel - 18104-0900


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

    CODE:$3B6C = 14700 bytes
    NAME:$5AE0 = 6432 bytes
    DATA:$75D9 = 201 bytes
    FREE: = 8052 bytes
    Data Stack (0)
    Mon, 01 Jan 2001 00:00:00 UTC
    ... := 25 foo ???
    ... bytes 4 strt_byt ???
    ... := 25 fun ??? ok
    ...

    As I read the Glossary ... := value <name> should store a constant
    I thought it would be as easy as
    ...:= $0A0C_604 qk_strt
    but all I seem to get is ???. Where did the wheels fall off now?

    Jim
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-11 01:01
    @RS_Jim - have you had a look at the syntax used in EXTEND.FTH? There you will see how constants are created, first with a value on the stack, then the defining word for constant which in TF is the := assignment operator, and then the name of the constant. All TF definitions follow the same format where any values that need to be assigned are placed on the stack prior, and the name of the definition is always after the defining operator. TF gave an error with:

    := $0a0C_604 quickstart ???

    So the ??? was echoed immediately after the word "quickstart" saying that it is unknown in that it hasn't been defined yet. If you typed WORDS straight after this you would have seen that $0a0C_604 was in the dictionary. It was defined as the name of the constant but the value was whatever was on the stack at the time. Obviously this is the wrong syntax, and the name "quickstart" should immediately follow the := operator. That means the $0a0C_604 value should be before the operator, like this:
    $0a0C_604 := quickstart

    Same goes for bytes etc. Just peruse the EXTEND.FTH source or click the "Use the Forth" logo in my sig and that will take you to the links page where you can find a lot of useful stuff including the Introduction to Tachyon Forth.

    Looking at the glossary (needs updating badly but I don't have the time) I see where you might be confused:
    := 	( val <name> -- )	XI	Create a constant (preferred format reduces clutter around values and names)
    
    The stack notation shows "val" on the left of the -- so this is what needs to be on the stack prior to invoking. However <name> is a bit misleading but by convention it is enclosed in < > to signify that it isn't really "on the stack" but indicates that you need to supply a name following the operator. The right side of the -- indicates the stack results, in this case it does not pass any result.
    Once you remember these basic details, that numbers need to be on the stack anytime, sometime, somehow, even on a different line, prior to using the operator, and that the defining operator needs a name immediately after.

    For instance, although roundabout, this will work:
    $0A0C000
    $604 +
    := quickstart
    

    Overall hint - read real code examples such as EXTEND.FTH in combination with any glossary etc. Then try it out and make sure it is so.


  • Peter,
    Mia Culpa, I did take the definition of a constant directly from the Glossary. Yes, it makes sense that the data needs to be on the stack before it is named. OK I will create a PDF of EXTEND.FTH and put it on my iPad.
    Jim
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-14 02:17
    V5.6 is the current version. I skipped 5.5 so as not to confuse it with the old PropForth version from 2013.

    There's mainly some optimizations to improve looping and also DO and ADO have been added back. As you may know V5 changed to FROM BY FOR NEXT type looping but DO combines a FROM and calculates the FOR in a fast kernel operation.

    I thought it might be a good idea to add a fast EEPROM mode for reading sequentially and even though the high level code can do this at around 48kB/s using a 1MHz clock, it still could have higher throughput so I am optimizing a RUNMOD to tackle this at close to 100kB/s. That way I can add EEPROM as a suitable medium for EASYFILE especially for some of the larger EEPROMs.

    Now's the time to make any requests especially at the kernel level. I haven't touched Tachyon for over a year since I have been sidetracked with P2. The new P1X2 will include inbuilt high-speed support for the 2nd P1 or I/O processor.

    New binaries will be added sometime today.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-14 14:05
    I tend to forget what I have packed into Tachyon so I made a kind of a features list mainly focusing on hardware interfaces with a few software mentions.
    I was a bit surprised it did all these things. This is all built-in on the Prop btw, just interact and select what you want at runtime if you want to play.
    *KERNEL FEATURES*

    400ns minimum instruction cycle time (80MHz)
    FAST LOOPING 600ns/loop
    FAST MULTIPLY ( 7.6us for 12345*12345 )
    LMM MODE
    FAST 4MHz SPI instructions
    COGSTOP COGINIT COGID
    CLKSET MODES
    CODE TIMING TOOLS - LAP .LAP resolve to ns
    REVECTORABLE CHARACTER I/O ( CONSOLE VGA LCD etc )
    ASSIGNABLE KEYBOARD SHORTCUTS
    TACHYON COG MODULES (short binaries loaded into spare cog memory)
    - WS2812
    - SD SUPPORT
    - SPIO
    - SSD
    - LTC2754
    - 32-channel 8-bit 7.6kHz PWM
    - PLOT
    - 32-bit CAPTURE with mask and trigger
    - RCTIME
    - WAV PLAY
    - MCP32xx A/D
    - 96kBps EEPROM READ
    AUTO 5/10MHz clock set
    INTERCOM
    - Propeller multidrop network 2Mbps with Virtual full-duplex console in parallel with 2Mbps serial console
    - low level commands to directly access memory etc.
    ROMS - cog binaries in upper EEPROM
    - HSUART - full-duplex or high-speed half
    - UART
    - F32 floating point
    - VGA 32x15
    - TV
    - SIDCOG

    *EXTENDED HARDWARE FEATURES*

    ANSI TERMINAL MODES
    SIMPLE SERIAL up to 250k baud
    COUNTER MODES
    - FREQUENCY/TONE GENERATOR HZ KHZ MHZ
    - RC DAC inc VOLTS setting
    - EDGE DETECT MODES (i.e. POS EDGE FB DETECT)
    - PULSE WIDTH MEASUREMENTS
    AUDIO TONES - BEEPS WARBLE RING
    LED BLINKER
    I2C - user set speeds up to 1MHz
    EEPROM - FETCH/STORE LOAD/SAVE FILL COPY DUMP BACKUP
    TIMER COG - LINKED USER TIMERS WITH ALARMS etc
    - HYBRID RTC - SOFT + I2C - FORMATTED DISPLAY
    - I2C RTC DS3231 DS1307 MCP79410 PCF8563 + compatible variants etc
    - TIME STAMP
    - TEMPERATURE
    KEY POLLS
    SPI FLASH
    PING - us or mm reading
    DHT22 humidity and temperature
    NEC IR REMOTE TRANSMIT
    32 CHANNEL SERVO
    I2C DEVICE DISCOVERY - lsi2c
    PIN STATE REPORTING - lsio lists pin states and pull-up/downs

    *STANDARD MODULES*

    EASYFILE SD FAT32
    - 4 OPEN FILES
    - VIRTUAL MEMORY ADDRESSING

    *EXTRA MODULES*

    WAV FILE PLAYER
    W5500 LAN SERVERS (FTP HTTP TELNET)
    20x4 CHARACTER LCD
    QVGA LCD
    KEYPAD SCANNER - any number and any pins - buffered, decode, and beeps
    MELODY
    MORSE
    SPLAT SERIAL LOGIC ANALYSER
    VGA BREAKOUT GAME
    VGA DIGITAL CLOCK & TIMER DISPLAY
  • ErNaErNa Posts: 1,738
    edited 2019-09-14 19:45
    Created a CMap to hopefully ease overview and remember the features: https://cmapspublic3.ihmc.us/rid=1V09GHSSD-T9V9T3-1NNJ/Peters_Kernel_Features.cmap This map will be continously expanded to reflect some of the main informations spreaded in this forum ;-)
  • Peter,
    I know that I can forget TOOLS and free up space. My question is it possible to FORGET individual tools or is it better to forget them all and load back the ones I need?
    Jim
  • MJBMJB Posts: 1,235
    RS_Jim wrote: »
    Peter,
    I know that I can forget TOOLS and free up space. My question is it possible to FORGET individual tools or is it better to forget them all and load back the ones I need?
    Jim

    you can not forget individually
    it is like the words you define sit on a stack
    so you can forget down to a word - and all words defined after that one - including it -
    are forgotten.

    if it is important just edit the source and comment out what you do not need
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-18 05:52
    @ErNa - I noticed this about Joseph Novak:
    "fighting to have his ideas accepted by peers and the community in the US, while widely accepted in the rest of the world"

    So a lot of new ideas originate from the US but the US itself is more resistant to new ideas. Go figure.

    ALL
    Anyway, I've done some kernel optimizations to 5.6, just when I thought I couldn't optimize any more, and improved ENTER/EXIT times etc.
    Click on the logo or links in my sig for access to the Tachyon folders and documentation or click here for the binaries folder. I have the general TACHYON.binary for an 80MHz system with EXTEND and EASYFILE but I've also added SPLAT.binary and EASYNET-80.binary and I will add the 96MHz versions shortly. This way it makes it easy to just load and test a system in one click. With any SD or WIZnet configuration remember to set it to suit your board which you can do at runtime. For instance to change the pin configs for the P8 you would enter this:
    &27.24.26.25 SDPINS ( P8 )
    &17.20.19.18 WIZPINS	( P8 )
    BACKUP
    
    This encodes the CS + MISO + MOSI + SCK into a single long using common IP decimal byte notation.
    Same goes for RTC chips, if you have fairly common I2C RTC chip it probably is covered already, just pass the 8-bit I2C address to SETRTC and BACKUP. At boot the system will read the time and date from the RTC and update soft timers which are updated nightly. For instance, My MCP79410 chip sits at $DE so I type "$DE SETRTC BACKUP". The rest is taken care of.

  • GREAT !

    It is the part I missed on Tachyon giga information clue before.

    Nice working tachyon modules, to learn and get in touch.
  • Peter,
    I went to the drop box folder and downloaded the Spin file for 5r6 and used the prop tool to load it into a new quick start board.
    I saved to eeprom and rebooted. Thru teraterm I see garbage. Checked baud rate and clock rate see crystal set at 10 MHz changed to 5 MHz and baud down to 115,200. Reload eeprom and try again still no joy. Trying to figure where the wheels came off.
    Just loaded 5r4 into same board and after reset it connects and shows me the cold start no extend greeting, so I know that the board is OK. So I next decided that maybe my problem was in the CON section for clock frequency so I commented out that whole section and copied it over from 5r4. Bingo! it now works at 5 MHz Xtal with Baud at 115200. I added what appears to be the latest Extend and I now have a working 5r6.
    So I am not sure where the problems were but used a Q&D fix to get a working version.
    Jim
Sign In or Register to comment.