I have had it running at 3M but would only really recommend it at 96MHz since 3M will have a 0% baud rate error but at 80Mhz it's more like 2.56% (note). The pasm timing is already pushed since not only does it do some checks on the data and has to update the buffers and head in hub, but it is also running the ping-pong networking in the same cog. Remember that you can connect multiple Props over a multi-dropped I/O or RS485 network and address and talk to each Tachyon console in pseudo full-duplex. The settings for these are under the INTERCOM section.
This reminds me, I will have to document the ping-pong protocol as I will also implement this on the P2 as well.
(note) clkfreq/3M @80MHz = 26.66r = 26 ticks but if you use 2962000 baud on the P1 side then ticks = 27 and much less error Perhaps I should round the calculation then.
P.S. When I said I use CONBAUD all the time I must be mistaken in regards to V5. It seems I have been using the incorrect address for this version
Peter,
Just a quick clairification, does the latest version of TF5 auto-select 5 or 10 MHz XTAL?
Jim
Yes, they all do since many of my systems use 10MHz crystals since I use SMD or cylindrical types rather than the bulky HC49. All the Parallax designs seem to be 5MHz and in the Flip where the 5MHz crystal would be too large they use a 5MHz oscillator.
So it's an easy thing to have the setpll routine which PhiPi wrote back in 2009 adjust for these two standard frequencies.
Intercom - Just because I have another two P1s doing nothing at the moment I'd like to piggyback another one onto my diy development board and control it by Intercom. I've watched the video on RS485 ping-pong communication and understand from forum that over very short distances all that is required is a 100 ohm safety resistor in series with a single pin from each p1.
I notice in extend.fth the setup word INTERCOM! ( config baud -- ). Config is defined with an IP long as &GP.ID.TR.TE. I'm guessing this means GP - processor group, ID - this processors' address in that group, TR - pin for transmit/receive, TE - pin to control rs485 chip transmit / receive direction?
After typing in a test setting &01.01.06.07 1000000 INTERCOM! just as an experiment, tachyon complains:-
TF5> &01.01.06.07 1000000 INTERCOM! --- NO EEPROM!
How is it really set up, please?
What settings does a master need versus a slave?
Just in brief, how would an RS485 chip be connected and what chip is recommended? I am guessing the transmitter and receiver are just back to back and the signal direction set with TE
When just 100 ohm resistors are used, can you define the TE pin as unused?
Do I need any ROMS installed?
Intercom - Just because I have another two P1s doing nothing at the moment I'd like to piggyback another one onto my diy development board and control it by Intercom. I've watched the video on RS485 ping-pong communication and understand from forum that over very short distances all that is required is a 100 ohm safety resistor in series with a single pin from each p1.
I notice in extend.fth the setup word INTERCOM! ( config baud -- ). Config is defined with an IP long as &GP.ID.TR.TE. I'm guessing this means GP - processor group, ID - this processors' address in that group, TR - pin for transmit/receive, TE - pin to control rs485 chip transmit / receive direction?
After typing in a test setting &01.01.06.07 1000000 INTERCOM! just as an experiment, tachyon complains:-
TF5> &01.01.06.07 1000000 INTERCOM! --- NO EEPROM!
How is it really set up, please?
What settings does a master need versus a slave?
Just in brief, how would an RS485 chip be connected and what chip is recommended? I am guessing the transmitter and receiver are just back to back and the signal direction set with TE
When just 100 ohm resistors are used, can you define the TE pin as unused?
Do I need any ROMS installed?
My bad, it looks like the EEPROM is still busy after the last write and when it goes to ELOAD from there, the EEPROM will not respond. It just needs a short delay but I've got a feeling I removed a busy test that has caused this problem.
pub INTERCOM! ( config baud -- )
9600 2,000,000 LIMIT CLKFREQ SWAP / $34 E!
$0F.FF.1F.1F AND $E0.00.00.00 OR $30 E!
5 ms
$30 $30 $10 ELOAD
;
The 100R should be fine although I should check this out myself. It could be that the line may require some kind of pullup for when it is not being driven.
Thanks, Peter, I'll give that a try. I'm having fun getting to know Tachyon and writing this si5131 driver for radio use. I couldn't resist looking at the Intercom, though. Very neat.
It's a sunny, calm morning here with just a hint of autumn, we're off to Clevedon on the Bristol Channel today. The sandwiches and binoculars are packed, so it's the seaside for us today.
Well the beach was good, faces tingling etc from the sun and the air was clear - good view across the Bristol Channel to Wales. We live about an hour away from Clevedon, which isn't too bad. I wouldn't mind some of your beaches being a bit closer, though, they're something else!
Yes, I meant I'm writing a driver for the si5351 that you're using on P2D2. It's a popular choice for software defined radios and performs well - I've heard how it sounds. I'm using an integer output division to minimise output jitter and a fractional PLL feedback division so as to be able to (roughly) tune to the nearest 4Hz, over the range 4-120Mhz. To drive a tayloe mixer, the si5351 o/p is further divided by 4 to make two quadrature phased signals in the range 1-30MHz with a high speed 7474 type external chip. The frequency is varied smoothly by a cheap rotary encoder, to around 1 Hz precision. There also needs to be a word to update the assumed crystal frequency having tuned the radio to a frequency standard like WWV.
Most software reading a rotary encoder you find on the web is not very good. They keep the increment fixed at 1Hz/step, 10Hz/step, 100Hz/step selecteable by a push button. Mm - very clunky. My version detects how many encoder steps have occurred in ( say ) 25mS and then squares that value - or some other non-linear function that feels right. That way, you still get 1Hz tuning steps when the knob is tuned slowly, but if you spin it, you quickly get to the other end of the band. No need for the push button tuning step 'gear change'.
The trick in calculating the si5351 divider values is to work back from the wanted o/p. The other trick is to minimise the number of bytes that need sending to the chip each frequency change, if the value hasn't changed, don't send it again sort of thing. See https://rfzero.net/tutorials/si5351a/
The ideal is to mimic the smooth tuning we used to enjoy with analogue radios.
I'm able to read and write the chip and also calculate the divider values for a given frequency, just need to write more words to split the values up into the required 8 bit registers. I'll post it when it works.
@bob_g4bby I have a feeling you are trying to develop a better QCX or QSX (by Hans Summers @QRP Labs) and phase out that atmega328 ? Because that was my idea also.
Yes that's the idea, but with a decent low noise 24 bit analogue to digital converter in the front end of the receiver. The P2 would be able to deliver the really clean audio that sd radios are famous for.
Judging by all the youtube videos, the QCX, QSX or UCX radios https://groups.io/g/ucx sound quality is not the best, although the ATMEGA firmware is really amazing in such a low-power platform.
An SDR written in Taqoz with selected dsp words in assembly. That would be unique!
The attached file gives some idea of the circuitry, although this one delivers packets of signal data to a pc for processing
The QCX is superb. I know that for a fact. I own one. It's hard to imagine anything (CW radio) better at this price point. I love mine. The only improvement desirable would be if it could do "all bands" in a single package and cost, say. twice as much.
I'd be delighted if it was based on a Parallax or an ARM mcu with firmware written in forth, be it Tachyon or Mecrisp-Stellaris.
And speaking of the P2, I hope I could lay my paws on all of the Peters' marvels (P2D2, P2PAL, P2LAB) at some, not to distant point.
1. Is this Tachyon version valid? I am loading EXTEND.FTH from the dropbox into it. I notice that at the end, 0 0 INTERCOM! is run just before backup. Tachyon still complains about no EEPROM, despite the 5ms delay. When I type it in manually afterwards, it does not complain about no EEPROM
2. There was a fault with CONBAUD just a while ago, where it was writing to $28 when it should have been $18, which was fixed. Is this a similar issue?
So again, the Tachyon version information gets corrupted and also .INTERCOM reports the value changes, so may also need fixing - maybe other words too that have these 'magic number' memory references.
It's been a while since I used intercom and the memory map was rearranged in that time so there could be some conflict. If you find it then good, but I will set it up and check it out when I get a chance.
Yes, I meant I'm writing a driver for the si5351 that you're using on P2D2. It's a popular choice for software defined radios and performs well - I've heard how it sounds..
Have you compared or seen any comparisons of the Si5351 in MSOP10 vs QFN packages ?
One design I saw used QFN20(4x4) claiming better operation, and I see SiLabs now have a QFN16(3x3) part code, but no stocks showing yet ?
( GT = 10-MSOP, GM = 20-QFN, GM1 = 16-QFN)
I have not seen si5351 packages compared. My experience is limited to using a Multus Proficio all HF band transceiver which uses the si5351a https://multus-sdr.com/index.php?rt=product/product&product_id=123. I use GSDR on Windows with that and with a pair of Bose speakers it is a very clean sounding receiver, with 'brick wall' passband. If you leave the audio on binaural and use headphones it feels like you're 'floating' inside the band. I'm experimenting with an adafruit si5351a module with the P1. This and the si570 have completely eliminated the need for LC tuned oscillators. There were some designs with dds chips, but the si devices cannot be beaten for performance / price. It's a pity the registers are not better suited to variable oscillator use, being originally intended as crystal clocks.
Near the end of EXTEND.FTH, a small delay was found necessary before the Intercom setting is zeroed, else the zeroing did not work properly as seen after reboot
5 ms
0 0 INTERCOM!
I've got RS485.fth to compile under Tachyon 5v7, there were some words whose names had changed and LOADCOG input reqts had changed. Just at the moment !BUS to initialise the comms causes Tachyon to freeze. It gets as far as BUSTX in SELECT. I wonder if the HSUART has evolved after RS485.fth was written. The parameter table buspars in RS485.fth is smaller than that in the HSUART source.
A drizzly cool day here - so I'm snug in the study, making my own prop plug from a USB serial dongle, which is working, and I can compile and blow tachyon 5v7 into the P1. Little steps forward I think.
Yesterday was sunny, so a nice little chug in our Lomax (open-top 3 wheeler) to Kemble Airfield where I used to fly a microlight. These days we just sit and drink coffee and watch others commit aviation. Cheers, Bob
Small world- I live on the other side of Bath in E Bristol.
Popped over with wife to Wales yesterday, had a picnic on the side of a reservoir. Very pleasant.
Helped a friend build a microlight many moons ago- I think it was called MW7 by Mike Whitaker.
The only plane I've flown was an RC slope soarer on Crooks Peak, Westbury White Horse and around and about.
Currently trying to get my head around wi-fi, 8266, internet etc. Sad really since I used to work in telecoms.....
Hah! - Nice one, Dave, practically next door --- Yes, there's certainly plenty to go at with microcontrollers these days, so many applications. I'm a real latecomer to Propeller, but enjoying getting into Tachyon with some homebrew cards. We regularly walk around the Bristol Docks - the BLT rolls and coffee at Underfall Yard are great and there's always something new to see building or repairing on the stocks. Good photography. You can see my little car at www.qrz.com and enter the callsign G4BBY. Microlighting - flew for 8 years, including annual fly/camp hols in France. Me and a pal used to spell each other off, got to within sight of Geneva the one year. The Loire valley another time with all the fancy chateaux was something else. Many photos and good memories.
Unfortunately while it does change a constant value, it doesn't change a constant
It changes the 15-bit constant value wordcode like this:
TF5> : DEMO 1234 ;
TF5> DEMO . --- 1234 ok
TF5> 1000 ' DEMO :=! --- ok
TF5> DEMO . --- 1000 ok
But constants in Tachyon can be implemented in different ways.
If the value is less than 32768 then it can be contained in a wordcode where all 15-bit literals are encoded with the msb set.
If you enter a 15-bit literal within a definition it will be compiled as that value with the msb set. If you enter the 15-bit literal as a named constant then the wordcode value for that will be stored in the header instead of the CFA.
Normal dictionary record is:
ATR+COUNT,<NAME>,CFA
Dictionary record for 15-bit constant is:
ATR+COUNT,<NAME>,VALUE+$8000
Thanks Peter,
I'd been editing HSUART.FTH for use with Tachyon 5 and that seems to be there - it transmits OK at least.
So then I went back to RS485.FTH which makes some use of 'constants' ( Tachyon 4 allowed 1234 == myconstant ) which are later changed in value. I'll remove those and revert to normal variables.
I haven't used my Owon cheapy scope so much in ages!
Unfortunately while it does change a constant value, it doesn't change a constant
It changes the 15-bit constant value wordcode like this:
TF5> : DEMO 1234 ;
TF5> DEMO . --- 1234 ok
TF5> 1000 ' DEMO :=! --- ok
TF5> DEMO . --- 1000 ok
But constants in Tachyon can be implemented in different ways.
If the value is less than 32768 then it can be contained in a wordcode where all 15-bit literals are encoded with the msb set.
If you enter a 15-bit literal within a definition it will be compiled as that value with the msb set. If you enter the 15-bit literal as a named constant then the wordcode value for that will be stored in the header instead of the CFA.
Normal dictionary record is:
ATR+COUNT,<NAME>,CFA
Dictionary record for 15-bit constant is:
ATR+COUNT,<NAME>,VALUE+$8000
But if the named constant definition is >32767 then it will compile a long literal in code memory.
TF5> 12345678 := longcon
TF5> ' longcon .W --- 4E70 ok
TF5> ' longcon 16 DUMP ---
0000.4E70: 35 00 BC 00 4E 61 5A 00 70 CE 10 80 44 0B 5A 00 5...NaZ.p...D.Z. ok
The address to this long constant is what is compiled when it is referenced.
I will have to revisit Tachyon and tidy up a few things by the look of it.
yes - a bit tricky
there are at least two aspects to it:
1. using const vor convenience so we do not have to use the @/C@/W@ fetch operators and make the code more readable
which could be real constants or mutable constants
2. efficiency reasons like inlining the const value as a wordcode into definitions where it is used - but then it is no longer mutable
and this combined with 15 bit vs larger constants ...
for me 1. nice readable code is more important than optimizing 2 bytes and a microsecond in probably all cases I can think of
and it might not be immediately visible in the example above:
TF5> NFA' mycon 16 DUMP ---
0000.5142: 45 6D 79 63 6F 6E D2 84 45 44 45 4D 4F 32 68 4E Emycon..EDEMO2hN
TF5> mycon .W --- 04D2 ok
is the value of mycon 1234 or $04D2
with the high bit set to mark the constant in wordcode
and then the bytes compiled in changed order ;-)
but now, when you compile the const into a new word,
then change its value and compile it into another word.
Then the first word will use the old value and the second word will use the new value.
Can be the cause of nasty bugs if you do not understand what you are doing.
I'm in need of some arrays of records and put together the following, which seems to produce the right addresses:-
--- Records and Record Arrays
IFDEF -RECORD
FORGET -RECORD
}
--- start a record definition, leave zero offset into the record tos
0 := [FIELDS ( 0 -- )
--- define a new field within a record
pre FIELD
CREATE OVER W, + ( offset1 datasize -- offset2 )
DOES> R> W@ + ( recaddr -- recaddr+offset )
;
--- finalise a record definition
ALIAS := FIELDS]
--- defining word to create single records
ALIAS bytes RECORD
--- defining word to create arrays of records
pre RECORDS ( fieldsize recordnumber <arrayname> -- ; arrayindex -- adr )
GRAB
CREATE --- in the dictionary entry...
org@ W, --- save start address of data
OVER W, --- and save the record size
* @org W+! --- then in the dataspace allot reqd no. of bytes
DOES>
R@ W@ --- read the start address of the data
R> 2+ W@ --- read the record size
ROT * + --- and compute the start addres of the reqd record
;
--- example FIELDS definition - FIELD expects the allocated space defined in bytes
--- This FIELDS definition has the name recorddef
[FIELDS
2 FIELD txbuf
2 FIELD status
2 FIELD rxrd
2 FIELD rxwr
64 FIELD rxbuf
FIELDS] recorddef
--- example definition of a record
recorddef RECORD MYRECORD
--- example definition of an array of 3 records
recorddef 3 RECORDS MYRECORDARRAY
--- example use
MYRECORD rxrd . --- displays the address of the rxrd field within MYBUF
1 MYRECORDARRAY rxwr . --- displays the address of the rxwr field within the 2nd record in MYRECORDARRAY
Here's Peter's HSUART.fth demo adapted for Tachyon 5v7. It requires the HSUART ROM to be loaded into the top 32k of the EEProm, else it won't work
TACHYON V5
{ Demonstration of High Speed UART operation }
IFDEF HSUARTDEMO
FORGET HSUARTDEMO
}
: HSUARTDEMO ;
{
The HSUART is a ROM in upper EEPROM that can be loaded into a cog.
It is essentially half-duplex suitable for single wire or RS485 bus but
works well with full-duplex lines that operate in command/response mode
which is fairly typical of many communications systems.
The default mode is 9 data, non parity and 1 stop.
Extra stop bits may be transmitted by OR'ing in high data bits above bit9
as b8 is the 9th data bit.
HSUART can operate at well over 2M baud accurately.
Cogs 4 to 7 can be used
Cog 3 is either loaded with F32 or a loader but can be used
Cog 2 is normally loaded with Forth timing function - could possibly be used
}
64 := rxsz --- receiver buffer size in bytes
2000000 := baudrate --- UART baud rate
--- circular receiver buffer with pointers, one byte transmit buffer, UART status
72 bytes BUFS
BUFS org
2 res txbuf
2 res status
2 res rxrd
2 res rxwr
rxsz res rxbuf
--- HSUART parameter table required to initialise the UART
TABLE 485pars
&0.01.00.00 , --- mode.te.tx.rx, meaning transmit/receive on P0, Transmit Enable signal on P1
CLKFREQ baudrate / , --- baud rate in cpu ticks
rxsz || --- receive buffer size
txbuf || --- single word transmit buffer
--- startup HSUART in cog 4
" HSUART " 4 485pars LOADCOG
--- to send a character
pub TRANSMIT ( dat -- )
BEGIN
txbuf W@ 0=
UNTIL
$100 OR txbuf W! ;
--- to read a character (non-blocking, returns with 0 if empty)
pub RECEIVE ( -- dat )
rxrd W@ rxwr W@ <>
IF
rxwr W@
DUP rxbuf + C@
( $100 OR ) SWAP 1+ rxsz MOD rxwr W!
ELSE
0
THEN
;
--- Test words
pub TXTEST BEGIN $AA TRANSMIT KEY UNTIL ; --- transmit byte AA hex until a key is pressed
END
Tachyon Glossary being updated - I've copied the existing glossary https://docs.google.com/document/d/1gkSgKPYidRnhLaqgT7gfNyuhiTuWt-9tNRQC4epr7k4/edit#heading=h.2y2jztxhic28 and am updating it offline to match Tachyon 5v7. I'll post it when I've done as much as possible. There's a lot to add, so I just do a bit per day. I'm adding another column to show pub, pre, pri, variable, constant
It might be useful to also have it in spreadsheet form, the filtering and sorting being useful in viewing groups of words in many different ways. It imports easily being tab delimited, but I won't do this until the text version is done.
All in LibreOffice.
A bit cool in the little 3-wheel Lomax car today - definitely an Autumn feel, but still pleasant bowling along over the timeless Wiltshire Downs with the fallen leaves whirling around us. Meep-meep!
Comments
This reminds me, I will have to document the ping-pong protocol as I will also implement this on the P2 as well.
(note) clkfreq/3M @80MHz = 26.66r = 26 ticks but if you use 2962000 baud on the P1 side then ticks = 27 and much less error Perhaps I should round the calculation then.
P.S. When I said I use CONBAUD all the time I must be mistaken in regards to V5. It seems I have been using the incorrect address for this version
Just a quick clairification, does the latest version of TF5 auto-select 5 or 10 MHz XTAL?
Jim
Yes, they all do since many of my systems use 10MHz crystals since I use SMD or cylindrical types rather than the bulky HC49. All the Parallax designs seem to be 5MHz and in the Flip where the 5MHz crystal would be too large they use a 5MHz oscillator.
So it's an easy thing to have the setpll routine which PhiPi wrote back in 2009 adjust for these two standard frequencies.
I notice in extend.fth the setup word INTERCOM! ( config baud -- ). Config is defined with an IP long as &GP.ID.TR.TE. I'm guessing this means GP - processor group, ID - this processors' address in that group, TR - pin for transmit/receive, TE - pin to control rs485 chip transmit / receive direction?
After typing in a test setting &01.01.06.07 1000000 INTERCOM! just as an experiment, tachyon complains:- How is it really set up, please?
What settings does a master need versus a slave?
Just in brief, how would an RS485 chip be connected and what chip is recommended? I am guessing the transmitter and receiver are just back to back and the signal direction set with TE
When just 100 ohm resistors are used, can you define the TE pin as unused?
Do I need any ROMS installed?
My bad, it looks like the EEPROM is still busy after the last write and when it goes to ELOAD from there, the EEPROM will not respond. It just needs a short delay but I've got a feeling I removed a busy test that has caused this problem.
The 100R should be fine although I should check this out myself. It could be that the line may require some kind of pullup for when it is not being driven.
It's a sunny, calm morning here with just a hint of autumn, we're off to Clevedon on the Bristol Channel today. The sandwiches and binoculars are packed, so it's the seaside for us today.
Do you mean the Si5351? I have that one running in TAQOZ although I need to add frequency configuration stuff to change it at runtime.
Yes, I meant I'm writing a driver for the si5351 that you're using on P2D2. It's a popular choice for software defined radios and performs well - I've heard how it sounds. I'm using an integer output division to minimise output jitter and a fractional PLL feedback division so as to be able to (roughly) tune to the nearest 4Hz, over the range 4-120Mhz. To drive a tayloe mixer, the si5351 o/p is further divided by 4 to make two quadrature phased signals in the range 1-30MHz with a high speed 7474 type external chip. The frequency is varied smoothly by a cheap rotary encoder, to around 1 Hz precision. There also needs to be a word to update the assumed crystal frequency having tuned the radio to a frequency standard like WWV.
Most software reading a rotary encoder you find on the web is not very good. They keep the increment fixed at 1Hz/step, 10Hz/step, 100Hz/step selecteable by a push button. Mm - very clunky. My version detects how many encoder steps have occurred in ( say ) 25mS and then squares that value - or some other non-linear function that feels right. That way, you still get 1Hz tuning steps when the knob is tuned slowly, but if you spin it, you quickly get to the other end of the band. No need for the push button tuning step 'gear change'.
The trick in calculating the si5351 divider values is to work back from the wanted o/p. The other trick is to minimise the number of bytes that need sending to the chip each frequency change, if the value hasn't changed, don't send it again sort of thing. See https://rfzero.net/tutorials/si5351a/
The ideal is to mimic the smooth tuning we used to enjoy with analogue radios.
I'm able to read and write the chip and also calculate the divider values for a given frequency, just need to write more words to split the values up into the required 8 bit registers. I'll post it when it works.
Yes that's the idea, but with a decent low noise 24 bit analogue to digital converter in the front end of the receiver. The P2 would be able to deliver the really clean audio that sd radios are famous for.
Judging by all the youtube videos, the QCX, QSX or UCX radios https://groups.io/g/ucx sound quality is not the best, although the ATMEGA firmware is really amazing in such a low-power platform.
An SDR written in Taqoz with selected dsp words in assembly. That would be unique!
The attached file gives some idea of the circuitry, although this one delivers packets of signal data to a pc for processing
I'd be delighted if it was based on a Parallax or an ARM mcu with firmware written in forth, be it Tachyon or Mecrisp-Stellaris.
And speaking of the P2, I hope I could lay my paws on all of the Peters' marvels (P2D2, P2PAL, P2LAB) at some, not to distant point.
1. Is this Tachyon version valid? I am loading EXTEND.FTH from the dropbox into it. I notice that at the end, 0 0 INTERCOM! is run just before backup. Tachyon still complains about no EEPROM, despite the 5ms delay. When I type it in manually afterwards, it does not complain about no EEPROM
2. There was a fault with CONBAUD just a while ago, where it was writing to $28 when it should have been $18, which was fixed. Is this a similar issue?
So the values reported by .INTERCOM there look a bit suspicious.
When INTERCOM! is reloaded with the 5ms delay fitted, and 0 0 INTERCOM! is type in:-
So again, the Tachyon version information gets corrupted and also .INTERCOM reports the value changes, so may also need fixing - maybe other words too that have these 'magic number' memory references.
Have you compared or seen any comparisons of the Si5351 in MSOP10 vs QFN packages ?
One design I saw used QFN20(4x4) claiming better operation, and I see SiLabs now have a QFN16(3x3) part code, but no stocks showing yet ?
( GT = 10-MSOP, GM = 20-QFN, GM1 = 16-QFN)
I have not seen si5351 packages compared. My experience is limited to using a Multus Proficio all HF band transceiver which uses the si5351a https://multus-sdr.com/index.php?rt=product/product&product_id=123. I use GSDR on Windows with that and with a pair of Bose speakers it is a very clean sounding receiver, with 'brick wall' passband. If you leave the audio on binaural and use headphones it feels like you're 'floating' inside the band. I'm experimenting with an adafruit si5351a module with the P1. This and the si570 have completely eliminated the need for LC tuned oscillators. There were some designs with dds chips, but the si devices cannot be beaten for performance / price. It's a pity the registers are not better suited to variable oscillator use, being originally intended as crystal clocks.
I'll download bst and have a go at seeing what the memory map change has affected.
I've got RS485.fth to compile under Tachyon 5v7, there were some words whose names had changed and LOADCOG input reqts had changed. Just at the moment !BUS to initialise the comms causes Tachyon to freeze. It gets as far as BUSTX in SELECT. I wonder if the HSUART has evolved after RS485.fth was written. The parameter table buspars in RS485.fth is smaller than that in the HSUART source.
A drizzly cool day here - so I'm snug in the study, making my own prop plug from a USB serial dongle, which is working, and I can compile and blow tachyon 5v7 into the P1. Little steps forward I think.
Yesterday was sunny, so a nice little chug in our Lomax (open-top 3 wheeler) to Kemble Airfield where I used to fly a microlight. These days we just sit and drink coffee and watch others commit aviation. Cheers, Bob
Small world- I live on the other side of Bath in E Bristol.
Popped over with wife to Wales yesterday, had a picnic on the side of a reservoir. Very pleasant.
Helped a friend build a microlight many moons ago- I think it was called MW7 by Mike Whitaker.
The only plane I've flown was an RC slope soarer on Crooks Peak, Westbury White Horse and around and about.
Currently trying to get my head around wi-fi, 8266, internet etc. Sad really since I used to work in telecoms.....
Dave
Defining and printing a contant:- Changing the value of the constant: The constant hasn't changed, anyone see the same please?
It changes the 15-bit constant value wordcode like this:
But constants in Tachyon can be implemented in different ways.
If the value is less than 32768 then it can be contained in a wordcode where all 15-bit literals are encoded with the msb set.
If you enter a 15-bit literal within a definition it will be compiled as that value with the msb set. If you enter the 15-bit literal as a named constant then the wordcode value for that will be stored in the header instead of the CFA.
Normal dictionary record is:
ATR+COUNT,<NAME>,CFA
Dictionary record for 15-bit constant is:
ATR+COUNT,<NAME>,VALUE+$8000
But if the named constant definition is >32767 then it will compile a long literal in code memory. The address to this long constant is what is compiled when it is referenced.
I will have to revisit Tachyon and tidy up a few things by the look of it.
I'd been editing HSUART.FTH for use with Tachyon 5 and that seems to be there - it transmits OK at least.
So then I went back to RS485.FTH which makes some use of 'constants' ( Tachyon 4 allowed 1234 == myconstant ) which are later changed in value. I'll remove those and revert to normal variables.
I haven't used my Owon cheapy scope so much in ages!
yes - a bit tricky
there are at least two aspects to it:
1. using const vor convenience so we do not have to use the @/C@/W@ fetch operators and make the code more readable
which could be real constants or mutable constants
2. efficiency reasons like inlining the const value as a wordcode into definitions where it is used - but then it is no longer mutable
and this combined with 15 bit vs larger constants ...
for me 1. nice readable code is more important than optimizing 2 bytes and a microsecond in probably all cases I can think of
and it might not be immediately visible in the example above:
TF5> NFA' mycon 16 DUMP ---
0000.5142: 45 6D 79 63 6F 6E D2 84 45 44 45 4D 4F 32 68 4E Emycon..EDEMO2hN
TF5> mycon .W --- 04D2 ok
is the value of mycon 1234 or $04D2
with the high bit set to mark the constant in wordcode
and then the bytes compiled in changed order ;-)
but now, when you compile the const into a new word,
then change its value and compile it into another word.
Then the first word will use the old value and the second word will use the new value.
Can be the cause of nasty bugs if you do not understand what you are doing.
It might be useful to also have it in spreadsheet form, the filtering and sorting being useful in viewing groups of words in many different ways. It imports easily being tab delimited, but I won't do this until the text version is done.
All in LibreOffice.
A bit cool in the little 3-wheel Lomax car today - definitely an Autumn feel, but still pleasant bowling along over the timeless Wiltshire Downs with the fallen leaves whirling around us. Meep-meep!