Sunday 21 June 2020

IKA Logic SQ200 Logic Analyser Review

This is a new toy I have just got, I've only had it a few days, but I've been quite impressed so far. It is an SQ200 from IKA logic, a 200MHz 4 channel logic analyser / signal generator.

I've been using a DSLogic Pro for the last three or four years, until last month it stopped being detected properly. It is one of those things which has the firmware loaded onto it by the driver, so it connects as one type of device, get the firmware, disconnects and then reconnects as the proper device. That has stopped happening now, and I've not been able to get it to identify properly, so it's bricked, currently waiting to hear back from support to see if there is anything they can do.

In the interim, I have been using a cheaper generic clone of something or other from ebay. It works, but has a sample rate of 24Mhz, which means it's not accurate enough to things changing at 16Mhz. I am currently working on the firmware for the Mini PET video controller, and the timing has to be precise down to one instruction of it's 16Mhz clock, and that is down in the sample noise of that unit.

So, time to get something that's a lot faster. This is 200Mhz, so is rather to be able to cope with signals up to 50Mhz, which is more than enough for what I need at the moment. It's limited to four channels, which is not ideal for some of the other things I do where 16 or more would be useful. But for serial protocols like UART, I2C, SPI etc. and the current video signalling it's great.

The unit comes with a USB lead and some probes. It's a very small box, 50mm square, but I guess it doesn't need to be any larger.

I wasn't too impressed with the quality of the supplied probes, those sort of clips aren't very good with IC legs. The connector at the device end is just a 5 way 0.1" connector, which is great, so you can make up your own leads. Not sure how that will work out with the higher frequency signals, but I guess just keep the leads short.

I have made up a set using the EZ Hook clips I have been using, these were a bit expensive, but have been worth it.

Because it is a easy connector to use, I have also made up a custom lead for the current job so I don’t need to clip multiple probes on each time.

The software is custom, and it is not currently supported by the open source sigrok Pulseview programs I have been using. So far it seems very nice and is doing what I need.

At 200Mhz I can capture 20mS, which is enough for a frame of video, and I can zoom down to line and pixel detail.

The issue I am currently dealing with is based on timing of the HSync pulses. They should all be 24uS high followed by 40uS low, but somewhere there is one that is slightly out. The dot clock on the PET video is 8MHz, so each pixel is 125nS wide. 
One instruction cycle on the microcontoller is 62.5nS, so a couple of instructions out and you are one pixel to the right of where you should be. Most of the code is NOP instructions so there are only a couple of NOPs to move around to fix it.

Various tweaks to the timing have given me close to the correct result, but each of the video modes needs to be dialled in to the exact timing. Ah, there's one of the culprits that 40us pulse is 60nS longer that it should be. One NOP instruction removed and it's now 40.000uS.

That is enough to change the video output from...

A nice straight line, and with all the other timing tweaks, composite and drive to CRT monitors is now all working nicely with nice straight edges on the side.

The SQ200 has a lot of functionality I have yet to investigate fully. One thing that looks very handy is being able to set a conditional trigger, only trigger when that signal is low and that one goes high, then low before the other one goes high, and things like that.

It had protocol decoders built in, so you can decode I2C etc.

It can work as a signal generator, and can also work as mixed input and output, so it can actually send I2C commands and display the results.

So that's looking like a very handy tool to have, and helped me finish off the last few tweaks to the PET video firmware.