Configure usbasp or other USB device to lpt1?

Go To Last Post
20 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Years ago I sold circuit board with mega8s 9 them. I had a friend (who I have no way of reaching now) who made a windows software that used a basic parallel programmer so that customers could change settings on the board.

That was 15 years ago, and of course, nothing has a parallel port on it anymore.

The software is locked in to use lpt1 only.

So I need to find a way to communicate with the boards using USB, but configure it to lpt1.

In device manager I can try to change the port of the USB programmer, but none of the PCs I've tried list the printer port as an option.

I'm pretty ignorant when it comes to the workings of the ports and such.

Is there any way to make this work easily that I could give customers to allow them to interface with my PCB?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But if you get a USBAsp the PC to AVR connection is USB from PS to USBasp and then 6 pin ISP from USBAsp to AVR so why would LPT1 need to be involved in this ?!?

 

The software to drive USBasp is called avrdude.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can do that, if I want to use a "normal" .hex file and software.

 

My software is locked down to use lpt1.  You simply cannot point it anywhere else because it's based on using a parallel port programmer.

 

 

So I'm trying to find an easy way that I can still use the software with today's technology.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Goldiedpimp wrote:
I can do that, if I want to use a "normal" .hex

So what is "abnormal" about your hex file?

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Confused.

 

Are you talking about old legacy boards that needs to get re-programmed?

 

If so you could possibly look at separate USB-to-parallel converters. Just make sure they do act ass a full parallel port. A lot of such dongles might implement just the bare minimum pins that printers use, and possibly skip some of the more exotic pins. If your programming software uses "exotic" pins then you're out of luck. OTOH, they are dirt cheap, < $10, so you might very well test a few..

 

 

Or do you (desperately?) want to hold on to your custom programming software for some reason, even for new board designs?

 

If so, tell what special features it has and we might be able to advice on alternate ways ro proceed.

 

 

Goldiedpimp wrote:
I had a friend (who I have no way of reaching now) who made a windows software

No source code available?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Goldiedpimp wrote:
My software is locked down to use lpt1.
You mean programming application ? Why do you think you have to use that specific tool? Why not just use avrdude like the rest of the world does ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
Confused.

Likewise.

 

As clawson says, USBAsp (or any other ISP adaptor) replaces the old programmer, and connects direct to the AVR.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
you could possibly look at separate USB-to-parallel converters

Unlikely to work.

 

Not only do the adaptors not tend to be a very "close" emulation of a true LPT port, but such software often tends to rely upon direct hardware access - so doesn't work with anything emulated via USB.

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Google found me this: http://www.ehow.com/how_8698428_redirect-lpt1-usb-printer.html

 

If that does not work, you can try this:

 

This is not to be seen as an definitive answer, as I have no USB->Parallel cable to test it with.

Install debian/ubuntu in a VM, try running your SW with wine, if ok, proceed:

 

In terminal:

dmesg | tail

to verify connection after you plug in your USB cable.

 

Then:

ls -alt /dev/u*

to list USB devices. Find: /dev/usblp*

 

Make a symbolic link:

ln -s /dev/usblp0 lp1

Links 'lp1' to '/dev/usblp0' thus, USB interface should be available as 'lp1' to your software.

 

Try programming with your software..

 

 

Read this post for more explanations: https://ubuntuforums.org/archive...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I doubt that either of those will work for the same reasons as stated in #8

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

I doubt that either of those will work for the same reasons as stated in #8

 

 

*****

 

Posts flying in without me reading, I will take my rum outside in the sun.. blush

Last Edited: Tue. Aug 22, 2017 - 02:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For my windows software, it wasn't an open project. My developer wrote the software and board firmware. To lock customers into our software and not hack at the boards, we encrypted the hex files.

So customer buys our boards and can upload new firmware, change settings & fun stuff through the windows software.

You can still use a USB programmer if you're savvy.

Unfortunately, my costumers are mostly high school kids who just want to plug in and go. It has to be as simple as possible.

I don't have any source for the windows software, only exe's. My developer kept that himself and ended up parting ways without ever handing it over. He tended to see it as he was licensing it to me.

So I have windows software that only works with lpt1.

I'm trying to find a simple alternative to give to customers with no tech experience the ability to use this software.

Nothing I've found so far works.

I'm not sure it helps, but the programming cable is a direct parallel port cable. Printer port straight through to the programming pins on the pcb.

You can burn hex files using a USB programmer to the boards, but my software GUI won't work with that.

15 years ago when the boards were designed, USB wasn't am easy thing to integrate in a small board & I had no idea I'd be selling them after this long.

I'm wanting to open source it all, but I have no idea where to start.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Goldiedpimp wrote:
He tended to see it as he was licensing it to me

Well, I guess that's a lesson learned the hard way...

 

I'm wanting to open source it all, but I have no idea where to start.

So what, exactly, is "it all" ?

 

A Mega8 has only 8K flash and 512 bytes RAM - might it not be as easy to just start again from scratch ... ?

 

costumers are mostly high school kids who just want to plug in and go. It has to be as simple as possible

High school kids these days have the likes of Raspberry Pi, Arduino, and MicroBit ... 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've got around five different boards that all have different firmware. Since people who have the know how may play around with the firmware in arduino or something.

I don't want to put any money into any development. Like I said, the products are 15 years old. I don't sell nearly enough to warrant any further development. But on the other hand, if someone starts doing something great with the firmware it might spur some sales.

I'll agree that the kids are savvy these days. But after years of dealing with my customers, they just want things to work. They don't want to have to spend a lot of time. If it's an inconvenience, they just buy a competing product. The number one problem is dead batteries.

Like I said, if I can find something easy that I can use, it would be great. If not, then I probably won't mess with it. It's not worth the hassle for the couple hundred dollars a year I sell these days. if I was still selling like I did when I first released them, then I'd be begging for help redoing everything.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have GUI for customers to use to change settings instead of hacking at code.

We fwencrypted the firmware as a means to keep customers and competitors to have access to anything.

I can program then however I want.

The end user only has access to my GUI which is tied to lpt1 and I have no source code footer the GUI to change it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As we say "you're up ship creek without a paddle"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you had a look at https://www-user.tu-chemnitz.de/~heha/basteln/PC/USB2LPT/ ?

 

Contrary to all other USB→Parallel adapters which can connect to printers only, this makes connection to most hardware - without adapting the software!
A parallel port will be virtualized by the accompanying driver. The entire circuitry fits into a usual D-Sub shell housing.
A reverse device called LPTzUSB for connecting a USB printer to a legacy parallel port is available since 2006.
1. Operational areas

Typical devices are:
Programming devices (AVR, JTAG…)
Data logger, data acquisition
slow controls, like for garden, model railway…
Synchronous bus connections, like I²C, SPI…
Laboratory automation, simple robots

 

Good luck!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@canbeany1: Since that solution works with a driver, any old software that writes directly to hardware registers on the PC will fail.
.
(Writing directly to the CTRL, STATUS and DATA hardware registers on the PCs parallel port was common, e.g. in the case of bit-banging programmers. AVRDUDE still does that to support parallel port programmers - although real parallel ports are very rare these days.)

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, strike what I said in post above. The solution actually seems to capture (virtualize?) writes and reads to/from the hardware register addresses.

So that could work, but requires buying extra hardware.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As stated in #8, I agree with Johan's reservations in #18.

 

But, if it is as #19 suggests - you may be in luck!

 

The only way to find out for sure is to try it - but it appears you have nothing to lose ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...