Hi PEter,
long time ago we talked about nRF24L01+
did you ever write code for it?
I am just getting back to a possible application and still have some unused parts here ...
I never did get these setup but only just the other day I was looking at what I could use for a link over 30m and of course these chips certainly are a possibility. I may end up getting sidetracked......
Sweeet! I just bought 10 of these and havent used them yet
30m is very optimistic. This module is using non-spread-spectrum signalling on the same band as
microwave ovens and WiFi, its a very noisy and intermittent channel. If you want range, go for other ISM bands
which don't have to complete with 900W magnetrons. 5m is plausible in a domestic setting in my experience,
maybe 10 with the lowest baud rate, though there is a version with an LNA and PA which will improve that
somewhat, 10dB or so I think.
@proplem - since the stack is kept in hub RAM you can access it from by reading the loop stack pointer from cog register 17.
The top of the loop stack is only in cog memory so you only have to go back to the end of the second entry for the index K.
Hi Peter,
is there an example of using the PingPong Network somewhere?
I was thinking to integrate another AVR-Micro as a sensor slave as well.
The main advantage of using the PingPong type network is that it provides high-speed full-duplex console access to distributed Prop chips and there are modes built-in that allow a Prop to be loaded or read transparently from within the driver too. The master though doesn't use the built-in PingPong network itself so there is no advantage in having a Prop master and non-Prop slaves using this network other than the fact that it is self-pacing and effectively full-duplex due to the ping pong nature of data transfers.
However, the protocol is fairly simple itself and once a connection is made then data can just be exchanged as if it were point to point. I will see if I can setup a micro as a slave, I even have some old AVR devices floating around. I think I probably need to document the protocol too but I guess you've seen the video.
Hi PEter,
long time ago we talked about nRF24L01+
did you ever write code for it?
I am just getting back to a possible application and still have some unused parts here ...
I never did get these setup but only just the other day I was looking at what I could use for a link over 30m and of course these chips certainly are a possibility. I may end up getting sidetracked......
there was ( nRF24L01.fth ) on your google drive
and I found this locally: ... shared on google
Well I decided not to look at anything I may have done before with this chip, which really was nothing. So I sat down with the datasheet and within 5 minutes I had written my first bit of code that can read the registers and use the external DUMP word to automatically read the chip as if it were memory.
It all worked first go and I can dump bytes/words/longs and I may include doubles to allow for 5 bytes. The reset values of the registers match the datasheet.
Now, that's the sort of productivity we could have with P2!!!!
Well I decided not to look at anything I may have done before with this chip, which really was nothing. So I sat down with the datasheet and within 5 minutes I had written my first bit of code that can read the registers and use the external DUMP word to automatically read the chip as if it were memory.
It all worked first go and I can dump bytes/words/longs and I may include doubles to allow for 5 bytes. The reset values of the registers match the datasheet.
Now, that's the sort of productivity we could have with P2!!!!
I see the same - great
so now for the more specific code ...
@Peter, thanks a lot for the responsiveness. "K" is working fine and again I learned something more about the inner workings.
I've got another issue which has been discussed a while ago - RS232
My setup: IoT5500
.. .VER Propeller .:.:--TACHYON--:.:. Forth V4.5 DAWN 450170727.1400 ok
.. .MODULES *** MODULES ***
Propeller .:.:--TACHYON--:.:. Forth V4.5 DAWN 450170727.1400
52FA: EASYNET.fth WIZNET NETWORK SERVERS 170821.0000
4A74: W5500.fth WIZNET W5500 driver 170708.0000
3800: EASYFILE.fth SDHC card + FAT32 Virtual Memory Access File System Layer
1B40: EXTEND.fth Primary extensions to TACHYON V4.5 kernel - 170814-1100 k
Trying the following code with 115200 BAUD misled me and I was hunting phantoms quite a while until I reduced the baudrate to 9600 and suddenly it was working.
#15 == _rx
#14 == _tx
38400 == hc06baud \ default baudrate can be increased
word rxrd
word rxwr
#128 == rxsize
rxsize BYTES bufHC06
12 LONGS stackHC06
pub HC06.TASK ( -- ) \ Buffer data from the HC06 port - nothing else
\ stackHC06 SP! !SP \ init data stack to 0, assign stack to this task
stackHC06 LP! \ v4r5: init stack to 0, assign stack to this task
hc06baud SERBAUD \ how fast are we going
rxrd W~ rxwr W~ bufHC06 rxsize ERASE \ clear rxrd, rxwr and erase bufHC06
BEGIN
_rx SERIN rxwr W@ \ get serial byte, fetch rxwr bufHC06 index( -- 0 datadr )
rxsize 1- AND bufHC06 + C! \ compute bufHC06 addr and write data to buffer
rxwr W++ \ increment buffer pointer
AGAIN
;
pub HC06GET ( -- ch|0 ) \ You can read the buffered data with this
rxrd W@ rxsize 1- AND rxwr W@ rxsize 1- AND <> \ compute if the buffer is empty
IF
rxrd W@ rxsize 1- AND bufHC06 + C@
rxrd W++
ELSE 0
THEN
;
pub HC06START ' HC06.TASK TASK? RUN ;
: HC06EMIT hc06baud SERBAUD _tx SEROUT ;
: HC06 ' HC06EMIT uemit W! ;
HC06START \ to start
1000 ms \ wait a moment at startup
HC06 CR ." CR .DATE SPACE .TIME" CR CON _tx FLOAT bufHC06 rxsize DUMP
I tried 115200 BAUD but it delivered garbage in the receive buffer using an IoT5500 with direct connection from pin 14 to pin 15.
I don't need the RS232 comm for a HC06 device as I want to communicate between 2 propellers. I'd like it 115200 baud or even faster if possible.
Any advice to get faster?
BTW: this serial interface code and its buffering is such a miracle - it is nearly nothing and it works. I saw buffering code in lengthes of KBytes with many errors. As Forth is Zen - this code is. (Ohh: It is copied from the forum, it's not from me :-)
Thanks, best regards
proplem
Edit: For those researching for RS232 communication with tachyon: On a propeller clocked by 96 MHz ( for example IoT5500 ) this code is tested working up to 38400 baud. If more speed is needed, look for UARTCOG.FTH which can do higher rates.
@proplem - V4.5 has a UART ROM which handles full-duplex as well as the HSUART ROM for high speed auto half-duplex. Have a look at UARTCOG.FTH as you can specify the buffer sizes you need at runtime etc and it will handle 115,200 baud very easily.
@MJB - That's about all the time I had to spend on it yesterday but I will play a bit more with it today. Did you notice the $68 in the undocumented register $1E ? All 8-bits seem to be writable but I have found nothing about it on the web except that registers $18..$1B are used for factory testing.
@MJB - That's about all the time I had to spend on it yesterday but I will play a bit more with it today. Did you notice the $68 in the undocumented register $1E ? All 8-bits seem to be writable but I have found nothing about it on the web except that registers $18..$1B are used for factory testing.
with "so now for the more specific code ... " I was talking about myself - not rushing you ...
I tried writing to register 0 with strange bhaviour.
the modules CSN corresponds to SPI CE.
and CE activates the radio -
will test again tomorrow
@MJB - there was a little bug in the posted code although that was fixed up in the dropbox version that ended up writing to registers it was trying to read in the invalid $20 up range.
Have a look at NRF24L01 in the V4.7 folder.
I am just looking at Nordic's BASCOM code, it looks very inefficient. For instance take this bit of code that writes to a register:
D_bytes(1) = C_Write_reg + R_En_aa 'Enable auto ACK for pipe0
D_bytes(2) = &H01
Call W_register(2)
In Tachyon it is simply:
1 EN_AA RFC!
The same goes for writing the 5 byte address registers, just use a double number, the register, and RFD!
I'm "playing around" with the nRF24L01 in promiscuous mode and having a lot fun
Anyone "played around" as well?
Here is a quick view of what I'm seeing using an illegal 2-byte address to catch preambles, in this case I just tried $5555 for fun.
The listing starts with a dump of the registers and each line begins with the Tachyon runtime counter in milliseconds:
.. $5555 RXADR SNIFF
0000.0000: 03 00 01 00 04 28 0F 40 00 00 55 2B 2C 2D 2E 2F .....(.@..U+,-./
0000.0010: 73 20 32 33 34 35 36 12 00 00 00 00 3C 05 3D 00 s 23456.....<.=.
817743 AA AA AA 9A AE AB 55 55 54 B5 55 35 55 57 55 55 55 55 55 55 55 55 55 55 55 4D 55 55 B5 55 55 55
817749 55 4A 95 08 A4 E2 C5 53 22 B5 66 F5 25 50 AA 94 CA 88 5A 8A 91 2E AA A4 2A 9A 05 43 84 AA 6A A6
817756 64 C1 B5 07 6F 4B 4C 8D 44 E2 D5 B3 54 B2 AC 6A DA B7 5E 12 D1 DD C5 FA E2 62 4D E9 A9 C3 4A 39
817762 57 2B E8 DE A5 29 5E EE 8A 56 C4 95 25 6D 57 8B 1A E4 E6 AD F3 E9 54 B3 F7 CF 2A 8A 13 81 55 7E
817769 CA 62 2B 4A 59 25 1A B5 D1 1D 68 4C AA CA AA 15 16 1A 8D 11 3A 01 05 29 51 84 A5 28 8F B5 FB CD
817775 55 55 5D 5D 75 DD DD 75 DD 5D 76 D7 5D 5D 75 5D DD DD 75 5D 55 D7 75 75 D5 57 5B 76 AA AC CB 4D
817781 55 A7 25 CA 9B 53 BD 67 57 7A AE 97 2E DB E5 55 52 D7 54 6B 66 A9 65 50 3D B6 AE DB 6A D4 BA 55
817788 69 AD 4C AD 58 79 EB A6 DF 5F D9 0B AF 36 D3 5E E5 FB 2D 6A A9 4B BC BC D7 AA 9E A7 1C A4 DD B6
817794 05 40 A1 49 5A CB 41 15 44 60 A5 F4 55 10 76 97 41 F5 1C 68 72 10 44 38 63 93 1A EF 85 4C 55 17
817801 57 55 55 55 55 55 55 5B 57 55 55 55 D7 57 55 55 5D 4D 55 55 55 55 B5 55 55 AB 55 55 55 55 55 55
817807 5A 49 13 35 AA A9 95 AB 56 14 D0 B6 BA 87 A8 C9 A2 81 79 45 05 A5 6A 95 0D 4E 81 44 81 52 56 85
817813 94 B0 2B 47 57 32 5D 54 42 D7 96 A7 42 C6 82 54 A7 55 50 A9 E1 65 8D 19 DA 66 9C 09 56 DF 79 5A
817820 53 2A D7 A5 60 E1 E1 B4 D2 D4 A4 45 E5 48 43 64 D7 5D 6A E9 55 55 5B 49 6A CA EB 2E 9E 53 8F 85
817826 9A D8 D4 49 28 A0 95 64 C0 46 94 49 28 4F B7 19 48 60 9D 4D 55 60 56 93 C1 24 B6 17 45 13 AE 54
817833 00 46 DF BC CF 7E 9F 4D AD E9 B7 AB CB F4 81 95 50 6B B9 1C AA 1D 26 2E 87 B5 CD BD 06 55 55 4E
817839 52 4B 15 30 20 84 92 55 E2 19 58 B0 8C 8A 94 5C FC 28 14 2E 8C BB 21 05 AB 35 A6 94 46 91 67 A8
817845 57 AE CA A0 A6 DE 6E 33 AA 9A 5D 69 D7 C5 8E 4B 81 CC F2 F4 A7 2A C9 AB 1E 99 D8 6B 2B 4B 51 6C
817852 9A D6 BC 95 AB EA AB CB D5 33 73 B9 FB 64 9A DA B1 AB 93 2A E5 AB D7 B5 6A 79 CD 75 FA FA BA 79
817858 A1 A6 8A 9C 6D 51 2E 17 2D E5 BA CA 4B 16 2D 6A 90 C2 A5 09 26 96 C2 A2 C3 22 08 0D 0D 5A 55 C1
817865 55 55 55 55 77 7C AD 35 2A D5 57 5D 5D 57 5D 75 F5 57 5D D7 5D DD CB 7D 57 DD 77 57 5D D5 77 75
817874 55 55 55 55 55 75 6D DD 75 5B 77 57 5D D5 77 6A D6 D5 D7 55 5D 57 75 6D 76 DD D7 7D 95 5D DB 75
817880 95 B5 D5 D7 55 DC DF 5D 5D 5D 75 5D CD DD 77 7C D7 5D 55 75 7D 75 55 DD DB 5D 5A CB 54 AC A4 A3
817887 85 4A 1E 9B 95 58 C9 4A 85 A6 51 52 61 D5 E3 1B 2A E2 AB 2C 28 89 54 41 15 9D 3C A8 70 4A AE 95
817893 65 7E 2B 66 ED 55 37 25 51 2B 7B 61 AA 72 B8 D6 F7 B2 9D 52 E9 A4 26 A8 08 80 48 A9 00 49 51 04
817899 55 84 48 52 56 82 A4 8A 5A 42 32 E5 0A 54 75 AC 08 F5 BD 3C 01 30 4D 05 5A 15 50 82 96 45 2A F7
817906 0A 54 5A 50 A5 55 18 A8 08 85 53 16 B1 0C A5 49 4A 0B 46 25 55 25 E5 22 08 A0 01 04 31 8B 46 59
817912 EA D7 5D FF F7 F7 C6 55 7D D7 F7 55 77 57 D7 77 9E 07 5F DE 1E 59 1F 57 DD 7E 19 5D 5D D7 5F 5F
817918 05 22 A2 A3 25 5A D4 F6 D2 E3 96 B6 AC EA E5 87 A9 1B 6B 54 F6 BD E3 AC 04 5A 28 ED 6E 9C 62 54
817925 A4 89 5B 4A 9B 5E 9D 8A 1A 92 D5 AD 5D AB 82 54 B4 4C 29 75 29 4D 8B 16 5B A4 AB 9A 89 0A 94 28
What I'd like to add would be the variable name for which .COM was called. Example:
uart1 .COM
should give
---=== 'uart1' serial comm parameters ===---
rx 14
tx 15
This is again such a CFA, PFA, NFA thing I asked some time ago but things changed since a lot :-))
Can you give an example how I get the dictionary name for a given address?
As I didn't use ROMS before I had to try a lot to get the UARTCOG.FTH code running which in the end failed.
My current v4r5 kernel does not contain the UART ROM :-(
.. " HSUART " FINDROM . 58226 ok
.. " UART " FINDROM . 0 ok
.
I looked into v4r7 which contains the UART ROM but I hesitate to upgrade because the whole EASYFILE EASYNET shebang for my IoT5500 project would have to run.
Only the kernel v4r7 with my v4r5 has about 200 differences. This promises upgrade difficulties.
Is it easier to insert the UART ROM into v4r5 to get UARTCOG.FTH running? May it be just copy and paste?
Thanks in advance to supporters,
proplem
Stop! Don't answer patching UART ROM into v4r5 spin wasn't difficult only a few modifications
.. " HSUART " FINDROM . 58706 ok
.. " UART " FINDROM . 58226 ok
@proplem - If you happen to have a 5.5296MHz crystal lying around x16 = 88.473600MHz /115,200 = 768 etc etc. I doubt very much though that ending up with the less perfect 115246 will cause any kind of problem. Back in the day of UART chips we'd use 11.0592Mhz or 3.6864 crystals etc just to get that exact baudrate.
Hi proplem, this should not have any influence, because the, as Peter said in the meantime, the clock just samples the middle of every bit and we only have 10 or 11 of them.
@MJB - That's about all the time I had to spend on it yesterday but I will play a bit more with it today. Did you notice the $68 in the undocumented register $1E ? All 8-bits seem to be writable but I have found nothing about it on the web except that registers $18..$1B are used for factory testing.
with "so now for the more specific code ... " I was talking about myself - not rushing you ...
I tried writing to register 0 with strange bhaviour.
the modules CSN corresponds to SPI CE.
and CE activates the radio -
will test again tomorrow
What is the thing lying now on top of stack called?
' [']
ATICK word @NFATICK+s,DUP,ZEXIT,@NFABFA+s,@WFETCHX+t
' ' <name> ( -- pfa ) Find the address of the following word - zero if not found or it's PFA (bytecodes do not have a CFA)
TICK word @ATICK+s,@LITCOMP+t
NFA - Name Field Address
CFA - code field address
BFA - Byte/wordcode field address
' BFA is the address of the wordcode stored in the header that is executed or compiled
' NFA points to the first byte
' NFA>BFA ( nfa -- bfa )
'
' CFA>NFA ( wordcode -- nfa )
What is the thing lying now on top of stack called?
' [']
ATICK word @NFATICK+s,DUP,ZEXIT,@NFABFA+s,@WFETCHX+t
' ' <name> ( -- pfa ) Find the address of the following word - zero if not found or it's PFA (bytecodes do not have a CFA)
TICK word @ATICK+s,@LITCOMP+t
NFA - Name Field Address
CFA - code field address
BFA - Byte/wordcode field address
' BFA is the address of the wordcode stored in the header that is executed or compiled
' NFA points to the first byte
' NFA>BFA ( nfa -- bfa )
'
' CFA>NFA ( wordcode -- nfa )
I know these terms and Forth words already although I don't understand them fully. Especially and TICK I can't use. I think they don't answer my question so I try to reformulate my intention. It's a pity that there seems to be no technical term for the ' variable thing I asked before.
After some research I meanwhile can Interactively find and output the name of the calling word like this:
.. pub FETCHNAME
.. CFA>NFA 1+ DUP PRINT$ ;
.. long myvar ' myvar FETCHNAME myvar ok
That's well what I wanted so far if I'm working interactively but ...
What I'd really like to do is:
pub ANYFUNC ( var/adr -- )
CR ." <" FETCHNAME ." > stood before the call" ;
Usage:
long anyvar ANYFUNC
and the resulting output should be:
<anyvar> stood before the call
How can I get the ' variable thing from the memory address on the top of stack?
I know these terms and Forth words already although I don't understand them fully. Especially and TICK I can't use. I think they don't answer my question so I try to reformulate my intention. It's a pity that there seems to be no technical term for the ' variable thing I asked before.
After some research I meanwhile can Interactively find and output the name of the calling word like this:
.. pub FETCHNAME
.. CFA>NFA 1+ DUP PRINT$ ;
.. long myvar ' myvar FETCHNAME myvar ok
That's well what I wanted so far if I'm working interactively but ...
What I'd really like to do is:
pub ANYFUNC ( var/adr -- )
CR ." <" FETCHNAME ." > stood before the call" ;
Usage:
long anyvar ANYFUNC
and the resulting output should be:
<anyvar> stood before the call
How can I get the ' variable thing from the memory address on the top of stack?
Proplem,
long anyvar
does not leave anything on the stack ...
you want
anyvar
ANYFUNC
??
so given a top of stack value - if it was a variable address, what is the variable's name?
??
so given a top of stack value - if it was a variable address, what is the variable's name?
what do you need this funcion for ?
what I meant to write was:
long anyvar
anyvar ANYFUNC
What I intend to do is to get the name of a variable/word from its address.
Why? There are several reasons:
1. reason: (untested code - just for information)
pub .COM ( adr/var -- ) \ output config data for serial interface
CR ." serial port <" DUP FETCHNAME " > settings"
\ ... code to output the register settings of the given serial port
;
usage (just to give an example):
uart1 .COM
serial port <uart1> settings
rx: 1
tx: 2
rxsiz: 32
rxbuf : $1234 ok
uart2 .COM
serial port <uart2> settings
rx: 3
tx: 4
rxsiz: 32
rxbuf : $2234 ok
uart3 .COM
serial port <uart3> settings
rx: 5
tx: 6
rxsiz: 32
rxbuf : $3234 ok
2. reason:
I have a table (list) of variables addresses maybe like this:
long myvar1
myvar 4 + ORG
0 DS *SOV* --- start of variables
4 DS myvar2
4 DS myvar3
4 DS myvar4
0 DS *EOV* --- end of variables
These variables are set in any way ...
Now I want to iterate over this list between *SOV* and *EOV* and send every variable in the list over RS232 to another prop.
This looping is a thing I have to implement. I want to iterate elementwise, dereference the name of the variable according to the address and send that via rs232. I can't write that down yet but I need to dereference the variable name from its address.
??
so given a top of stack value - if it was a variable address, what is the variable's name?
what do you need this funcion for ?
what I meant to write was:
long anyvar
anyvar ANYFUNC
What I intend to do is to get the name of a variable/word from its address.
Why? There are several reasons:
1. reason: (untested code - just for information)
pub .COM ( adr/var -- ) \ output config data for serial interface
CR ." serial port <" DUP FETCHNAME " > settings"
\ ... code to output the register settings of the given serial port
;
usage (just to give an example):
2. reason:
I have a table (list) of variables addresses maybe like this:
long myvar1
myvar 4 + ORG
0 DS *SOV* --- start of variables
4 DS myvar2
4 DS myvar3
4 DS myvar4
0 DS *EOV* --- end of variables
These variables are set in any way ...
Now I want to iterate over this list between *SOV* and *EOV* and send every variable in the list over RS232 to another prop.
This looping is a thing I have to implement. I want to iterate elementwise, dereference the name of the variable according to the address and send that via rs232. I can't write that down yet but I need to dereference the variable name from its address.
I hope it's clearer now - thanks for your help
maybe this is shorter ...
and you can use the solution to 1. in the loop as well
3 LONGS myvar1
myvar1 4 + ORG
4 DS myvar2
4 DS myvar3
3 FOR myvar1 I 4 * + @ . NEXT
Comments
30m is very optimistic. This module is using non-spread-spectrum signalling on the same band as
microwave ovens and WiFi, its a very noisy and intermittent channel. If you want range, go for other ISM bands
which don't have to complete with 900W magnetrons. 5m is plausible in a domestic setting in my experience,
maybe 10 with the lowest baud rate, though there is a version with an LNA and PA which will improve that
somewhat, 10dB or so I think.
The top of the loop stack is only in cog memory so you only have to go back to the end of the second entry for the index K.
I will put it into V4.7 EXTEND for convenience.
is there an example of using the PingPong Network somewhere?
I was thinking to integrate another AVR-Micro as a sensor slave as well.
The main advantage of using the PingPong type network is that it provides high-speed full-duplex console access to distributed Prop chips and there are modes built-in that allow a Prop to be loaded or read transparently from within the driver too. The master though doesn't use the built-in PingPong network itself so there is no advantage in having a Prop master and non-Prop slaves using this network other than the fact that it is self-pacing and effectively full-duplex due to the ping pong nature of data transfers.
However, the protocol is fairly simple itself and once a connection is made then data can just be exchanged as if it were point to point. I will see if I can setup a micro as a slave, I even have some old AVR devices floating around. I think I probably need to document the protocol too but I guess you've seen the video.
there was ( nRF24L01.fth ) on your google drive
and I found this locally: ... shared on google
Well I decided not to look at anything I may have done before with this chip, which really was nothing. So I sat down with the datasheet and within 5 minutes I had written my first bit of code that can read the registers and use the external DUMP word to automatically read the chip as if it were memory.
It all worked first go and I can dump bytes/words/longs and I may include doubles to allow for 5 bytes. The reset values of the registers match the datasheet.
Now, that's the sort of productivity we could have with P2!!!!
I see the same - great
so now for the more specific code ...
I've got another issue which has been discussed a while ago - RS232
My setup: IoT5500
Trying the following code with 115200 BAUD misled me and I was hunting phantoms quite a while until I reduced the baudrate to 9600 and suddenly it was working.
I tried 115200 BAUD but it delivered garbage in the receive buffer using an IoT5500 with direct connection from pin 14 to pin 15.
I don't need the RS232 comm for a HC06 device as I want to communicate between 2 propellers. I'd like it 115200 baud or even faster if possible.
Any advice to get faster?
BTW: this serial interface code and its buffering is such a miracle - it is nearly nothing and it works. I saw buffering code in lengthes of KBytes with many errors. As Forth is Zen - this code is. (Ohh: It is copied from the forum, it's not from me :-)
Thanks, best regards
proplem
Edit: For those researching for RS232 communication with tachyon: On a propeller clocked by 96 MHz ( for example IoT5500 ) this code is tested working up to 38400 baud. If more speed is needed, look for UARTCOG.FTH which can do higher rates.
@MJB - That's about all the time I had to spend on it yesterday but I will play a bit more with it today. Did you notice the $68 in the undocumented register $1E ? All 8-bits seem to be writable but I have found nothing about it on the web except that registers $18..$1B are used for factory testing.
with "so now for the more specific code ... " I was talking about myself - not rushing you ...
I tried writing to register 0 with strange bhaviour.
the modules CSN corresponds to SPI CE.
and CE activates the radio -
will test again tomorrow
Have a look at NRF24L01 in the V4.7 folder.
I am just looking at Nordic's BASCOM code, it looks very inefficient. For instance take this bit of code that writes to a register: In Tachyon it is simply: The same goes for writing the 5 byte address registers, just use a double number, the register, and RFD!
I'm "playing around" with the nRF24L01 in promiscuous mode and having a lot fun
Anyone "played around" as well?
Here is a quick view of what I'm seeing using an illegal 2-byte address to catch preambles, in this case I just tried $5555 for fun.
The listing starts with a dump of the registers and each line begins with the Tachyon runtime counter in milliseconds: Source code is in the V4.7 folder as SNIFFER.FTH
@Peter I'm fighting with UARTCOG.FTH ...
I built a word to output the RS232 settings:
It results in
What I'd like to add would be the variable name for which .COM was called. Example: should give This is again such a CFA, PFA, NFA thing I asked some time ago but things changed since a lot :-))
Can you give an example how I get the dictionary name for a given address? Usage:
Thanks in advance,
proplem
I'm still struggling with UARTCOG.FTH.
As I didn't use ROMS before I had to try a lot to get the UARTCOG.FTH code running which in the end failed.
My current v4r5 kernel does not contain the UART ROM :-(
I looked into v4r7 which contains the UART ROM but I hesitate to upgrade because the whole EASYFILE EASYNET shebang for my IoT5500 project would have to run.
Only the kernel v4r7 with my v4r5 has about 200 differences. This promises upgrade difficulties.
Is it easier to insert the UART ROM into v4r5 to get UARTCOG.FTH running? May it be just copy and paste?
Thanks in advance to supporters,
proplem
Stop! Don't answer patching UART ROM into v4r5 spin wasn't difficult only a few modifications
As I wanted to test the communication with minicom over 115200 Baud there rose a new issue:
Setting the baudrate with and reading the written value back with gave back This is reasoned of losing some decimals by the division
Is there a way to communicate with exactly 115200 Baud via UARTCOG.FTH ?
So the error must sit in front of the keyboard?
Thanks again!!!
Executing What is the thing lying now on top of stack called?
with "so now for the more specific code ... " I was talking about myself - not rushing you ...
I tried writing to register 0 with strange bhaviour.
the modules CSN corresponds to SPI CE.
and CE activates the radio -
will test again tomorrow
NFA - Name Field Address
CFA - code field address
BFA - Byte/wordcode field address
' BFA is the address of the wordcode stored in the header that is executed or compiled
' NFA points to the first byte
' NFA>BFA ( nfa -- bfa )
'
' CFA>NFA ( wordcode -- nfa )
After some research I meanwhile can Interactively find and output the name of the calling word like this: That's well what I wanted so far if I'm working interactively but ...
What I'd really like to do is: Usage: and the resulting output should be: How can I get the ' variable thing from the memory address on the top of stack?
you want ??
so given a top of stack value - if it was a variable address, what is the variable's name?
what do you need this funcion for ?
What I intend to do is to get the name of a variable/word from its address.
Why? There are several reasons:
1. reason: (untested code - just for information) usage (just to give an example):
2. reason:
I have a table (list) of variables addresses maybe like this: These variables are set in any way ...
Now I want to iterate over this list between *SOV* and *EOV* and send every variable in the list over RS232 to another prop.
This looping is a thing I have to implement. I want to iterate elementwise, dereference the name of the variable according to the address and send that via rs232. I can't write that down yet but I need to dereference the variable name from its address.
I hope it's clearer now - thanks for your help
If you want to find the NFA of a variable or constant just $8000 OR before to convert it to a 15-bit literal wordcode and then do a CFA>NFA.
maybe this is shorter ...
and you can use the solution to 1. in the loop as well
It is terrible how many posts i create to get such a simple solution - really funny, but:
There is still one thing open: Unfortunately here the trick doesn't work: The solution to this is what I need (but didn't know myself)
sniff :surprise:
Nevertheless thanks at lot to both of you.
my JSON writer - using this as well ...