Author Topic: Tip to getting started with logic analyzers and reverse engineering?  (Read 3987 times)

0 Members and 1 Guest are viewing this topic.

Offline Sudo_apt-get_install_yumTopic starter

  • Regular Contributor
  • *
  • Posts: 165
  • Country: se
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 one  :D

I 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 grateful :)

Thanks in advanced!
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5024
  • Country: si
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #1 on: April 12, 2018, 03:47:21 pm »
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.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2507
  • Country: gb
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #2 on: April 12, 2018, 04:13:20 pm »
I think the hard part would be how to drive the LCD but I could be wrong.
Can 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...



 

Offline Sudo_apt-get_install_yumTopic starter

  • Regular Contributor
  • *
  • Posts: 165
  • Country: se
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #3 on: April 13, 2018, 06:29:38 am »
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
 

Offline Sudo_apt-get_install_yumTopic starter

  • Regular Contributor
  • *
  • Posts: 165
  • Country: se
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #4 on: April 13, 2018, 06:36:23 am »
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?
 

Offline abraxa

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: de
  • Sigrok associate
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #5 on: April 13, 2018, 06:54:49 am »
Quote
Or a book to read up on the subject, like what protocols look like what!
I'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 :)
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #6 on: April 13, 2018, 07:12:13 am »
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.
you 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.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline PA4TIM

  • Super Contributor
  • ***
  • Posts: 1164
  • Country: nl
  • instruments are like rabbits, they multiply fast
    • PA4TIMs shelter for orphan measurement stuff
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #7 on: April 13, 2018, 07:56:03 am »
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. 

www.pa4tim.nl my collection measurement gear and experiments Also lots of info about network analyse
www.schneiderelectronicsrepair.nl  repair of test and calibration equipment
https://www.youtube.com/user/pa4tim my youtube channel
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9933
  • Country: us
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #8 on: April 13, 2018, 05:43:14 pm »
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.

 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2507
  • Country: gb
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #9 on: April 15, 2018, 09:15:46 pm »
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?
You 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)
 

Offline kulla

  • Supporter
  • ****
  • Posts: 34
  • Country: se
Re: Tip to getting started with logic analyzers and reverse engineering?
« Reply #10 on: April 15, 2018, 09:56:38 pm »
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 decode

https://sigrok.org/wiki/Protocol_decoders

Most of them have image how they look like.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf