Yesterday I got a little bit frustrated dealing with the power issues. I was able to preload the two FIiP modules with the kernel, and this morning I just started them up with power from the USB cable.
The FLiP modules seem to be operating as expected. I tried some of the words that were not cooperating, and everything seems to be fine. The BIG lesson, beware of possible power issues. With that in mind, I might have to add the WiFi module back, and just have the unit powered externally. I guess then, if and when I decide to add other modules, I will be less concerned with the power limitations.
This morning I also tried the COLD word, is there a word, maybe something like MEM that would display the current memory available. Their is mention of things like EXTEND, EASYFILE, and what else? Is there a document that lists what EXTEND has to offer.
Ah yes, the sdcard can be fitted to almost any P pins you like. That explains P26.
If I wanted to reload the tools module from source, where would I find that, please? Is it closed source?
I suppose if it became necessary, one could dynamically forget sections of code and reload others from SD card during an application like my old Z80 system used to do. Modules dependent on other modules could conditionally load the depencencies first before running too. But I guess that a 'compile just in time' overlay behaviour is rarely if ever necessary, most applications would simply load entirely from eeprom and run.
Documentation is not great, Peter has written a lot, but it is a very big subject. Here are some useful links. The Tachyon word glossary is a little out of date, but the best summary to the word set there is. I've been thinking about updating it as a way of learning tachyon, helped by the source code and experimentation on the hardware. Tachyon is likely to change much less quickly now that Taqoz is the main focus of interest, so an upissued glossary might stay current longer. I've already done a lot of work on the Taqoz glossary, despite not having a P2 to play with.
If you want to go to the source, it's all there. Click "The LOT" link in my sig and that brings up the total Tachyon folder. Go into P1 and then Forth for Forth source code or kernel for the PASM and semi-compiled Forth (mostly assembler and word directives, no actual Spin).
TOOLS are actually part of the whole EXTEND.fth file so if for some reason you needed to replace just that then you would have to copy&paste from that section onwards.
To display the current memory available, press keys CTRL and ?
More ctrl key tips are described in 'Introduction to Tachyon Forth'. One not listed, to see all variables and constants in memory, press CTRL and v
Some times I want to know if a word exists or not. You can list all using WORDS, but the word you're looking for is hard to spot in that big list. So I use HELP U/MOD ( for example ). If the word exists, it will be disassembled to the screen. You have to press enter to stop the display carrying on to show more words. If the word doesn't exist, you'll just get the Tachyon prompt.
EXTEND.FTH, EASFILE.FTH are just text files containing forth source code. They can be found in the P1 section of the Tachyon dropbox in folder FORTH. So you can read the contents with your favourite text editor. EXTEND.FTH is made up of a number of sections, with comment headings which describe what each section might do. Have a look.
You can write your own Tachyon programs as source files and load them into the Tachyon system using the terminal 'send file' function. I use Tera Term, so simply dragging and dropping the file onto the Tera Term window sends the file for me. Tachyon swiftly compiles each new word as the file is sent. I had to set 13ms end-of-line delay in Teraterm, to give Tachyon time to compile reliably. I'm currently writing a driver for an si5351 chip. So my si5131.fth file grows a bit every day as I add new words to it.
You can also copy and paste bits of source code between terminal and text editor, which speeds things up. If a new word, created usimg the terminal seems to be working, then scrolling back, that word definition can be copied into the text editor to be saved for next time.
I just reconnected the WiFi module and was successful logging in with Tera Term, using Telnet.
I also just tried the 'CTRL and ?'. There was no response via the Telnet connection. Not sure if there is a setting in Tera Term that turns on 'CTRL' usage. I think I need a "smart" terminal program. I have to see if Tera Term can make a connection to the COM port via an IP address, something like what a proploader does.
When I say a "smart" terminal program, I am not talking about minicom, although I think that is only available for Linux. I am thinking a GUI window with a small window that acts like the terminal, another little window that is like an editor, you can type in your new words and then copy/paste into the terminal window. Basically you would have one window open instead of another program like notepad open.
ctrl and x toegther repeats the last line typed in, which is often useful.
Tera Term doesn't need to be set up, it should just pass the ctrl key combination on to Tachyon. I've not tried a wifi link yet with Tachyon , though. Maybe it's best to keep it as simple as possible for these first steps?
Keep in mind, from this point on, I will be using a WiFi connection, and accessing it with Tera Term, in the Telnet mode. I tried a couple of other CTRL commands, and in Telnet mode there was no response.
I have my FLiP module setup on my Create robot, and I have a connection to the robot via p0 and p1. Now as I was looking through the Tachyon glossary I did not see any words or commands for creating a serial connection. Did I overlook it, or will that have to be developed. With the things that are involved, like BAUD and pin direction this looks like a very complicated procedure. I guess this is where Forth is supposed to shine, I guess.
Anybody have a starting point for creating word for making a serial connection?
After a little digging, I found the EXTEND.txt file. In the docs I also found Simple Serial.
Simple Serial:
pub SERBAUD
pub SEROUT
pub SERIN
pub ISEROUT , not sure what this does.
with some associated support pub units. I guess 'pub SERBAUD' creates the word SERBAUD. I also guess it would go something like this:
115200 SERBAUD 100 SEROUT(0) - setup for 115200 BAUD, send 100 as byte via p0.
Not sure how you would handle a serin.
115200 SERBAUD xxxx SERIN(1) - the 'xxxx' would be a variable to capture the incoming byte?
I guess it would be a very fancy word if you wanted to create FullDuplexSerial.
Now I have think about setting up an experiment to see if this strategy works as expected.
Comments
The FLiP modules seem to be operating as expected. I tried some of the words that were not cooperating, and everything seems to be fine. The BIG lesson, beware of possible power issues. With that in mind, I might have to add the WiFi module back, and just have the unit powered externally. I guess then, if and when I decide to add other modules, I will be less concerned with the power limitations.
This morning I also tried the COLD word, is there a word, maybe something like MEM that would display the current memory available. Their is mention of things like EXTEND, EASYFILE, and what else? Is there a document that lists what EXTEND has to offer.
Ray
If I wanted to reload the tools module from source, where would I find that, please? Is it closed source?
I suppose if it became necessary, one could dynamically forget sections of code and reload others from SD card during an application like my old Z80 system used to do. Modules dependent on other modules could conditionally load the depencencies first before running too. But I guess that a 'compile just in time' overlay behaviour is rarely if ever necessary, most applications would simply load entirely from eeprom and run.
Documentation is not great, Peter has written a lot, but it is a very big subject. Here are some useful links. The Tachyon word glossary is a little out of date, but the best summary to the word set there is. I've been thinking about updating it as a way of learning tachyon, helped by the source code and experimentation on the hardware. Tachyon is likely to change much less quickly now that Taqoz is the main focus of interest, so an upissued glossary might stay current longer. I've already done a lot of work on the Taqoz glossary, despite not having a P2 to play with.
TOOLS are actually part of the whole EXTEND.fth file so if for some reason you needed to replace just that then you would have to copy&paste from that section onwards.
More ctrl key tips are described in 'Introduction to Tachyon Forth'. One not listed, to see all variables and constants in memory, press CTRL and v
Some times I want to know if a word exists or not. You can list all using WORDS, but the word you're looking for is hard to spot in that big list. So I use HELP U/MOD ( for example ). If the word exists, it will be disassembled to the screen. You have to press enter to stop the display carrying on to show more words. If the word doesn't exist, you'll just get the Tachyon prompt.
You can write your own Tachyon programs as source files and load them into the Tachyon system using the terminal 'send file' function. I use Tera Term, so simply dragging and dropping the file onto the Tera Term window sends the file for me. Tachyon swiftly compiles each new word as the file is sent. I had to set 13ms end-of-line delay in Teraterm, to give Tachyon time to compile reliably. I'm currently writing a driver for an si5351 chip. So my si5131.fth file grows a bit every day as I add new words to it.
You can also copy and paste bits of source code between terminal and text editor, which speeds things up. If a new word, created usimg the terminal seems to be working, then scrolling back, that word definition can be copied into the text editor to be saved for next time.
I also just tried the 'CTRL and ?'. There was no response via the Telnet connection. Not sure if there is a setting in Tera Term that turns on 'CTRL' usage. I think I need a "smart" terminal program. I have to see if Tera Term can make a connection to the COM port via an IP address, something like what a proploader does.
When I say a "smart" terminal program, I am not talking about minicom, although I think that is only available for Linux. I am thinking a GUI window with a small window that acts like the terminal, another little window that is like an editor, you can type in your new words and then copy/paste into the terminal window. Basically you would have one window open instead of another program like notepad open.
Ray
Also ctrl and v together shows variables and constants in memory:-
ctrl and x toegther repeats the last line typed in, which is often useful.
Tera Term doesn't need to be set up, it should just pass the ctrl key combination on to Tachyon. I've not tried a wifi link yet with Tachyon , though. Maybe it's best to keep it as simple as possible for these first steps?
I have my FLiP module setup on my Create robot, and I have a connection to the robot via p0 and p1. Now as I was looking through the Tachyon glossary I did not see any words or commands for creating a serial connection. Did I overlook it, or will that have to be developed. With the things that are involved, like BAUD and pin direction this looks like a very complicated procedure. I guess this is where Forth is supposed to shine, I guess.
Anybody have a starting point for creating word for making a serial connection?
Ray
Simple Serial:
pub SERBAUD
pub SEROUT
pub SERIN
pub ISEROUT , not sure what this does.
with some associated support pub units. I guess 'pub SERBAUD' creates the word SERBAUD. I also guess it would go something like this:
115200 SERBAUD 100 SEROUT(0) - setup for 115200 BAUD, send 100 as byte via p0.
Not sure how you would handle a serin.
115200 SERBAUD xxxx SERIN(1) - the 'xxxx' would be a variable to capture the incoming byte?
I guess it would be a very fancy word if you wanted to create FullDuplexSerial.
Now I have think about setting up an experiment to see if this strategy works as expected.
Ray
Setup the default baud you want to use. Once set there is no need to call it again unless you are changing the baud. Usage: 115200 SERBAUD
Send a single byte out the serial port. Usage: '?' 5 SEROUT
Divert output to the pin as simple serial using the current baud setting. Usage: 5 SERIAL PRINT" Hello World" 1234 1000 * PRINT
--- receive 8 bit serial data from pin at rate set with SERBAUD, blocks until character received Usage: 4 SERIN 5 SEROUT
This will echo a character from P4 to P5
There are ROMs too for all kinds of high-speed buffered serial.