Author Topic: Best way to exercise inputs of a logic circuit for analysis by a logic analyzer  (Read 2171 times)

0 Members and 1 Guest are viewing this topic.

Offline JoeNTopic starter

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
Instead of hooking my logic analyzer up to a microcontroller project, in this case I want to look at the outputs of a network of logic circuits and not have to slap a microcontroller on it.  I need to exercise the inputs of the logic network.  I understand the tool to do this is called a digital pattern generator.  What's a cheap decent one, if one exists? 

It occurs to me that you could get a cheap out out of an ATMega328P and control it via terminal over TX/RX and have 20 digital outputs.  The only problem is that those IO pins are spread over 3 ports.  Is there a way to update 3 ports on the ATMega328P at once?  I don't recall a way to do that.  I guess if you were going to roll your own, a very cheap 32 bit uC would work well here, you could updated  32 IOs at the same moment due to 32 bit wide ports.

Thanks.
Have You Been Triggered Today?
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
If you use shift registers with a latch (595) it would be pretty much exactly simultaneous.
So a small micro with UART (or USB) and a couple of pins to drive the shift regs is all you need.
And you can make it as big as you want - just cascade more shift regs one after the other.

[2c]
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2416
  • Country: us
Perfect application for a shift register such as the 74HC595. Daisy chain them for the required number of bits, shift in the next test pattern serially, then transfer the entire pattern to the storage register at once.
 

Offline JoeNTopic starter

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
I had given that some thought (as a way around the multi-port update issue, but not as a simple solution with a serial cable), my only concern is I would like to test it at speed.  Serial cable into a shift register, can we just call that a DC test as a close approximation?

If you don't mind slow, that is certainly the low cost way and I have all the parts, so thanks for that idea.

I not only want a quick way to know if all the output patterns are correct, but it would be nice to see how fast this network runs before it craps out and I expect it will run at 10mhz just fine.
« Last Edit: March 18, 2017, 07:30:32 am by JoeN »
Have You Been Triggered Today?
 

Offline jeroen79

  • Frequent Contributor
  • **
  • Posts: 529
Define 'at speed'.
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 6595
  • Country: hr
Average clock rate for 74HC595 is in a range of 25MHz.. You can easily transfer data serialy to it at 5-10MBit speed..
If you combine 8 uC outputs with 595, that's 5-10 MBytes per second.. Hardly slow..
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2416
  • Country: us
Or if you want to go back to your original 3 8-bit arduino ports idea, you just need an octal latch for each port.
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12297
  • Country: au
 

Offline JoeNTopic starter

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
Or if you want to go back to your original 3 8-bit arduino ports idea, you just need an octal latch for each port.

That's a good idea.  Thanks.  That would be reasonably fast and possible to get working very quickly.  To go faster would require a dedicated instrument which there appears not to be no cheap options (Saleae should add this on...) or something based on an FPGA.  It might not be too hard to get something working with a Max 10, but I am not nearly as good with FPGAs as I am with getting at ATMega328P working on a board with some support ICs.
Have You Been Triggered Today?
 

Offline JoeNTopic starter

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
Define 'at speed'.

Yes.  This ^^^^^^^

Faster than a USB-to-serial cable driving a shift register.  At least 10mhz, preferably.  That is not going to work with an 8-bit micro but it might be able to be done with the latest 32 bit M7 micros that go 300Mhz, for example, and certainly can be done with an Altera Max 10.  The difficulty just goes up for each one of these.  Writing code in Atmel Studio for the 328P is something I know how to do pretty well now and I can get the ports to run about as fast as possible.

Note:  I am measuring speed at the output clock plus the ability to generate a new bit pattern every clock.  So I am thinking in cycles per second, not specifically bits per second or bytes per second.  I haven't locked down the width just yet but if I use a micro, more width will lower speed in using more ports and having to latch it in.
« Last Edit: March 18, 2017, 09:16:09 am by JoeN »
Have You Been Triggered Today?
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
A CPLD or FPGA can generate anything you want and as wide as you can afford.

If 16 channels at 100 MS/s is adequate, the new Digilent DigitalDiscovery might be one way to go.
http://store.digilentinc.com/digital-discovery-portable-logic-analyzer-and-digital-pattern-generator/

The older Analog Discovery can do the same thing...
http://store.digilentinc.com/analog-discovery-2-100msps-usb-oscilloscope-logic-analyzer-and-variable-power-supply/

Here is a CPLD that's pretty cheap:
http://store.digilentinc.com/cmod-breadboardable-coolrunner-ii-cpld-module/

It needs an external 3.3V power source and it needs a JTAG programming cable:
http://store.digilentinc.com/jtag-hs2-programming-cable/
 

Offline JoeNTopic starter

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
If 16 channels at 100 MS/s is adequate, the new Digilent DigitalDiscovery might be one way to go.
http://store.digilentinc.com/digital-discovery-portable-logic-analyzer-and-digital-pattern-generator/

Thanks, that answers my primary question which was if there was a relatively cheap commercial digital pattern generator out there, even if it was an eBay special by some Chinese seller.  I am putting this down as a yes, looks like a decent one too.  I searched on "digital pattern generator" before I even made this thread and this product was not on the first three pages.  I am kicking myself, I know about this product, I just forgot that pattern generation was one of the features.

I am well set on the CPLD front.  I have MAX II 240 and 1270s, a few MAX 5's and even two MAX 10's in my kit right now, as well as some XC9572s.  I have a Xilinx cable from Digilent and a clone adapter for Altera from some Chinese seller, but it works fine.
Have You Been Triggered Today?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf