0
\$\begingroup\$

So I was thinking of buying a logic analyzer and found that a lot of the cheap ones are good to only a few mhz, and the microcontroller based ones can't have big buffers. So I was wondering if I could just use ram as a buffer? Like if it has 16 data lines, a 20 bit address, could I just feed 16 digital inputs (the ram I'm looking at reads >2.2V as HIGH so should be compatible with 3.3V logiv), and a 20 bit address counter run by a very carefully picked out crystal or some other kind of stable clock generation? I figure if the ram has a 45 ns write time, I should be able to easily get 22 odd MHz for only a few bucks, and then read it back with a slow micro controller or something, it doesn't need to access that data very fast.

However, I find that usually when I (and many other newbies) have these "why doesn't anyone do this?" ideas, there's usually a good reason.

\$\endgroup\$
7
  • \$\begingroup\$ Seems like a reasonable plan ... \$\endgroup\$
    – brhans
    Commented Oct 22, 2018 at 2:50
  • \$\begingroup\$ doesn't it? Surely I'm missing something \$\endgroup\$
    – Neywiny
    Commented Oct 22, 2018 at 2:56
  • \$\begingroup\$ Well, to start, a 20 bit, 20 MHz counter is going to take a pretty fast logic family. 74HC won't cut it. You need a synchronous counter chain (no 7490's) and propagating the ripple carry over 20 bits in 50 nsec is ambitious. Also, you should be aware that making a system using 45 nsec RAM at 50 nsec cycle time is not for the faint of heart. \$\endgroup\$ Commented Oct 22, 2018 at 3:20
  • 1
    \$\begingroup\$ You'll need to buffer the incoming data, to be stable during the RAM's write cycle. And you'll usually want an external clock to drive the RAM behavior, so you are certain you are grabbing stable 1s and 0s from your system. Use a Schmidtt Trigger on that external clock line. \$\endgroup\$ Commented Oct 22, 2018 at 3:20
  • \$\begingroup\$ Thank you both for the insight. I've seen some AvE and EEV blog stuff on high speed circuits, where the electrons "fly out of 90 degree turns" and all that. Certainly wouldn't be easy, I looked at some counters and found one that should work but yeah most are max a few MHz. \$\endgroup\$
    – Neywiny
    Commented Oct 22, 2018 at 3:30

1 Answer 1

5
\$\begingroup\$

What you describe is more of a data recorder than an logic analyzer. A logic analyzer includes the ability to generate a trigger based on the input data. It stops storing when the trigger sequence and/or pattern is detected so that you can examine the stored data.

Also, you would need to add an external register between the outside world and the SRAM that is clocked by the same clock as the SRAM so that the data is stable as it is being written.

With some refinements, what you describe is possible and you would certainly learn a lot implementing it. To save time, you could perhaps even use a low cost FPGA development board that has some built in memory as a starting point.

However, if you just need a tool to use now, it's probably best to get the cheapest USB based analyzer with enough memory and speed that you can find.

\$\endgroup\$
1
  • \$\begingroup\$ Yeah I guess it would work best with like clock lines from i2c/spi/whatever, otherwise I'd have to enable the logger pretty quickly and might miss it considering 22mhz would fill it up pretty darn quick without hardware RLE stuff. Thank you for the information. I want it to analyze packets on another potential project, so I could just tell the main MCU to turn on the logger right before it sends data. \$\endgroup\$
    – Neywiny
    Commented Oct 22, 2018 at 3:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.