programming aviation Technisonic TFM-138(b) using parallel port / emulate MS-DOS - Page 1
Forum section: electronics / projects

author: kyndal
author_rank: Regular Contributor
timestamp: May 14, 2019, 10:14:16 pm
content: hi guysIm trying to come up with a setup to program aviation FM radios, specifically the Technisonic TFM-138 and TFM-138Bthe "new way" requires a very expensive rs232-radio programming interface box PIB-100the radio's manual however does have a simple schematic (few transistors, resistors and a zener) that allows using the parallel portto bit-bang a proprietary serial protocol.the problem however is that it is a very old DOS only program.. will not work directly on modern pc'sany suggestions on the best approach to emulating/running DOS(slowly) on a newer computer, with the direct parallel port control required?dosbox? virtual box? vmware?I know that USB-parallel ports are no good.. I'm hoping to use a PCI-express card and my modern laptoprather than sourcing and having to carry an OLD computer around.also if anybody has the dos software (PCDLB + PCDLB2 / PCDLA.EXE PCDLB.EXE) it was, but is no longer available from technisonic, only the newer windows versions areany information on the PIB-100 interface itself / equivalent circuit etc. would be even better.Kyndal

author: coromonadalix
author_rank: Super Contributor
timestamp: May 15, 2019, 01:32:30 am
content: hum there was dos box emulators who worked very well, i had a very old qbasic program i needed to work on a printer.https://www.dosbox.com/download.php?main=1

author: Zero999
author_rank: Super Contributor
timestamp: May 15, 2019, 09:55:13 am
content: The problem with DOSBox is it doesn't support the parallel port, at least the common build doesn't.If you're using Linux, then you could try DOSEmu, which does have parallel port support.

author: coromonadalix
author_rank: Super Contributor
timestamp: May 15, 2019, 10:44:24 am
content: hum unless mistaken, i used a version who had an lpt port output, i could print to a file or an printer, but i think it maybe an was an hacked or modded one,can't find it in my archives, still searching ......Thats why i have an relatively recent <5 years motherboard with a true lpt port, i dont know for pci and pci-e to lpt port if they work reliably ?My friend tried with (pci pci-e cards) for ham radios without huge success (buffer issues ?), but resolved it with a mobo having an true lpt port.And i have another one with what they call an "pci to isa" interface, you can find this board on some compaq small form factor computers ...https://www-user.tu-chemnitz.de/~heha/basteln/PC/USB2LPT/https://www-user.tu-chemnitz.de/~heha/basteln/PC/USB2LPT/faq.en.htm--------------------------------------------------------------------------------------------------------------------------------this one has lpt support, i think its the one i usedDOSBOX Megabuildhttp://ykhwong.x-y.net/

author: Berni
author_rank: Super Contributor
timestamp: May 15, 2019, 12:15:02 pm
content: You will likely need a old PC with a real parallel port, but if you are lucky it could work.VMWare does support passtrough for for parallel ports. So you probably would want to run DOS under that. Its not perfect DOS emulation but its good enough to make most things run. Also you could probably get FreeDOS running natively on your PC, tho getting the LPT port working inside of it might be a challenge.The problem however is that any method of adding a LPT port to a modern machine ends up being quite far from the CPU. The way LPT ports work is pretty much like a GPIO register on a MCU, it simply outputs whatever value is written to it. This means that the timing of the write operation arriving at the ports controller is critical. Back when this was simply a latch sitting directly on the CPUs data bus meant that you could get pretty predictable timing on it. But in a modern PC the Parallel Port PCI card might have a whole chain of stuff between it and the CPU. That PCI slot might go to a PCI bridge chip that converts it into a diferent bus that goes into the motherboards southbridge, this connects to the CPU socket via a PCIe bus, then inside the CPU this connects to the memory controller subsystem (formerly a northbridge on older PCs) and this controller finally connects to the actual CPU cores where the Windows multitasking kernel runs and interrupts its work all the time. Phew... that's a long way.So because of all this extra crap in between the timing really gets messed up. To make things worse the LPT driver might have some extra functionality to fix this timing, but that functionality is designed to work with LPT printers, so it might make things even worse for other use cases.So its all a question of how bad timing your device can tolerate and how much your modern PC messes up said timing in the first place.

author: Psi
author_rank: Super Contributor
timestamp: May 15, 2019, 12:39:54 pm
content: You could try find one of those old tiny ISA single board computers with a printer port.If your lucky you can find one with a LAN port too.Stick it into a box so its a little self contained PC and install win98 on it.Then you can VNC into it from your main laptop and run the dos app to talk to the printer port whenever you need

author: kyndal
author_rank: Regular Contributor
timestamp: May 16, 2019, 12:46:15 am
content: thanks for the input guys.I'm hoping to some how get it working on my laptop.. either booted in ms-dos / free dos.maby emulated under windows / linux..last option. i guess is finding an actual i386 / i 486 SBC of sortsRune

author: Psi
author_rank: Super Contributor
timestamp: May 16, 2019, 12:59:23 am
content: Quote from: kyndal on May 16, 2019, 12:46:15 amI have one you could have for free, but im not in Canada.This onehttp://support.elmark.com.pl/advantech/pdf/PCA-6751man.PDFEven has LAN and printer port.

author: kyndal
author_rank: Regular Contributor
timestamp: May 16, 2019, 08:38:06 pm
content: Psi (Ψ). wow.. now that board would probably be just the ticket!Pentium might be too fast even. lol

author: Mirobot200
author_rank: Newbie
timestamp: February 08, 2023, 11:04:33 pm
content: Hi Kyndal,Were you able to work something out for programming the 138B with that LPT cable? Or finding that old dos programming software?Thanks,Miro

author: Psi
author_rank: Super Contributor
timestamp: February 08, 2023, 11:14:52 pm
content: I sent him that single board PC above, so it should have been pretty trivial to get win95 or 98 running then run his dos app in a dos prompt. Win 95/98 had no hardware address block like XP did, so dos apps could talk direct to LPT port address.In fact if memory serves me, i think i sent it to him with a 128MB CF card in it that had windows on it already.

author: GigaJoe
author_rank: Frequent Contributor
timestamp: February 09, 2023, 01:52:06 am
content: USB to LPThttps://www.aliexpress.com/item/1005002559575290.htmldosbox work with it ...

author: Psi
author_rank: Super Contributor
timestamp: February 09, 2023, 02:44:26 am
content: Quote from: GigaJoe on February 09, 2023, 01:52:06 amIt's not quite that simple, old dos apps that use LPT needs bare metal hardware access to LPT address lines.USB to LPT simulates an LPT port and allow windows printer API calls to be passed to the usb device so the I/O can be simulated.

author: GigaJoe
author_rank: Frequent Contributor
timestamp: February 09, 2023, 03:30:59 am
content: " needs bare metal hardware access to LPT address lines."any idea how actually it done? or it just speculations?

author: Psi
author_rank: Super Contributor
timestamp: February 09, 2023, 04:51:42 am
content: Before windows, in the DOS days, if you wanted to use the LPT port your program would write direct to the address registers of the system associated with the LPT port number you wanted.LPT1 had a base address of 0x378 and that was the data byte register address (writing anything to that address would set the high/low state of the 8 data bit pins on the LPT port). base adr+1 was for the status info, and base adr+2 was the control byte.It was pretty much the same as a MCU writing to the port/pin registers.When windows 95/98 came along the OS was running on top of DOS. So you could still run DOS programs and they could read/write to hardware. But when windows 2000/XP came along they removed that as it was a security issue to have DOS apps able to write/read direct to PC hardware. Also they got rid of the DOS layer altogether.USB to LPT adaptors use drivers that create a virtual printer driver in windows (or a virtual LPT port were you can setup a win-printer to point to), then if you print anything to that printer they pass that data along to the USB adaptor in some proprietary format and the MCU inside the adaptor generates the printer commands.There were some situations where USB to LPT adaptors did work for things other than printers, but it was very rare. I think you can toggle some of the status bits through the printer driver but you cant set the data bus directly.

author: cantata.tech
author_rank: Regular Contributor
timestamp: February 09, 2023, 07:45:11 am
content: I've used Dosbox extensively.QuoteUltimately what you're going to want to do is replace the parallel data interface with something more 'modern?' convenient.I suggest that you first try running it in Dosbox with the above options.Just as a hint, Dosbox works on both windows and linux. You might find one may work better than the other. I know that in some instances that Dosbox under linux was better for some things.

author: Psi
author_rank: Super Contributor
timestamp: February 10, 2023, 09:11:47 am
content: With a USB to LPT adaptor DOS box is just taking the LPT access from inside dosbox and routing it as if you were in windows command prompt and directed it to :PRN, which goes through the windows print driver. So the USB virtual usb printer works fine.But it falls over if you want to control specific bits at hardware addresses because the windows printer driver does not have a clue about that.

author: mikerj
author_rank: Super Contributor
timestamp: February 10, 2023, 12:33:38 pm
content: For very little money you could pick up one of the oldest generation thin clients that have a parallel port, (e.g. HP t5145/t5540/t5545/t5630) and install FreeDOS.

author: Psi
author_rank: Super Contributor
timestamp: February 11, 2023, 12:38:34 pm
content: yes an old PC with LPT port is the easier option. They are pretty much sold as junk.

author: SuzyC
author_rank: Frequent Contributor
timestamp: February 11, 2023, 02:51:04 pm
content: In my area, fully functioning old laptops with an actual XP installation and a genuine LPT "D" connector on the rear can be bought for pennies at any flea market. A XP utility to allow direct access to the LPT port from a program running in the DOS prompt is all that is needed to allow complete real-time direct DOS control of all the LPT registers.It is also possible to boot up to MSDOS 6.0 with a floppy or from a MSDOS BOOT CD to run small programs without entering windows. Does not need a driver to access LPT.Download: Google to easily findPorttalk22windows XP driver to open LPT access in XP.

author: Psi
author_rank: Super Contributor
timestamp: February 12, 2023, 12:57:52 am
content: Quote from: SuzyC on February 11, 2023, 02:51:04 pmThat's right, id forgotten there was a tool for doing that in XP.Just have to make sure you run 32bit XP. I'm pretty sure it didn't work on 64bit XP.

author: Njk
author_rank: Frequent Contributor
timestamp: February 12, 2023, 07:36:02 am
content: Yes, that's the main problem with LPT now. MS did not port the driver for the 64-bit address architecture. BTW some third-party solutions exist, for instancehttps://www.downtowndougbrown.com/2010/10/sivava-willem-eprom-programmer-on-windows-7-64-bit/