Parallel port program for RTAI

More
22 May 2024 09:51 #301143 by Frank___
I need to write a single-use application to use a parallel port as a "poor man's" logic analyzer.  This will be used to look at the control protocol for an old 8" floppy drive that has a parallel port interface.  I'm not sure of the speed that I need, but it will surely be at a snail's pace compared to today's hardware.  I'm looking for work that I can "go to school on" that I may adapt for my needs.  It would be a time saver compared to programming from scratch.

I realize that this is not a CNC question.  If I don't belong here... 'my apologies.  Advice on a more appropriate forum would be welcome too.

  Thanks

Please Log in or Create an account to join the conversation.

More
22 May 2024 13:42 #301149 by tommylight
Download the LinuxCNC 2.9.2 ISO from the downloads page, burn to a USB, boot the PC from it or install it to HDD/SSD, use the included Hal Scope to watch the input pins.
See how to use the scope without starting LinuxCNC if it bothers you to start the scope from there (machine menu, hal scope).
Normally you have 5 inputs on a parallel port, but almost all built in and some add on parallel ports can do 3 modes:
Mode out = 12 out 5 in
Mode in = 13 in 4 out
And mode X = 9 in 8 out
So using mode in you have 13 data pins to play with.
All this runs at quite slow rates compared to normal scopes, but is usable for a lot of things.
-
All PC' have a Line in and Mic in analog inputs, so 4 inputs in total, there was an open source software that used those inputs as scope and worked OK, no idea what it was called.
I have used both methods for long time before i got the small Miniware scope.
The following user(s) said Thank You: Frank___

Please Log in or Create an account to join the conversation.

More
22 May 2024 21:57 #301165 by Frank___
Thank you for this information. From your description, the functionality of HAL Scope resembles what I am seeking. I searched the contents of the ISO, but I could find no source files for it. Might those source files be available elsewhere? Both the kernel and user-space code would be useful, but the source for the kernel module would be the biggest time saver. Thanks

Please Log in or Create an account to join the conversation.

More
22 May 2024 22:52 #301166 by tommylight
The complete source code is here:
github.com/LinuxCNC/linuxcnc

Please Log in or Create an account to join the conversation.

More
22 May 2024 23:48 #301169 by Frank___
Perfect! The file, scope_rt.c, is just what I am looking for. Thanks for the quick and excellent help
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
23 May 2024 00:16 #301172 by tommylight
You are welcomed, always.

Please Log in or Create an account to join the conversation.

More
23 May 2024 00:59 #301175 by cornholio
If you can get away with 8 channels the sigrok type usb logic analyzers arent bad, the software is good as well, just a thought

learn.sparkfun.com/tutorials/using-the-u...sigrok-pulseview/all
The following user(s) said Thank You: meister

Please Log in or Create an account to join the conversation.

More
23 May 2024 09:08 #301190 by Frank___
I actually have a usb logic analyzer, but thanks for the recommendation.. Mine is an 8-channel device. I need to watch 8 data lines and 5 control lines; thus, I thought of the parallel port option. What is more: I'd like to simulate the floppy drive (in-circuit) with my PC. Developing the code for monitoring the signals will be a head start in developing the simulator. Thanks again

Please Log in or Create an account to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum