Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Strange behaviour of JTAG LPT cable.

Status
Not open for further replies.

Blueteeth

Well-Known Member
Hi,

Well, my comp finally died so I got a new system. Unfortunately, like most modern computers, it has plenty of USB's but doesn't have its parallel port connector installed (but thankfully one RS232). So, no big deal eh? I bought a cheap PCI parallel port card from NETMOS (USB -> lpt cables are useless for download cables). Installed fine, works just like my old comps on-board parallel port cept....

My lattice-isp JTAG cable I built a few years ago no longer works correctly. I've tested the cable on several boards, with several CPLD's. I even built another one to double check. Here is the schem: **broken link removed**

I have checked everything I can think of and so narrowed it down to the parallel port. Now, it DOES correctly program my chips, but only if the chip and programmer are powered by 3.3v. At 5v it just reads crap from the chip and gives an error...which is weird because the chip is a 5v part (min VDD is 4.5v). I can program my chips at 5v if I simply connect the parllel port lines to the CPLD chip via 1k resistors. - without any sort of buffer. The voltage '1' on the new parallel port is a healthy 5.2v via a 3 metre cable.

I can only assume that there is some problems with the voltage levels to and from the parallel port, or possibly noise. This would be the buffer's fault. I've only tried the 74HC244 as well as the VHC. Both have the same trouble. (with unused inputs tied low, decoupling caps etc..).

Can anyone shed some light on this? As I can program these chips 'direct' (no buffer) its no a big problem, but it certainly is annoying and its bugging me.

Blueteeth
 
So here is what I think your setup is. You are using a 5V CPLD. Your suspecting your P-port is 3v (What happened to standards?) Ergo, I assume your VHC part has a 5v supply to interface the cpld. The VHC part should handle the 3v input without problem, but what it drives torwards the Pport will also be >3v. This may be the trouble. Your Pport card does not like +5v logic.

That is what I am thinking anyways.
 
Yo Mike,

Yep CPLD 5v. The download cable is powered by the target board, which is either 3.3 or 5v depending on the device.

I think you've hit the nail on the head. After I posted I did more tinkering...the only problem the software has is reading back, well its its only feedback as to whats going on. The Pport card does output 5v, as I said, 5.2 on high level and 0.3v on low. It can also 'read' the chip via a 1k resistor....but with a buffer inbetween? naa not happening. Just doesn't like its input to be driven by a buffer at 5v....I'll experiment with some series resistors. Another weird thing....I'm guessing this Pport card has a relatively low input impedence, because it detects whether the calbe is on or off by having one of its lines tied to VDD of the cable/target board. Anything more than a 1K resistor and it doesn't detect it..! Weird no?

It seems its the price I pay for buying a 'cheap' card :(

Cheers man....I may bite the bullet and solder a parallel port connector to my motherboard (I have killed mobo's before ^^). All the support stuff is there, just no connector.

Take it easy,

Blueteeth
 
Cheers man....I may bite the bullet and solder a parallel port connector to my motherboard (I have killed mobo's before ^^). All the support stuff is there, just no connector.
Sounds like timing issue then.
Will the BIOS support the onboard? It is just crazy enough it might work :)

Maybe it is your cable, how long is it, low c?
 
Last edited:
Hey,

Ugh timing, I don't have a scope to check and the software is pretty unforgiving when it comes to tinkering with the progrmaming protocol (its Lattice semi, not user friendly people). But at least I'm getting close.

And yes the bios does support the LPT1 ^^ Guess this version of the motherboard was designed for a PC case without a parallel port 'hole' on the back. It appears in the device listings, has all its drivers, just no bloody DB25 on it. And they just HAD to fill all the holes with solder making sure I risk lifting pads cleaning it up...grr..

Meh two parallel ports works for me....one for programming stuff and one for hooking up a massive LCD :)

Cheers.

Blueteeth
 
Make sure your cable is not too capacitive (Homemade?). This sort of problem caused me nightmares once. Well not maybe nightmares but it was an issue.
 
The download cable/dongle is homemade. Parallel cable is bought/screened. But the lpt port connector is mounted on the PCB, and the JTAG ribbon cable is only 4 inches long...I thought I'd play it safe as it was on stripboard. Good tihnking though....as I breadboarded the circuit a few times and that didn't work so that could well be why the second attempt didn't work.

One other thing, as I've got today off work....might even be sad/bored enough to check for filter caps on the PCI card. They always 'forget' to install things like that these days. Damn them all.

Blueteeth
 
Last edited:
JTAG ribbon cable is only 4 inches long

This sounds kinda long for fast edges, you did use ground, signal, ground, signal configuration i hope.
 
This sounds kinda long for fast edges, you did use ground, signal, ground, signal configuration i hope.


Hi, naa thats fine for the JTAG clock frequency. It worked every time before. That said, the fact it runs 'ok' at 3.3V and not 5V could be a rise/fall time issue as you mentioned. Gonna add a port to my mobo tonight and see if that works as before.

Blueteeth
 
Also consider that crosstalk in a ribbon cable will be less at 3v than 5v. The ribbon cable should be configured as ground, signal, ground, signal configuration. Well anyways, Good luck and I hope you find the culprit.
 
Hi,

I have prototyped several configurations, all with the same results. I have come to the conclusion it has to be 'software'. Even though this new PCI LPT port does behave differently form your standard on-board legacy port, it does work.

In fact, I recently built another JTAG cable. Altera's byteblasterMV. This worked beautifully...same parallel cable, same length of dongle cable etc.. The only difference between this and the lattice cable is the pinout on the DB25, as different software uses different pins on the port.

Lattice has told me that I should buy a USB programmer...which I isn't really worth it since I do not use many of thir products...also, installinbg a parallel port on mym mother board proved useless, as theres no BIOS support. So, options? well, I could use the altera cable to download designs in a different format...but I'm planning on building a USB->serial->uC->JTAG cable. My coding abilities aren't that much but should be fun, as I could use it for all my devices....also it owuld work with my laptop for field upgrades.

Blueteeth
 
You sure there isn't a chip missing from the motherboard? I mean for the parallell port. Then again I think they probably have used a SuperIO chip for this which has a lpt port and the com port(s) and maybe some more stuff, so it's probably there.

Anyways you could try to find a version of the motherboard that has the parallell port, and flash your board with the BIOS from that. Might be more work than you are prepared to spend for this i guess...:eek:

Daniel
 
You sure there isn't a chip missing from the motherboard? I mean for the parallell port. Then again I think they probably have used a SuperIO chip for this which has a lpt port and the com port(s) and maybe some more stuff, so it's probably there.

Anyways you could try to find a version of the motherboard that has the parallell port, and flash your board with the BIOS from that. Might be more work than you are prepared to spend for this i guess...:eek:

Daniel

You're right, its a lot of work....but....I don't like change and I'll be willing to do a lot of work (but no money!!) to get things back to 'how they once were' ^^

On the motherboard, the lpt connector is missing, and the filter resistors/caps. But I'm pretty sure that the parallel port support is on-chip on the mobo....they haven't used dedicated I/O controllers on motherboards for years... I shall take my comp to bits, check out what needs doing, and trawl the web for a bios version...thankyou for the advice! I honestly didn't think of bios versions...as there are cariations on this that DO have a parallel port.

Update on the JTAG dongle. It DOES work, but only at 3.3v. at 5v, it complains. This goes for all dongles I have (most devices are 3.3V anyway, so the dongle works at that). The 5V devices I use, can be programmed at 3.3v, despite their datasheerts saying otherwise. I've used a bidirectional level shifter, so I can use 5/3.3v at both the dongle power, and the device power.....I'll experiment with all combinations. ...Lets face it, if I'm having issues with this, then I'm sure more and more people will...as LPT ports are still the cheapest/quickest way to program so many devices, CPLD's, ARM, uC, DSP etc..

As sad as it may seem I tihnk I may put all this up on a website for others...step by step to get a PCI parallel port installed and working. They really are quite different from the old native legacy ports.

Blueteeth
 
*solved*

Hi guys,

Not sure whether to post as it will use up forum resources, but just to say I've solved the problem.

After ALL that, turns out not one but BOTH of the parallel port extension cables I used had exactly the same problem. Crossed wiring on two connections. The dongle wasn't long enough to reach direct from my comp but I tried it as a last resort and everything works fine. Its not the length of the cable or noise or crosstalk after all.

But....why would it work at 3.3v and NOT 5v??! - winner gets a cookie.

As always, its crossed-wires/mechanics that breaks something. A good lesson for all of you, change cables! This also goes for SATA cables for hard-drives, as these are so sentitive to dust/grime on the connectors that it can kill a computer (won't boot at all).

Thanks for the advice, and at least now I have a 'new' parallel port dongle.

Cheers,

Blueteeth
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top