Still, I want to use RS-422 or RS-485 to deal with ground noise since this will be spread over multiple boards that don't have terribly solid grounds, just the power cable really.
I'm thinking out loud here as much as anything. I intended to simply ask if anyone had experience with RS-485 that would be helpful. Running two wires rather than eight would be a help. I'll probably use a 10 pin connector just to be on the safe side,allowing the transceivers to be used either way.
One of my concerns is how to control this from Forth. The serial cable I would use would be from FTDI. They provide excellent drivers, but I have no idea how they allow for the user to manage the turn around of the bus from their high level language.I expect they won't have any app notes on controlling this from Forth.
RS-485 is a three wire system.
You don't say what the driver enable pin was driven by or how you controlled it. That's pretty much the only issue I'm concerned about.
On 11/2/22 12:59 AM, Lorem Ipsum wrote:allowing the transceivers to be used either way.
Still, I want to use RS-422 or RS-485 to deal with ground noise since this will be spread over multiple boards that don't have terribly solid grounds, just the power cable really.
I always recommend reading an old article from The Circuit Cellar
magazine titled "The Art and Science of RS-485". Google usually turns up
a copy:
https://www2.htw-dresden.de/~huhle/ArtScienceRS485.pdf
I'm thinking out loud here as much as anything. I intended to simply ask if anyone had experience with RS-485 that would be helpful. Running two wires rather than eight would be a help. I'll probably use a 10 pin connector just to be on the safe side,
RS-485 is a three wire system.I expect they won't have any app notes on controlling this from Forth.
One of my concerns is how to control this from Forth. The serial cable I would use would be from FTDI. They provide excellent drivers, but I have no idea how they allow for the user to manage the turn around of the bus from their high level language.
I have a FTDI breakout that I modified for RS-485. I cut a trace and
brought out the pin intended to control the transmitter. This worked
well for me. I never had a problem with a conflict with the start bit
but then I wasn't trying for maximum speed and I included an extra byte
or two at the start of a packet just to make sure that the receiver
synched up to the start bit. The bus was supposed to idle high (bias and
a MAXIM part) but I wanted to be sure.
Software was in C for Linux while the target was a MSP430.
On Wednesday, November 2, 2022 at 7:26:12 AM UTC-4, David Schultz wrote:
RS-485 is a three wire system.I suspect you are simplifying here. (TX/RX/Ground?)
RS485 like RS422 uses differential signals on a twisted pair.
The audio and telephone industry referred to these as "balanced lines" 100 years ago.
(of course they used transformers to accomplish this and transformers are still
preferred for best CMMR in the audio band)
Many years ago I used RS422 and the simplest protocol ever developed by the late
Randy Dumse, called EASY-A. I needed something out the door fast and it did the
trick.
Easy-A is a master/node system. Each node sits in a loop waiting for control A.
If control A is received. the node waits for a byte identifier.
If the byte identifier matches the nodes identity, the Forth interpreter is exposed to the RS-422 buss. All other nodes go back into the wait for A loop.
It got me out of a jam so I never changed it.
I put my MaxForth lib up on github so it available here: https://github.com/bfox9900/MaxForth-68hc11/blob/master/LIB/EASYA.MAX
I've used Win32Forth on this for 12 years, but it seems to have less
and less support.... So I might choose a new Forth to host this
system. There are lots of free, open source Forths available. I just
hate coming up learning curves.
One of the hard parts with this is going to be keeping track of the
data if failures are detected while running unattended. It takes
maybe 10 seconds to run a full test. Times 80 units and 20 hours,
that could add up. lol Maybe it will just go to a text file until the operator wants to record the final test data.
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
I've used Win32Forth on this for 12 years, but it seems to have lessGforth is the only one I've used and I'd say for what you are doing, you probably want something with a better documented multi-tasker.
and less support.... So I might choose a new Forth to host this
system. There are lots of free, open source Forths available. I just
hate coming up learning curves.
VFX has
that, but as you say, there are licensing questions. For embedded cpus Mecrisp seems really nice. I once tried using it on ARM Linux and it
crashed back then, but that is hopefully sorted by now. I don't know
what your Win32Forth app did but I think I wouldn't try writing a GUI
app in Forth.
I'd have it generate text files or at most use an
embedded web server (there is one for VFX) and point a browser at it.
One of the hard parts with this is going to be keeping track of theYes, that is reasomable. 10 sec/test x 80 units = 8 tests/sec so even
data if failures are detected while running unattended. It takes
maybe 10 seconds to run a full test. Times 80 units and 20 hours,
that could add up. lol Maybe it will just go to a text file until the operator wants to record the final test data.
if there are a few kbytes of output per test, it shouldn't be that big a deal to log it all on a PC.
You just need a way to combine all the
output streams together. A quick web search found this expensive ($659) gadget that connects 32 rs-232 ports to a single USB host port:
https://www.coolgear.com/product/32-port-rs-232-usb-to-serial-adapter
Maybe there are cheaper or simpler equivalents too. It might be a
better use of your time to throw one or two of those things into your
test setup instead of building your own communication bus from scratch.
Then you write the PC app as it if were a network server talking to a
lot of concurrent connections..
I've seen similar things that go from rs232 to ethernet as well, same
idea.
Why on earth would I want a multitasker? Everything has to happen
through one port, so multitasking would just make it all more complex.
Are you suggesting I use multiple threads and multiple serial ports?
I wanted to provide an interface with displays and buttons, but when
push came to shove, I realized a simple command line was very
adequate.
Most of the testing is just pass/fail, no nothing to log unless
there's a failure.
At the end, the audio data is saved in a spreadsheet, along with data
about the testing system and date. The audio data is four - 16 bit
words, well, eight for both channels on a UUT
Comm bus from scratch? You are making it sound like this is complex.
It's mostly coded already.
You are making the whole thing incredibly complex. The protocol on
the serial port is to send a single message from the master. The bus
is then blocked until the slave replies.
To do otherwise would require some means of the slaves responding asynchronously.
That would be mindbogglingly complex compared to the simple protocol
I've selected,
and with no advantage other than potentially clogging the bus with collisions.
The actual port interface has to be single threaded by definition,
because the hardware is single threaded.
No customers involved. This is the factory production testing,
No, this is not needed at all. We may make note of how many passes
were executed, but I am defining the requirements. I don't need to
have data from 10,000 passes without error.
No need to be fancy. A "data base" is what I have in the spread
sheets. What would you want to see other than the date of testing...
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
Why on earth would I want a multitasker? Everything has to happenMultiple threads/tasks and multiple sessions active in one physical
through one port, so multitasking would just make it all more complex.
Are you suggesting I use multiple threads and multiple serial ports?
port. Just like a network server can talk to 1000's of remote
connections over a single ethernet cable. The TCP stack separates the conversations from each other and then you'd have 1 or 2 threads per conversation. You can write it single threaded instead, but I find
threads easier to use.
I wanted to provide an interface with displays and buttons, but whenNice, this sounds fine, as long as it will only be operated by yourself
push came to shove, I realized a simple command line was very
adequate.
or your techs. If customers will also see it, GUI's make the product
look more attractive.
Web GUI's in particular make it easy to separate
the front end from the physical hardware, so the bigwigs can look in on things from their offices while the actual test gear is in a remote lab.
Most of the testing is just pass/fail, no nothing to log unlessOf course you want to log the passes as well as the failures, for traceability if nothing else. Unit with serial# X passed test version Y
there's a failure.
at timestamp Z.
Still it's just a few bytes of data.
At the end, the audio data is saved in a spreadsheet, along with data about the testing system and date. The audio data is four - 16 bitThat sounds great. If you want to be a bit fancier you could save to a database. Maybe there is no need for that.
words, well, eight for both channels on a UUT
Comm bus from scratch? You are making it sound like this is complex.Well, I saw you talking about timing something to fit in a certain half
It's mostly coded already.
of a bit cell, which sounds like a headache compared to just letting a buffered uart handle it. You know your requirements better than I do, though.
Regarding moving from Win32Forth, it occurs to me, maybe you should look
at 8th? It is a departure from traditional Forth, but has cool stuff in
it that you won't find in old-school systems.
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
You are making the whole thing incredibly complex. The protocol onI see, so there is a pair of messages exchanged with FPGA #1, then a
the serial port is to send a single message from the master. The bus
is then blocked until the slave replies.
pair with FPGA #2, and so on. Does that mean only one test is running
at a time? You lose the benefit of parallel testing. If each pair
takes 10 seconds (command "run test", test runs for 10 sec, response "passed"), it takes almost 7 minutes to do everything.
To do otherwise would require some means of the slaves responding asynchronously.Yes, I did expect that. Maybe it's not needed.
That would be mindbogglingly complex compared to the simple protocolNah, it's not a big deal, network programmers today do that all day
I've selected,
long, and Polyforth was invented for basically that purpose 40+ years
ago.
and with no advantage other than potentially clogging the bus with collisions.There wouldn't be a bus with collisions, the fifos in the uarts and multiplexer would take care of serializing everything.
The actual port interface has to be single threaded by definition,Multi-threading in the software sense, i.e. there are a bunch of user
because the hardware is single threaded.
tasks with separate threads. At the physical port there is a (maybe not visible to the application) input loop that routes the individual
packets to the appropriate user threads. For example, in that port concentrator thing that muxes 32 rs232 ports onto a single USB port,
Windows then demuxes that USB port back into 32 logical TTY ports. It
all burns cycles under the hood, but it simplifies the programming.
No customers involved. This is the factory production testing,Ah, fair enough.
No, this is not needed at all. We may make note of how many passesYeah you wouldn't want to log each pass, though "unit X passed 10,000
were executed, but I am defining the requirements. I don't need to
have data from 10,000 passes without error.
tests" could be helpful. I know that these days, fancy-ass cable
crimpers (used for power wiring in big office buildings, say) actually record the timestamp and crimp pressure of each crimp that they do, and
the data gets collected by an app so it can be handed over to the
building inspectors. Then if there is a faulty crimp somewhere, they
can trace it to the piece of equipment and/or operator that went wrong.
Same idea.
No need to be fancy. A "data base" is what I have in the spread
sheets. What would you want to see other than the date of testing...
A database is simpler to process with a program, say to check whether
there was a higher rate of failures in units built on Mondays. Perhaps
that stuff isn't relevant unless you're running at much a bigger scale.
I may have another can of worms with the Forth. I've used Win32Forth on this for 12 years, but
it seems to have less and less support. It's working fine, but it does have the false positive
virus report problem. Every time I take these computers to a new facility and connect them to
a network, all manner of alarm bells go off, in some cases literally.
So I might choose a new Forth to host this system. There are lots of free, open source Forths
available. I just hate coming up learning curves. VFX is a potential candidate, but I'd have
to keep track of where it's installed to keep within the license restrictions, although I think
they are pretty relaxed about that sort of thing.
Thanks for your reply.Groetjes Albert
Rick C.
In article <864d6fd3-3f0c-4328...@googlegroups.com>,
Lorem Ipsum <gnuarm.del...@gmail.com> wrote:
<SNIP>
I may have another can of worms with the Forth. I've used Win32Forth on this for 12 years, butThat reflects bad on the maintainer of Win32Forth.
it seems to have less and less support. It's working fine, but it does have the false positive
virus report problem. Every time I take these computers to a new facility and connect them to
a network, all manner of alarm bells go off, in some cases literally.
I am a one man show with
ciforth/lina/wina , but as soon as get a report of a false virus report I contacted the virus detector company. I merely had to point them to the github
source and they fixed it, without further effort on my part.
So I might choose a new Forth to host this system. There are lots of free, open source ForthsConsider looking a wina. It is compatible with linux and apple OS's.
available. I just hate coming up learning curves. VFX is a potential candidate, but I'd have
to keep track of where it's installed to keep within the license restrictions, although I think
they are pretty relaxed about that sort of thing.
Not regards windows facilities obviously.
Win32Forth... Every time I take these computers to a new facility and
connect them to a network, all manner of alarm bells go off, in some
cases literally.
Polyforth was invented for basically that purpose 40+ years ago.Great, so you will do this for hire and only charge $1,000?
I said on the bus, not in the UARTs.
Right now, I need to get on the proposal. The customer wants some contractual things that I am going to ask them to pay dearly for, and
need to be ready for the fallout.
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
Too low for an outside contract given the absence (so far) of a clear specification and test hardware among other things, but might be aPolyforth was invented for basically that purpose 40+ years ago.Great, so you will do this for hire and only charge $1,000?
realistic budget for a hypothetical programmer who was already working
on the project.
I said on the bus, not in the UARTs.Yes I'm comparing having UART's with having a parallel bus. I think the software side is not too bad, but it depends on what you are used to. I suppose I'm having the same reaction to the parallel bus approach, since it's not what I'm used to.
Right now, I need to get on the proposal. The customer wants some contractual things that I am going to ask them to pay dearly for, andGood luck!
need to be ready for the fallout.
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
Win32Forth... Every time I take these computers to a new facility and connect them to a network, all manner of alarm bells go off, in someI don't see why Win32Forth is being exposed to the network? It's just a
cases literally.
file on the computer, and shouldn't be sending copies of itself through
a network virus scanner.
I wonder if you can give up on Windows. I just got a Raspberry Pi 400
(I got the $100 combo kit from https://www.adafruit.com/product/4796 )
and it is very nice. I plugged in an HDMI monitor, powered up the Pi,
and it booted right away. "apt install gforth" took a few seconds.
After the Pi booted it wanted to download and install a software update
that took nearly an hour. That was annoying but was a one-time thing.
I will try to make an updated SD card image to avoid that in the future.
The Pi 400 is out of stock at Adafruit, but unlike the unobtanium Pi 4B, they restock the 400 every few days, it seems. If you put in your email address to get a restock notification, you should get one pretty soon.
They are not too hard to find elsewhere either. They are probably cheap enough to permanently deploy at the test lab or wherever you are
currently bringing your PC.
So I might choose a new Forth to host this system. There are lots of free, open source Forths available. I just hate coming up learning curves. VFX is a potential candidate, but I'd have to keep track of where it's installed to keep within the license restrictions, although I think they are pretty relaxed
about that sort of thing.
I assume they scan the hard drive.
Ok, are you going to rewrite my test program to run under gforth on
the rPi?
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
I assume they scan the hard drive.If plugging a computer into someone else's network lets them scan your
hard drive, that is pretty scary.
Ok, are you going to rewrite my test program to run under gforth onI thought you were open to migrating from win32forth. If you don't need multitasking, gforth might be an ok candidate. I've never used
the rPi?
win32forth so don't know what porting issues you would face. Gforth as
a Forth language implementation is very featureful, but its system
interface is rather crude. It has a limited set of built-ins and beyond
that, it has a hacky way to make Linux system calls, but you have to
refer to the Linux documentation (which is C oriented) to understand
what the calls do. I have no idea how the Windows gforth port deals
with this issue.
I said I would use a different Forth. I didn't say a different OS. I
have system calls in the code, some of which I didn't
write... actually all of that stuff was library or handed to me.
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
I said I would use a different Forth. I didn't say a different OS. IIt occurs to me, rather than stuff of writing app output into the paste buffer, your app could write out a CSV file. Spreadsheets can usually
have system calls in the code, some of which I didn't
write... actually all of that stuff was library or handed to me.
read those in, and you have an artifact that you can save. It seems
cleaner than the stuff with the paste buffer.
With the batch mode testing, the final test results for all 128 cards
could be dropped into a file along with the date. We'd need to
consider what to do about the serial number, but that could be entered
by the operator when asking for the final test results and it could be
added by the program to each line in the file.
I wish I had an effective way to do 3d drawing. The things I have
ideas of are very, very simple, but when I try to explain them to
people, they don't see what I see. But a drawing is worth a thousand
words.
Exactly. I've never found a decent tool for any number of what seem
to be simple tasks.
I need to talk to someone who makes rack equipment. See what they can provide off the shelf.
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
With the batch mode testing, the final test results for all 128 cards could be dropped into a file along with the date. We'd need toIf you can embed the SN into the board itself, e.g. in EEPROM, then the
consider what to do about the serial number, but that could be entered
by the operator when asking for the final test results and it could be added by the program to each line in the file.
test setup could read it out and include it in the file. I've heard of
PC fab places being able to laser etch SN's and bar codes onto
individual PCBs, but apparently that is not very common for now.
Stickers with SN's would be straightforward to do though.
No idea whether RFID tags on the boards could do you any good:
https://www.adafruit.com/product/2800
Try to avoid having operators type SN's since it's easy to make typing mistakes, to enter the SN for the wrong board, etc. If SN's have to be typed, you might want to include at least one check digit in the SN:
https://en.wikipedia.org/wiki/Luhn_algorithm
describes some methods.
I wish I had an effective way to do 3d drawing. The things I haveThe 3d printing kidz around here like Fusion 360 which is gratis for non-commercial use, 30 day gratis trial for commercial use, then
ideas of are very, very simple, but when I try to explain them to
people, they don't see what I see. But a drawing is worth a thousand words.
licenses start at $70/month:
https://www.autodesk.com/products/fusion-360/free-trial
I haven't tried it myself. I've fooled with OpenSCAD a little bit but
it seems like a lot of fiddling compared to a napkin drawing, if you are just trying to get an idea across.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 53:52:34 |
Calls: | 6,712 |
Files: | 12,243 |
Messages: | 5,355,274 |