Tip to getting started with logic analyzers and reverse engineering? - Page 1
Forum section: electronics / beginners

author: Sudo_apt-get_install_yum
author_rank: Regular Contributor
timestamp: April 12, 2018, 09:10:28 am
content: Hi everyone!I got an old 3D-Printer from work, the Davinci 1.0 pro 3in1 and it wasn’t working well (The reason why it was being tossed out) so I fitted new hardware and electronics and its working like a champ! One problem is that the screen and button panel are not compatible with the control board that I decided to use (MKS Base 2 running Marlin).So I want to make an adapter so that I can use the screen default screen and button panel with the new controller board. Since the software on the controller board is open source and is easily programmed with Arduino IDE I don’t think it’s the problem. I think the hard part would be how to drive the LCD but I could be wrong.The pinout would be relatively easy since I can just follow the traces of the ZIF socket back to the ATSAM3x8e-AU.I’ve never used a logic analyzer but I’m eager to get started with one. I don’t really think I need one for this project since I know what signal is coming from the new controller board, I do want to get some use out of these instruments. I was thinking of using the ATxmega128-b1 to drive the LCD since I have lots at home. I’ve done similar things in the past without the use for logic analyzers but I’m just eager to get started with oneI have two logic analyzers, one being an eBay rip-off of a Saelee 8 channel analyzer and the other one being my scope (SDS2304x) which has a 16 channel analyzer.If anybody would be kind and share some good books or pdf's on getting started with logic analyzers id be more than gratefulThanks in advanced!

author: Berni
author_rank: Super Contributor
timestamp: April 12, 2018, 03:47:21 pm
content: Its just like a scope with many channels.You hook it up and just stare at the waveforms to try and recognise what protocol it is. With some experience you can qickly spot the common ones. Then fire up a protocol decoder for it and just make it do diferent things while watching whats sent on the wires.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: April 12, 2018, 04:13:20 pm
content: Quote from: Sudo_apt-get_install_yum on April 12, 2018, 09:10:28 amCan you be a bit more specific? Driving the glass direct (in which case you need to determine the commons) or via a LCD controller?If the LCD is being driven direct then you will expect to see signals at different bias levels ), it's not digital.... a bit like this...

author: Sudo_apt-get_install_yum
author_rank: Regular Contributor
timestamp: April 13, 2018, 06:29:38 am
content: Thanks! I know what it is but not how to effectively use it is there some sort of simulator that you could use to practice? Or a book to read up on the subject, like what protocols look like what! And what pins are clock pins or the receive pin, is this just something you’ll have to figure out by trial and error

author: Sudo_apt-get_install_yum
author_rank: Regular Contributor
timestamp: April 13, 2018, 06:36:23 am
content: I will most likely drive the LCD using the built in LCD controller of the ATxmega128-b1. It is currently driven directly of the SAM on the DaVinic board.How would I determine what signal is what in the sheet you posted? Or would this just be something that the LCD controller would handle on its own?

author: abraxa
author_rank: Frequent Contributor
timestamp: April 13, 2018, 06:54:49 am
content: QuoteI'm not aware of such a book but what you want to know is easily researched. Take SPI, for example, a very common serial bus used to interface peripherals (hence the name Serial Peripheral Interface). At the least, you need a clock and two data lines for bidirectional operation. All three lines are always active at the same time, never by themselves. So when you see a signal like that (most likely also with a chip select line that is low during transmission), you know it's SPI.You can research I2C the same way and learn to recognize it. Same with UART. And all other standard protocols that scopes/LAs can decode. It's research and experience, really

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 13, 2018, 07:12:13 am
content: Quote from: Sudo_apt-get_install_yum on April 13, 2018, 06:36:23 amyou dont look for book of "how to use logic analyzer". logic analyzer is only to capture the digital data at specified sample rate, be it serial (1-4 lines) or parallel (8-32 and beyond) lines. in this specific case, what you want is the datasheet for the LCD controller chip. if you want to understand protocol, you look for book or manual on say SPI, I2C, USB etc. if you are still overwhelmed by the subject, maybe you should go a little lower such as "what is digital data" or representation etc in google. as for logic analyzer, we dont need book, we only care not to exceed its input voltage range, usually in 0-5V range. on the software side, you just pick which protocol are you targetting, the SW will start reading and decoding for you, you usually see the ascii or hex translation beside the captured data. even the SW will not know what you are after, you pick wrong protocol, the SW will produce garbage, so its all in your head.

author: PA4TIM
author_rank: Super Contributor
timestamp: April 13, 2018, 07:56:03 am
content: I do not think it is a strange question. I have some LA's but never understood how to use them until I got a Tek 1241 complete with a sort of tutorial book. Like all instruments you need to know what you measure but you also need to know how to use one optimal and there is not much info about that.How to set up filters, trigger, sample frequency etc.Most people use a LA for debugging software or decoding some protocol and do not understand there are other uses for an LA. I do not do software, I use them for repairing hardware and some reverse engineering. I had a hard time figuring out how to use one for my purpose.I use a Zero+ for the protocols (like decoding UART, I2C etc) and cases 16 channels is enough. The Tek (with a frighting number of channels) to see if all control lines work and in the right order, if all data and adres lines work etc.

author: rstofer
author_rank: Super Contributor
timestamp: April 13, 2018, 05:43:14 pm
content: I mostly learn by doing...So, I would buy an Arduino and write some code:1) UART - send/receive data to/from a PC and capture the transaction. It can be as simple as having the PC emit a keyboard char and the Arduino echoing it back. Have the PC emit 'Hello World!\r\n', capture and decode it.2) SPI - buy an SPI port expander and use the Arduino to read and write to the IO pins via SPI. Capture the 4 signals and see what is happening.3) I2C - buy an I2C port expander and do the same thing. I2C is a much more complex protocol. Maybe buy an I2C RAM chip and read/write blocks of data. See what happens - particularly 'repeated start'.4) Parallel - have the Arduino output various values to a port. Maybe an 8 bit port. Just a simple counter would make a good test.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: April 15, 2018, 09:15:46 pm
content: Quote from: Sudo_apt-get_install_yum on April 13, 2018, 06:36:23 amYou need to determine how many commons exist on the LCD and then map elements to a common and a driver line. An oscilloscope will help you identify the commons... each common will have the same signal but offset from the other commons.You can tickle each element by applying a small AC signal to a pair of pins and then make a map of the LCD glass. (Do not apply DC... you'll break it)

author: kulla
author_rank: Unknown
timestamp: April 15, 2018, 09:56:38 pm
content: Youtube is your friend. OpenTechLAB has few nice videos about logic analyzers, start with this one:Then you have Sigrok wiki which is great source of knowledge about it and protocols it can decodehttps://sigrok.org/wiki/Protocol_decodersMost of them have image how they look like.