Tachyon V4 "DAWN" - exploring new worlds

1232425262729»

Comments

  • Another oddity.
    Pasting in the EXTEND.FTH does something odd.

    While transferring, it all seems to work fine (it scrolls down the screen with occasional "ok"s and other things).
    At the end I get:
    .DAWN#   
    .DAWN#   
    .DAWN#   
    .DAWN#   
    .DAWN#   
    .DAWN#   
    .DAWN#   
    .DAWN#    ok
    .DAWN#   
    
       End of source code, 0000  errors found 
    Code bytes used = 8828
    
    CODE:$3CBC = 15036 bytes 
    NAME:$57D2 = 7214 bytes 
    DATA:$7678 = 360 bytes 
    FREE:      = 6934 bytes 
     Data Stack (0)
    
     ok
    DAWN#   
    DAWN#   
    DAWN#  errors W@ 0= IF SAVEROMS THEN 
    

    At that point, I can no longer do anything in the terminal.
    Looking at the end of the EXTENT file I can see the "errors" line and that there are a few more lines to process but it doesn't seem to get through it.

    I'm suspecting maybe some line ending misconfiguration in the terminal?? maybe??

    Other things work fine, such as doing some math and stack actions.

    DAWN# 3 4 5 + - .s Data Stack (1)
    $FFFF.FFFA - -6
    ok
    DAWN#
  • @thej - which terminal program are you using? Did you try issuing a break condition to see what happens?

    Either way it wouldn't hurt to download the very latest update and make sure it has the correct clock selected as I have just been testing with that without any problems. I'm updating EXTEND eventually to use a newer number print format in place of PRINTNUM etc using format strings.
    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    Tachyon Forth News Blog
    TACHYON DEMONSTRATOR
    Brisbane, Australia
  • I'm using CoolTerm.
    Sending a break seems to have reset the board as I got the Tachyon intro title.
    Typing in some of the words that are in extend just give me ??? so it doesn't appear that they are in the dictionary.

    I'll dl the latest versions :-)
  • NUMBER FORMATTING

    I have been experimenting with formatting numbers by supplying a format string instead of the fixed PRINTNUM routine that I have been using.This is mainly for use with the P2 but I have been playing with it on the P1. Essentially you can format the printing of a number simply by using a format string where every character in it is a command or a character to insert. While nowhere near full feature as a printf it also doesn't need to be as all the flexibility for printing numbers can be had using the <# # #> primitives etc. But .AS can replace PRINTNUM and .AS is simpler and far more flexible which is better. The ability to embedded text removes the need to print text separately too. Although a format string can be passed to .AS there is a more compact version .AS" that directly embeds the string.

    There are lots of things I can add, change, and improve, but already this is quite useful. Of course format strings can be built into a special word for printing currency etc or the string can be stored as a constant etc. The name is deliberately kept short to suit the maximum of six 5-bit encoded characters that will be used in TAQOZ to fit into a single long including attributes.

    Here are some samples

    Format currency
    ..  12 .AS" $~#,###,###,##~#.##"		$0.12 ok
    ..  123 .AS" $~#,###,###,##~#.##"   		$1.23 ok
    ..  1234 .AS" $~#,###,###,##~#.##"  		$12.34 ok
    ..  123456789 .AS" $~#,###,###,##~#.##"  	$1,234,567.89 ok
    
    Format date
    ..  180107 .AS" 20##/##/##"  			2018/01/07 ok
    
    Format time
    ..  213543 .AS" ##:##:##"			21:35:43 ok
    ..  213543 .AS" The time is now ##:##:##"  	The time is now 21:35:43 ok
    
    Format temperature
    ..  215 .AS" The temperature is ~##~#.#'C"  	The temperature is 21.5'C ok
    
    Format timing
    ..  12 .AS"  ###,##~#.###us"			0.012us ok
    ..  123 .AS"  ###,##~#.###us"  			0.123us ok
    ..  1234 .AS"  ###,##~#.###us"  		1.234us ok
    ..  12345678 .AS"  ###,##~#.###us"  		12,345.678us ok
    
    Miscellaneous
    123 .AS" [~###~#.##]"   			[1.23]
    ..  12 .AS" ###`#M"				  12M
    

    Special character commands are:
    # Convert one digit
    ~ toggle zero suppression
    ` toggle padding
    \ Interpret preceding character as a special command
    





    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    Tachyon Forth News Blog
    TACHYON DEMONSTRATOR
    Brisbane, Australia
  • That's very interesting. Consistent with the way Forth works, it seems to be backwards from what you'd do in C or most other languages. Usually you "comment out" code. In this case it seems you're commenting it in. :-)
  • I have finally got around to updating to "Dawn - vs 4.7". I have run into a problem with an application which is reading an 8-bit data port. There appears to be no PINS@ available. Is ther a substitute for PINS@ in vs. 4.7?

    Nick
  • "Good news everyone !" -Prof Farnsworth

    I finally figured out the ROOT of the problem with programming and communicating with my P1 board... A flaky USB port!
    It has not completely failed but is effectively unusable.
    A mouse will be powered but will not move the cursor and a flash drive will not work at all.
    However, BOTH will be recognized by the system in the System Report utility.

    Connecting the board to my only other USB port (I didn't do this last time as my mouse was connected) worked !!

    I am able to use PropellerIDE with MacOS 10.13.2 successfully !!! Mostly....
    It's still a quirky program (crashes randomly, reports failed transfers when they worked) but it does transfer a working Tachyon 4.7 to the board.

    I also set the DTS RTS to ON in CoolTerm which fixed a carriage return issue and set it to it's fastest speed (230400) and all is working!

    Now I just need to re-find the correct instructions for adding EASYFILE and EXTEND then find some example code to play with :-)

    Finally! I get to play !

    J
  • nglordi wrote: »
    I have finally got around to updating to "Dawn - vs 4.7". I have run into a problem with an application which is reading an 8-bit data port. There appears to be no PINS@ available. Is ther a substitute for PINS@ in vs. 4.7?

    Nick

    Reading parallel data is not a common thing and unfortunately is a lot slower than any SPI operation. However I have just put it back into extend.
    --- Read input pins and right justify and mask - #P8 4 PINS@ - reads P8..P11 as a nibble
    pub PINS@ ( pin for – n ) 	P@ ROT SHR SWAP MASK 1- AND ;
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    Tachyon Forth News Blog
    TACHYON DEMONSTRATOR
    Brisbane, Australia
  • nglordi wrote: »
    I have finally got around to updating to "Dawn - vs 4.7". I have run into a problem with an application which is reading an 8-bit data port. There appears to be no PINS@ available. Is ther a substitute for PINS@ in vs. 4.7?

    Nick
    if you put your 8-bit port on P0..P7
    you can use the faster INA COG@
    and then just write a byte
    INA COG@ dest C!
    
    which saves you the mask and shift operations
  • thejthej Posts: 54
    edited January 22 Vote Up0Vote Down
    I'm trying to load EXTEND into Tachyon but I'm getting errors.

    I have the january 8th version of 4v7 loaded on the board.
    I re-downloaded EXTEND and EASYFILE.

    The terminal (CoolTerm for Mac) is set to 230400 baud and it appears to be working fine for booting Tachyon and writing simple code.
    I tried the "send file" option in coolterm to send EXTEND.
    It gets to about 23% and then I get this:
    ...   
    ...   
    ...   
    ...   
    ...   
    ...  H ???  Structure mismatch!  *error*.
    

    I reset the board and just tried copy pasting it in and got the same thing.

    I tried saving the file into an ASCII file (it opened as UTF-8) but my editor said it found 2 characters that had no ASCII form and could not convert it (both characters looked like a minus sign).

    Should the text be ASCII or UTF-8?
    Maybe I have the wrong version of EXTEND?

    J
  • @thej - Don't forget to use a LINE delay of 10ms or so, depending upon the terminal. It is extremely unlikely that it needs more than 15ms but just so you have an idea. Make sure your file editor uses CR+LF for line endings and the file should be be plain ASCII.

    btw, the error you are seeing is probably because it has dropped characters.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    Tachyon Forth News Blog
    TACHYON DEMONSTRATOR
    Brisbane, Australia
  • I will double check my settings but they should be ok.
    I am running CoolTerm at it's top speed. Maybe it is not fully reliable.
    I will do more testing.

    j
Sign In or Register to comment.