Hi ErNa,
I am traveling and don't have your Email addresss with me.
Just wanted to ask again if you have a working build for the IoT5500+P8
- which exact files from Peter's repository to load for a full
SD+NW build.
AFAIR there was an issue with 5.5 vs. 5.4 ??
I want to set up a server that will log to SD data sent from ESP8266 remote sensors. And makes them available via WEB & FTP
@MJB - just let me know specifically what it is you need it to do and I'm sure I can sort out any loose ends.
While it is true I am focused on P2, it is also true that any issues to do with the W5500 will impact its use on the P2, so I would be happy to devote some time to sorting out any issues.
@ErNa - same goes for you, so please let me know where I can help.
@MJB - just let me know specifically what it is you need it to do and I'm sure I can sort out any loose ends.
While it is true I am focused on P2, it is also true that any issues to do with the W5500 will impact its use on the P2, so I would be happy to devote some time to sorting out any issues.
@ErNa - same goes for you, so please let me know where I can help.
Hi Peter,
great to see your progress on P2.
I was hoping there are IoT5500+P8 users out there having a latest build config they could share.
Yesterday I downloaded the full Tachyon dropbox share again.
The V5 contains a
TACHYON.SPIN (V5.2) which is much larger (mostly ROMS) than the
TACHYON5r4.SPIN (V5.4) - but also quite a number of other changes.
There is also a subfolder V5.4 with some slightly different files
so I take the subfolder to build a IoT5500+P8 ?
TACHYON5r4.SPINExtendEasyfileEasynetFTPHTTP
AND - there are NO ISSUES (yet ..)
It is a while since the Spinneret HTTP+ version, but I am confident
to use adapted HTTP/FTP/Telnet to implement s.th. much simpler than MQTT for my use
- receiving ESP8266 remote sensor data
- logging to SD
- presenting via HTTP
- download via FTP
- Ping-Pong to other P1+Tachyon systems
- a little QVGA-LCD-display
- Bluetooth-Serial might be nice ...
...
EDIT: and one future day ... a P2D2+Eval-Board ;-) :-)
EDIT2: & btw. having now a STABLE & MATURE Tachyon on the P1, not changing every few days, will make it's use a bit less challenging ;-)
having now a STABLE & MATURE Tachyon on the P1, not changing every few days, will make it's use a bit less challenging ;-)
AHA- that's what I've been waiting for- no disrespect but I found forth a challenge without continual improvements (meaning changes). Of course improvements are great but can be hard to keep up with.
So
Where can I find the 'STABLE & MATURE Tachyon on the P1' files and instructions please?
There seem to have been so many versions.
having now a STABLE & MATURE Tachyon on the P1, not changing every few days, will make it's use a bit less challenging ;-)
AHA- that's what I've been waiting for- no disrespect but I found forth a challenge without continual improvements (meaning changes). Of course improvements are great but can be hard to keep up with.
So
Where can I find the 'STABLE & MATURE Tachyon on the P1' files and instructions please?
There seem to have been so many versions.
Dave
in Peter's footer is a link to his dropbox folder
V5 is the latest for P1
the P2 folder is the latest TaqOS and Tachyon for the P2
in MORE is a load of examples and demos
I decided that I needed to tidy up those files, especially V5, so I've started a README.TXT and created folders for organize it better. The current kernel itself along with archives etc has its own KERNEL folder, as do the MODULES such as EXTEND and EASYFILE etc. I hope to gradually organize it in such a way that files can be found easily and without too much clutter.
I'm not too concerned with the older versions though since V5 upgraded V4 which was the first wordcode version that replaced the last bytecode version V3. Maybe I will write a little ABOUT.TXT in the main TACHYON folder to explain all this.
If anyone asks about documentation then I will simply point out that while it seems and will always be "incomplete", that nonetheless I have written enough that others can add to it or at least fill in what they know and then ask questions. Please feel free to add sections to the existing documentation or create new documents which can be linked in.
Yesterday was a day of total frustration! I took a brand new QuickStart board, loaded it with the latest version of V5Neon,(using Prop Tool) added the latest Extend (using TeraTerm) and put the Forth tutorial on my iPad. First exercise, (. 3 4 + = ) I get result 7, next I try (. 5 2 + = ) and I get 32,767 ! Can’t even get to second exercise. Next try storing string “Hello world “ and printing that out. No luck. Reboot computer to see if that is the problem. Move QS board to another USB HUB. I have to use USB hubs as laptop only has 3 ports. Now all I get when I press reset button on QS board is gibberish, verify baud rate of TeraTerm, it is 115200, worked before. Try another QS board, same results. I think that I have some how managed to crash the PLL in 3 QS boards. Am I getting too old and senile to be doing this stuff? Do I just need to List all of the electronics stuff on EBAY and take up solitaire as entertainment? My wife would be happy if all of my “junk” was gone.
End of rant. Any one have any suggestions as t why I can’t get Tachyon V5 to do two consecutive adds or why I seem to keep blowing up QS boards?
It's always good to copy and paste what's on your terminal as code into your post or take a screenshot so we can see what happened. However it sounds like even the first exercise was back to front because it we break this up onto separate lines with my comments in brackets, this is how to add and print:
3 ( push 3 onto the top of the stack )
4 ( push 4 onto the top of the stack over 3 )
+ ( pop the top two numbers 4 then 3 and add them then push the result to the top of the stack )
PRINT ( pop the top of the stack and print the number - note you can use the period symbol instead but PRINT is more discernible )
Just think of Forth as assembler language that you can combine together on the same line. Each instruction such as 3 (akin to PUSH #3) still executes left to right. Your code would have tried to print immediately before it had anything valid so it would print whatever was on top of the stack (or was on top if the stack is empty). The = sign is a comparison operation, just as it is with many languages and has no place (at the end of a statement) in any calculations except on a calculator. Don't think "reverse", just think left to right, pick up 3 apples in one hand, then pick up another 4 apples with the other hand, then add what you have in the two hands together into the one hand, then say or print what that is while you now discard (or eat) those apples.
The Tachyon source automatically adjusts for 5 or 10MHz crystals but there is another section at the start that allows for 6MHz crystals so just make sure you have the 5/10 enabled with the old '{ comment trick which is employed since the Spin compiler does not have any conditional compilation directives.
I doubt very much that QS are blowing up but I have blown boards before when the laptop was plugged into power with the USB lead connected, and the board was powered from another source. If the power sources are "badly grounded" you could get ground loop currents that can even wreck your USB port on the laptop. I find it best to run the laptop off batteries in these situations but many of my boards are powered off the USB port and so it doesn't really matter. Desktop computers normally have a good ground but those wall warts and laptop power packs without an earth can give you minor shocks but those minor shocks are due to the neutral being capacitively coupled to the DC common and they can kill boards that are independently powered.
TAKE NOTE anyone using powered laptops connected via the USB cable to separately powered boards.
Here, the source code has the 5/10MHz section enabled because it comments out the { comment with a ' comment while there is a matching ' before the closing brace.
BTW, if your board only has 32k of EEPROM then Tachyon will still run fine, it is just that the upper 32k of 64k EEPROMs are used to store ROM images, that is, the <2k binary that gets loaded into cogs as "PASM objects" such as serial ports and VGA etc.
Peter,
Thanks for the comprehensive reply. I am getting senile, I never thought about ground loops destroying my boards! I should have thought of that as I spent 40+ years in the video industry and we were always on the look out for ground loops. I will see if my QS boards will function on an unpowered (externally) USB port Yes, I was putting the print command first and then doing the stack ops for the arithmetic.
Did you see my PM?
Thanks for helping keep my head on somewhat straight.
Peter,
Finally did some checking on my setup for ground loops and found the culprit. My laptop is connected via a three wire grounded power cord. So I started looking into my powered USB hub and finally found the issue. The outer conductor of the power cord has a potential of 42 VAC to ground no matter how the unpolarized plug was inserted into the outlet. So, now if I want to use a powered USB hub, I have to find one that has a grounded power supply or use one that I have that I can run off a 10,000 MAh battery. This one is connected to power via a micro USB to standard USB cable. The Phone Battery has a standard USB port on it so I can plug right into it. I think I better trash this hub or find a 2.5 amp power supply that has a zero potential to ground.
Jim
Peter,
Finally did some checking on my setup for ground loops and found the culprit. My laptop is connected via a three wire grounded power cord. So I started looking into my powered USB hub and finally found the issue. The outer conductor of the power cord has a potential of 42 VAC to ground no matter how the unpolarized plug was inserted into the outlet. So, now if I want to use a powered USB hub, I have to find one that has a grounded power supply or use one that I have that I can run off a 10,000 MAh battery. This one is connected to power via a micro USB to standard USB cable. The Phone Battery has a standard USB port on it so I can plug right into it. I think I better trash this hub or find a 2.5 amp power supply that has a zero potential to ground.
Jim
Yes, the usual problem. Most people do not know that any transformer will have a capacitive coupling from the primary to he secondary side. This will normally put an AC potential of half the input voltage on the secondary winding. This can only be prevented by grounding (to earth) of the secondary side. I had a customer who blew up his PC when he had supplied a USB device from an ungrounded PSU and then connected the USB port to the PC. That was in Germany with 240V AC. The USB connector from the device was a 120V AC relative to the grounded PC. The chip did not like this.
I take great care to always have everything properly grounded. No to pin power connectors allowed here.
Reinhardt,
This power supply is a switcher, not transformer based. If I had a 12 Volt 4 amp transformer, I would probably build my own 5 volt supply for the HUB. At this point I have removed the troublesome HUB completely and reordered my USB connections.
Jim
Peter,
I am back to attempting a port of the Altimeter code to Tachyon. Is there a reasonable way to calculate the P0/P1 raised to the 0.190264 power or should I adapt PhiPi’s cubic lookup to make my barometer function in Tachyon? Also to read a 24bit value in I2C is the I2C code in Tachyon reading 8 bits at a time and I need to left shift to do all 24 bits?
Jim
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:
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# $128<< $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.
As a lifelong COBOL programmer, used to the most verbose language known to mankind, I kind of shiver when reading 'self-commenting' and thinking about FORTH.
I do get the concept, I even like it, but try after try I fail miserable in understanding any of your code. Has maybe to do with old dogs and new tricks, but I consider FORTH as a write-only language...
No, I need to be serious here, but I think to be able to call a TAQOZ subsystem from any program is very desirable and still not solved, yet.
Thankfully @"Peter Jakacki" finally got the idea that this might be useful, co-existing with Phyton, hidden in some HUB area using one COG.
I plead for a more general usable version, so that I could include a TAQOZ sub system into my fastspin program. The goal is to get a TAQOZ console connected to a virtual serial driver (without using pins).
Then one can execute TAQOZ snippets from other languages, and share the useful one-liners (or more).
I can do most of it with the build-in EVAL TAQOZ, alas I need 4 smartpins for communication. If I would understand how to redirect the console to some hub-addresses as mailbox, I could send that and free the used 4 pins again.
Since I am patching the TAQOZ rom a bit this code may not run on the next silicon. But the goal is still there to use snippets on a TAQOZ sub system...
Now make nails with heads.
Starting with a TAQOZ loaded from ROM, what definitions would be needed to switch console input and output from serial to a simple mailbox-system, say two longs, one in one out, -1 when ready/unused else value, set to -1 after transmit/read. Something simple stupid, may should be able to block, speed is not the problem. just bi-directional solid transfer of console I/O byte wise between TAQOZ sub system and rest of the P2 using two longs in HUB.
If I had that FORTH code I could make a TAQOZ subsystem usable from fastspin/PASM running on the rest of the chip.
And basically TAQOZ does console redirection, I know that much, but I do not now how to do that and hope that somebody in the know of magic will throw some code at me to do that. The rest I might figure out by myself.
shoot. I do not meant TAQOZ sub system. NO, NO, it has to be named TAQOZ-MCP. Please no offense, sub-system; shoot.
Mike, Mike, Mike...
In my current implementation it does even run on COG 0.
So my fastspin program does its bootstrap, leaves space for TAQOZ, loads and runs its Payload in COG1 not COG0 and silently slides COG0 into TAQOZ by just jumping into the ROM.
To do so I need to modify the fastspin generated PASM file a little bit and just compile it again.
I just need to get rid of pins 1-0-63-62 used now to talk to TACOZ.
yes @Cluso99 I already do patch TAQOZ in the rom to intercept the pins with other smartpins, before I start it, and can intercept the TAQOZ console. But I would like to have the pins free for the main program written in whatever and access the TAQOZ console via HUB mailbox, not serial pins.
So after intercepting TAQOZ (what I can) I would like to send some TAQOZ code to TAQOZ to redirect its I/O to a mailbox and release 63.62 (yes, I miss typed) so I can release 1,0 I am using to cheat TACOS in believing it talks to a serial connected port.
And to do that I need some smart mind to write me a console access to TACOZ over a HUB mail box, so I need some TAQOZ code to switch the TAQOZ console to talk over some HUB mail box, not pins serial.
Is my English really so bad?, I try to explain this now since about 8 month?
what I need is some TAQOZ code to not redirect the TAQOZ console to VGA/PS2 or serial or LCDs or the led accessory board to display strings, just simply to a mailbox in HUB usable from PASM.
For someone fluent in TAQOZ maybe a 2 or three liner not a one liner. For me impossible.
Hi Mike, I also one moment see clearly what I have to do, the next moment I feel to be in a dessert. While writing sophisticated code one moment, I'm stuck the next. Tachyon tasts sweet, like honeydew, but I'm looking anxiously for the spider. ... So we have to find a way to communicate the principles a simple way, what I didn't reach to now. Be the forth with you.
Comments
Hi ErNa,
I am traveling and don't have your Email addresss with me.
Just wanted to ask again if you have a working build for the IoT5500+P8
- which exact files from Peter's repository to load for a full
SD+NW build.
AFAIR there was an issue with 5.5 vs. 5.4 ??
I want to set up a server that will log to SD data sent from ESP8266 remote sensors. And makes them available via WEB & FTP
you have My Email ... thanks
MJB
While it is true I am focused on P2, it is also true that any issues to do with the W5500 will impact its use on the P2, so I would be happy to devote some time to sorting out any issues.
@ErNa - same goes for you, so please let me know where I can help.
Hi Peter,
great to see your progress on P2.
I was hoping there are IoT5500+P8 users out there having a latest build config they could share.
Yesterday I downloaded the full Tachyon dropbox share again.
The V5 contains a
TACHYON.SPIN (V5.2) which is much larger (mostly ROMS) than the
TACHYON5r4.SPIN (V5.4) - but also quite a number of other changes.
There is also a subfolder V5.4 with some slightly different files
so I take the subfolder to build a IoT5500+P8 ?
TACHYON5r4.SPIN Extend Easyfile Easynet FTP HTTP
AND - there are NO ISSUES (yet ..)
It is a while since the Spinneret HTTP+ version, but I am confident
to use adapted HTTP/FTP/Telnet to implement s.th. much simpler than MQTT for my use
- receiving ESP8266 remote sensor data
- logging to SD
- presenting via HTTP
- download via FTP
- Ping-Pong to other P1+Tachyon systems
- a little QVGA-LCD-display
- Bluetooth-Serial might be nice ...
...
EDIT: and one future day ... a P2D2+Eval-Board ;-) :-)
EDIT2: & btw. having now a STABLE & MATURE Tachyon on the P1, not changing every few days, will make it's use a bit less challenging ;-)
AHA- that's what I've been waiting for- no disrespect but I found forth a challenge without continual improvements (meaning changes). Of course improvements are great but can be hard to keep up with.
So
Where can I find the 'STABLE & MATURE Tachyon on the P1' files and instructions please?
There seem to have been so many versions.
Dave
in Peter's footer is a link to his dropbox folder
V5 is the latest for P1
the P2 folder is the latest TaqOS and Tachyon for the P2
in MORE is a load of examples and demos
latest version is
version long 540_181011
so unchanged since 8 month now ...
That's great- I guess then its pretty stable so no gotchas to watch out for.
Thanks
Must give it a try in preparation for P2
Dave
I'm not too concerned with the older versions though since V5 upgraded V4 which was the first wordcode version that replaced the last bytecode version V3. Maybe I will write a little ABOUT.TXT in the main TACHYON folder to explain all this.
If anyone asks about documentation then I will simply point out that while it seems and will always be "incomplete", that nonetheless I have written enough that others can add to it or at least fill in what they know and then ask questions. Please feel free to add sections to the existing documentation or create new documents which can be linked in.
directory is not shown correctly
this 4GB SDHC card worked before with Tachyon - not sure which exact version
and contains a number of files.
the more verbose version of .CARD gives a reboot in the SPEED line
-------------------------------------------------------------------------------- ... MOUNT --> CARD: NCard BG73.10 #5957.3321 2012/3 !C0FF.8069 14,974us FAT: #0000.0000 TXX TXT 0 bytes (0kB clusters) ok ... .CARD --> NCard BG73.10 #5957.3321 2012/3 !C0FF.8069 14,977us ok ... ... pri !SD 0EXIT ... CR ." MFG: " cid C@ .BYTE ... CR ." OEM: " cid 1+ 2 CTYPE ... CR ." PROD: " cid 3 + 5 CTYPE ... CR ." REV: " cid 8 + C@ .BYTE ... CR ." S/N: " cid 9 + U@ .LONG ... CR ." DATE: " cid #13 + C@ ... 8 << cid #14 + C@ OR ... DUP 4 >> #2000 + #10 PRINTNUM ??? in .CARD at PRINTNUM ... ." /" >N #10 PRINTNUM ??? in .CARD at PRINTNUM ... CR ." CRC: " cid #15 + C@ 2/ .BYTE ... CR ." OCR: " ocr @ .LONG ... CR ." SPEED: " CNT@ 256 FOR I SECTOR NEXT CNT@ SWAP - ABS CLKFREQ 1000000 / / 8 >> . ... cid 16 DUMP csd 16 DUMP ... ; ... .CARD --> MFG: 73 OEM: BG PROD: NCard REV: 10 S/N: 5957.3321 DATE: / CRC: 6C OCR: C0FF.8069 SPEED: | Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000 *** MODULES *** Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000 3F8E: EASYFILE SDHC card + FAT32 Virtual Memory File System V1.2 171024-0000 2ECA: TOOLS DEV TOOLS 1A00: EXTEND Primary extensions to TACHYON V5 kernel - 18104-0900 FREQ = 80.00MHZ *** INITS *** MOUNT 45CC NO ROMS *** I2C *** $42 I/O $A0 EE/RTC I/O = 31 :UHUU 27 :DDHL 23 :LUDD 19 :~~~~ 15 :~U~~ 11 :~~UU 7 :DD~~ 3 :~UUU INTERCOM: CODE:$5194 = 20372 bytes NAME:$5400 = 8192 bytes DATA:$797D = 1133 bytes FREE: = 620 bytes Data Stack (0) Mon, 01 Jan 2001 00:00:00 UTC CARD: NCard BG73.10 #5957.3321 2012/3 !C0FF.8069 14,974us FAT: #0000.0000 TXX TXT 0 bytes (0kB clusters) -------------------------------------------------------------------------------- ... ... cid 16 DUMP csd 16 DUMP --> 0000.7735: 73 42 47 4E 43 61 72 64 10 21 33 57 59 00 C3 D9 sBGNCard.!3WY... 0000.7745: 40 0E 00 32 5B 59 00 00 1D E9 7F 80 0A 40 00 69 @..2[Y.......@.i ok ... ... CR ." SPEED: " CNT@ 256 FOR I SECTOR NEXT CNT@ SWAP - ABS CLKFREQ 1000000 / / 8 >> . --> SPEED: 0M SPEED: | Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000 *** MODULES *** Propeller .:.:--TACHYON--:.:. Forth V5r4 NEON 540181011.1000 3F8E: EASYFILE SDHC card + FAT32 Virtual Memory File System V1.2 171024-0000 2ECA: TOOLS DEV TOOLS 1A00: EXTEND Primary extensions to TACHYON V5 kernel - 18104-0900 (..sone stuff removed ..) ... ls CARD: NCard BG73.10 #5957.3321 2012/3 !C0FF.8069 14,974us FAT: #0000.0000 TXX TXT 0 bytes (0kB clusters) ... DIR --> ok ... MOUNT --> CARD: NCard BG73.10 #5957.3321 2012/3 !C0FF.8069 14,974us FAT: #0000.0000 TXX TXT 0 bytes (0kB clusters) ok ... .CARD --> NCard BG73.10 #5957.3321 2012/3 !C0FF.8069 14,978us ok ...
EDIT:
the Directory looks OK
... $800000 $100 SD DUMP --> 0080.0000: 4D 4A 42 53 44 20 20 20 20 20 20 08 00 00 00 00 MJBSD ..... 0080.0010: 00 00 00 00 00 00 77 A3 64 4C 00 00 00 00 00 00 ......w.dL...... 0080.0020: 41 4A 41 58 30 30 30 31 48 54 4D 20 00 08 94 A4 AJAX0001HTM .... 0080.0030: 64 4C 64 4C 00 00 F0 92 F8 44 03 00 CE 02 00 00 dLdL.....D...... 0080.0040: 41 4A 41 58 30 30 30 31 48 54 58 20 00 0E 94 A4 AJAX0001HTX .... 0080.0050: 64 4C 64 4C 00 00 F4 92 F8 44 04 00 5D 00 00 00 dLdL.....D..]... 0080.0060: 41 4A 41 58 30 30 30 32 48 54 58 20 00 11 94 A4 AJAX0002HTX .... 0080.0070: 64 4C 64 4C 00 00 23 A1 F4 44 05 00 5E 00 00 00 dLdL..#..D..^... 0080.0080: 46 41 56 49 43 4F 4E 20 49 43 4F 20 00 14 94 A4 FAVICON ICO .... 0080.0090: 64 4C 64 4C 00 00 F8 54 D7 44 06 00 85 1F 00 00 dLdL...T.D...... 0080.00A0: 46 49 52 4D 57 41 52 45 52 4F 4D 20 00 18 94 A4 FIRMWAREROM .... 0080.00B0: 64 4C 64 4C 00 00 A4 54 D7 44 07 00 00 80 00 00 dLdL...T.D...... 0080.00C0: 48 4F 4D 45 20 20 20 20 48 54 4D 20 00 21 94 A4 HOME HTM .!.. 0080.00D0: 64 4C 64 4C 00 00 F8 54 D7 44 08 00 9D 2C 00 00 dLdL...T.D...,.. 0080.00E0: 48 4F 4D 45 32 20 20 20 48 54 4D 20 00 24 94 A4 HOME2 HTM .$.. 0080.00F0: 64 4C 64 4C 00 00 60 75 DB 44 09 00 E4 01 00 00 dLdL..`u.D...... ok
this as well
... $800000 9 >> SECTOR lsdirs --> AJAX0001.HTM .....a 8000.984A 718 m2014/07 /24 18:23 c2018/03 /04 20:36 920. a2018/03 /04 AJAX0001.HTX .....a 0000.984A 93 m2014/07 /24 18:23 c2018/03 /04 20:36 920. a2018/03 /04 AJAX0002.HTX .....a 8000.984A 94 m2014/07 /20 20:09 c2018/03 /04 20:36 920. a2018/03 /04 FAVICON .ICO .....a 0000.984A 8069 m2014/06 /23 10:39 c2018/03 /04 20:36 920. a2018/03 /04 FIRMWARE.ROM .....a 8000.984A 32k m2014/06 /23 10:37 c2018/03 /04 20:36 920. a2018/03 /04 HOME .HTM .....a 0000.984A 11k m2014/06 /23 10:39 c2018/03 /04 20:36 920. a2018/03 /04 HOME2 .HTM .....a 8000.984A 484 m2014/06 /27 14:43 c2018/03 /04 20:36 920. a2018/03 /04 HTTP001 .HTM .....a 0000.984A 388 m2014/06 /23 10:39 c2018/03 /04 20:36 920. a2018/03 /04 HTTP404 .HTM .....a 8000.984A 564 m2014/06 /23 10:39 c2018/03 /04 20:36 920. a2018/03 /04 JGHOME .HTM .....a 0000.984A 2584 m2014/08 /01 16:07 c2018/03 /04 20:36 920. a2018/03 /04 JGHOME .HTX .....a 8000.984A 108 m2014/08 /01 16:40 c2018/03 /04 20:36 920. a2018/03 /04 JGHOME~1.TES .....a 0000.984A 1219 m2014/08 /02 21:41 c2018/03 /04 20:36 920. a2018/03 /04 JGINDEX .HTM .....a 8000.984A 9810 m2014/07 /29 22:19 c2018/03 /04 20:36 920. a2018/03 /04 LOG0001 .TXT .....a 0000.984A 130k m2014/06 /26 18:19 c2018/03 /04 20:36 920. a2018/03 /04 ok
trying to figure out where it goes wrong ...
End of rant. Any one have any suggestions as t why I can’t get Tachyon V5 to do two consecutive adds or why I seem to keep blowing up QS boards?
Jim
It's always good to copy and paste what's on your terminal as code into your post or take a screenshot so we can see what happened. However it sounds like even the first exercise was back to front because it we break this up onto separate lines with my comments in brackets, this is how to add and print:
3 ( push 3 onto the top of the stack )
4 ( push 4 onto the top of the stack over 3 )
+ ( pop the top two numbers 4 then 3 and add them then push the result to the top of the stack )
PRINT ( pop the top of the stack and print the number - note you can use the period symbol instead but PRINT is more discernible )
Just think of Forth as assembler language that you can combine together on the same line. Each instruction such as 3 (akin to PUSH #3) still executes left to right. Your code would have tried to print immediately before it had anything valid so it would print whatever was on top of the stack (or was on top if the stack is empty). The = sign is a comparison operation, just as it is with many languages and has no place (at the end of a statement) in any calculations except on a calculator. Don't think "reverse", just think left to right, pick up 3 apples in one hand, then pick up another 4 apples with the other hand, then add what you have in the two hands together into the one hand, then say or print what that is while you now discard (or eat) those apples.
The Tachyon source automatically adjusts for 5 or 10MHz crystals but there is another section at the start that allows for 6MHz crystals so just make sure you have the 5/10 enabled with the old '{ comment trick which is employed since the Spin compiler does not have any conditional compilation directives.
I doubt very much that QS are blowing up but I have blown boards before when the laptop was plugged into power with the USB lead connected, and the board was powered from another source. If the power sources are "badly grounded" you could get ground loop currents that can even wreck your USB port on the laptop. I find it best to run the laptop off batteries in these situations but many of my boards are powered off the USB port and so it doesn't really matter. Desktop computers normally have a good ground but those wall warts and laptop power packs without an earth can give you minor shocks but those minor shocks are due to the neutral being capacitively coupled to the DC common and they can kill boards that are independently powered.
TAKE NOTE anyone using powered laptops connected via the USB cable to separately powered boards.
Here, the source code has the 5/10MHz section enabled because it comments out the { comment with a ' comment while there is a matching ' before the closing brace.
CON { *** CLOCK MODES *** } '{ 5/10MHZ CRYSTAL _clkmode = xtal1 + pll8x _xinfreq = 10_000_000 ' <--- AUTOMATIC 5 or 10MHz operation change at boot sysfreq = 80_000_000 '} { 6MHZ CRYSTAL _clkmode = xtal1 + pll16x _xinfreq = 6_000_000 sysfreq = 96_000_000 '} baud = 115200 ' <-- user change - tested from 300 baud to 3M baud
BTW, if your board only has 32k of EEPROM then Tachyon will still run fine, it is just that the upper 32k of 64k EEPROMs are used to store ROM images, that is, the <2k binary that gets loaded into cogs as "PASM objects" such as serial ports and VGA etc.
Thanks for the comprehensive reply. I am getting senile, I never thought about ground loops destroying my boards! I should have thought of that as I spent 40+ years in the video industry and we were always on the look out for ground loops. I will see if my QS boards will function on an unpowered (externally) USB port Yes, I was putting the print command first and then doing the stack ops for the arithmetic.
Did you see my PM?
Thanks for helping keep my head on somewhat straight.
Jim
You posted into the big ACTIVITY message box rather than clicking the little MESSAGE button in the top right.
Why oh why do that lay it out that way!
Will check the boards later today.
Jim
Finally did some checking on my setup for ground loops and found the culprit. My laptop is connected via a three wire grounded power cord. So I started looking into my powered USB hub and finally found the issue. The outer conductor of the power cord has a potential of 42 VAC to ground no matter how the unpolarized plug was inserted into the outlet. So, now if I want to use a powered USB hub, I have to find one that has a grounded power supply or use one that I have that I can run off a 10,000 MAh battery. This one is connected to power via a micro USB to standard USB cable. The Phone Battery has a standard USB port on it so I can plug right into it. I think I better trash this hub or find a 2.5 amp power supply that has a zero potential to ground.
Jim
Yes, the usual problem. Most people do not know that any transformer will have a capacitive coupling from the primary to he secondary side. This will normally put an AC potential of half the input voltage on the secondary winding. This can only be prevented by grounding (to earth) of the secondary side. I had a customer who blew up his PC when he had supplied a USB device from an ungrounded PSU and then connected the USB port to the PC. That was in Germany with 240V AC. The USB connector from the device was a 120V AC relative to the grounded PC. The chip did not like this.
I take great care to always have everything properly grounded. No to pin power connectors allowed here.
This power supply is a switcher, not transformer based. If I had a 12 Volt 4 amp transformer, I would probably build my own 5 volt supply for the HUB. At this point I have removed the troublesome HUB completely and reordered my USB connections.
Jim
I am back to attempting a port of the Altimeter code to Tachyon. Is there a reasonable way to calculate the P0/P1 raised to the 0.190264 power or should I adapt PhiPi’s cubic lookup to make my barometer function in Tachyon? Also to read a 24bit value in I2C is the I2C code in Tachyon reading 8 bits at a time and I need to left shift to do all 24 bits?
Jim
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 do get the concept, I even like it, but try after try I fail miserable in understanding any of your code. Has maybe to do with old dogs and new tricks, but I consider FORTH as a write-only language...
Mike
Maybe I need to spend a couple of month in Australia to fix that problem. Something I have on my bucket list anyways...
Mike
Thankfully @"Peter Jakacki" finally got the idea that this might be useful, co-existing with Phyton, hidden in some HUB area using one COG.
I plead for a more general usable version, so that I could include a TAQOZ sub system into my fastspin program. The goal is to get a TAQOZ console connected to a virtual serial driver (without using pins).
Then one can execute TAQOZ snippets from other languages, and share the useful one-liners (or more).
I can do most of it with the build-in EVAL TAQOZ, alas I need 4 smartpins for communication. If I would understand how to redirect the console to some hub-addresses as mailbox, I could send that and free the used 4 pins again.
Since I am patching the TAQOZ rom a bit this code may not run on the next silicon. But the goal is still there to use snippets on a TAQOZ sub system...
Now make nails with heads.
Starting with a TAQOZ loaded from ROM, what definitions would be needed to switch console input and output from serial to a simple mailbox-system, say two longs, one in one out, -1 when ready/unused else value, set to -1 after transmit/read. Something simple stupid, may should be able to block, speed is not the problem. just bi-directional solid transfer of console I/O byte wise between TAQOZ sub system and rest of the P2 using two longs in HUB.
If I had that FORTH code I could make a TAQOZ subsystem usable from fastspin/PASM running on the rest of the chip.
And basically TAQOZ does console redirection, I know that much, but I do not now how to do that and hope that somebody in the know of magic will throw some code at me to do that. The rest I might figure out by myself.
Help!
Mike
Mike, Mike, Mike...
In my current implementation it does even run on COG 0.
So my fastspin program does its bootstrap, leaves space for TAQOZ, loads and runs its Payload in COG1 not COG0 and silently slides COG0 into TAQOZ by just jumping into the ROM.
To do so I need to modify the fastspin generated PASM file a little bit and just compile it again.
I just need to get rid of pins 1-0-63-62 used now to talk to TACOZ.
Mike
edited pin numbers, @clusso99 got me...
Don't you mean 1-0-63-62 ???
BTW it doesn't help to live downunder in coming to grips with TAQOZ. Sometimes I can understand the one-liners, and other times I'm just amazed.
'************************************* SERIAL I/O ************************************** ff34c 17a f6030621 SEROUT mov txpin,tos ff350 17b fd9ffbb4 jmp #DROP ff354 17c f6001a21 CONEMIT mov R1,tos ff358 17d f607063e TXR1 mov txpin,#tx_pin ff35c 17e fc201b83 wypin r1,txpin '..send byte ff360 17f fd64001f waitx #0 ff364 180 fd730640 .wait testp txpin wc '..wait for buffer empty ff368 181 3d9ffff8 if_nc jmp #.wait ff36c 182 fd9ffb98 jmp #DROP ff370 183 0000003e txpin long tx_pin
and this looks to be the receive section tho a quick look doesnt jump out and say how it works
'***************************************** HUBEXEC CODE *************************** ' fe9b4 orgh fe9b4 alignw fe9b4 _hubexec ' !SP - init the data stack pointer fe9b4 f6042200 INITSP mov datptr,#datstk fe9b8 f6042a00 mov depth,#0 fe9bc ff6f56df _ret_ mov tos,##$DEADBEEF ' marker fe9c0 060442ef { dirl #rx_pin 'disable receiver wrpin #%00_11111_0,#rx_pin 'configure rx_pin for asynchronous receive, always input wrpin #%01_11110_0,#tx_pin 'configure tx_pin for asynchronous transmit, always output dirh #tx_pin 'enable transmitter } fe9c4 InitTaqoz fe9c4 fd601601 cogid fx fe9c8 fed0f3f6 loc PTRA,#@IDLE&$FFFF ' default startup into Instruction Pointer fe9cc fb9c160c tjnz fx,#INITSTKS ' COG 0 CONSOLE ' fe9d0 fd647c41 dirh #tx_pin 'set tx output high fe9d4 fc2c1a3e wypin #$0D,#tx_pin fe9d8 fed0f4ae loc PTRA,#@TERMINAL&$FFFF fe9dc fd647e41 dirh #rx_pin 'setse1 #%001_111111 fe9e0 fa9c3c3f rdpin fz,#rx_pin wc ' clear rx? fe9e4 fd640025 setint1 #0 fe9e8 f6044000 mov rxwrC,#0 fe9ec fc64400c wrlong rxwrC,#rxrd fe9f0 fd677e20 setse1 #%110<<6+rx_pin 'set se1 to trigger on rx char event????? fe9f4 ff0007f5 mov ijmp1,##@taqoz_rxisr 'set int1 jump vector to receive buffer fe9f8 f607e810 fe9fc fd640825 setint1 #4 fea00 fdbfffb0 INITSTKS call #INITSP fea04 f6042630 INITLP mov lpptr,#lpstk fea08 f6042420 mov braptr,#brastk fea0c 06042840 INITRP _ret_ mov retptr,#retstk fea10 f0643a08 taqoz_rxisr shl rxlong,#8 fea14 fa8c3c3f rdpin fz,#rx_pin ' recv byte (bits31:24) from rx pin fea18 f0443c18 shr fz,#24 fea1c f5483a1e or rxlong,fz wz fea20 ff0d8d8d cmp rxlong,##$1B1B1B1B wz ' esc esc esc esc break' fea24 f20c3b1b fea28 af0007f6 if_z coginit #0,##@RESET fea2c acec0164 fea30 f6003e20 mov rxwrP,rxwrC fea34 f1043f80 add rxwrP,#rxbuffers fea38 fc403c1f wrbyte fz,rxwrP fea3c ff000007 incmod rxwrC,##rxsize-1 fea40 f704407f fea44 fc54400e wrword rxwrC,#rxwr fea48 fb3bfff5 reti1 '_rxrd long rxrd '_rxwr long rxwr fea4c fae4180c READRX rdword r0,#rxrd fea50 f2081820 cmp r0,rxwrC wz fea54 ad900018 if_z jmp #@rr1 fea58 f6001a0c mov r1,r0 fea5c f1041b80 add r1,#rxbuffers fea60 fac0140d rdbyte acc,r1 fea64 ff000007 incmod r0,##rxsize-1 fea68 f704187f fea6c fc54180c wrword r0,#rxrd fea70 fd800142 rr1 jmp #PUSHACC fea74 fd640025 DEBUGGER setint1 #0 fea78 fd8fca88 jmp #\_Start_Monitor ' \ forces absolute address '
fe9c4 InitTaqoz fe9c4 fd601601 cogid fx fe9c8 fed0f3f6 loc PTRA,#@IDLE&$FFFF ' default startup into Instruction Pointer fe9cc fb9c160c tjnz fx,#INITSTKS ' COG 0 CONSOLE ' fe9d0 fd647c41 dirh #tx_pin 'set tx output high fe9d4 fc2c1a3e wypin #$0D,#tx_pin fe9d8 fed0f4ae loc PTRA,#@TERMINAL&$FFFF fe9dc fd647e41 dirh #rx_pin 'setse1 #%001_111111 fe9e0 fa9c3c3f rdpin fz,#rx_pin wc ' clear rx? fe9e4 fd640025 setint1 #0 fe9e8 f6044000 mov rxwrC,#0 fe9ec fc64400c wrlong rxwrC,#rxrd fe9f0 fd677e20 setse1 #%110<<6+rx_pin 'set se1 to trigger on rx char event????? fe9f4 ff0007f5 mov ijmp1,##@taqoz_rxisr 'set int1 jump vector to receive buffer fe9f8 f607e810 fe9fc fd640825 setint1 #4
this sets up the rx interrupt vector to taqoz_rxisr in ijmp1and here is the rxisr
fea10 f0643a08 taqoz_rxisr shl rxlong,#8 fea14 fa8c3c3f rdpin fz,#rx_pin ' recv byte (bits31:24) from rx pin fea18 f0443c18 shr fz,#24 fea1c f5483a1e or rxlong,fz wz fea20 ff0d8d8d cmp rxlong,##$1B1B1B1B wz ' esc esc esc esc break'
So after intercepting TAQOZ (what I can) I would like to send some TAQOZ code to TAQOZ to redirect its I/O to a mailbox and release 63.62 (yes, I miss typed) so I can release 1,0 I am using to cheat TACOS in believing it talks to a serial connected port.
And to do that I need some smart mind to write me a console access to TACOZ over a HUB mail box, so I need some TAQOZ code to switch the TAQOZ console to talk over some HUB mail box, not pins serial.
Is my English really so bad?, I try to explain this now since about 8 month?
feeling helpless to explain further
see here : https://forums.parallax.com/discussion/168621/coexistence-with-taqoz
and here https://forums.parallax.com/discussion/169620/hijacking-the-p2-eval-rom
Mike
For someone fluent in TAQOZ maybe a 2 or three liner not a one liner. For me impossible.
Mike