Posts: 15
Joined: Sun Jul 28, 2013 9:13 am

Interfacing troubleshooting

Sun Aug 11, 2013 1:31 pm


I haven`t found any thread on this specific topic so I`d like to ask you guys, what can you do when an interface does no work as planned. What are the ways for 'troubleshooting' while interfacing ?
Things like double checking wiring, logic and code are obvious, but what can you do after ? Carefully reading device manuals, designing circuit and programming it, but what if you are stuck at one point with no idea why it does not work ?

I know it is possible to buy / copy already working solutions, but I think that`s not the point, it does not really work on longer terms.
What is the best way to learn and practice interfacing when device manuals are just not enough, could you give me some advises ?

Should I get oscilloscope for debugging ? I think it could help for checking if signals are correct.

Raspberry wino
Posts: 49
Joined: Mon Mar 05, 2012 11:48 am

Re: Interfacing troubleshooting

Sun Aug 11, 2013 4:15 pm

I'm pretty much at the same stage as you are I think. But my experience of getting things working in hardware/software in the past with no test gear, I'd say keep it simple and keep asking if what you see is what you expect to see.

A long time ago (for 8051 processor circuits) I made a simple tester on stripboard (5V logic) which lets me see the logic state of port pins on LEDs. It also includes a counter chip with outputs connected to LEDs so I can see data pulses which are too fast to see on the static LEDs and a piezo sounder so I can hear pulse streams if they're in audio range. Then I change port pins in very simple software and make sure what I see and hear what I expect. Then it if works, I can make the software a bit more complicated and check again. Progress in small steps means whatever you just added which stops it working is what caused the problem and helps you work it out.

This approach takes a bit of time but you learn and use your own logic and understanding it costs almost nothing.

I'm more at a loss using Linux as there's more which gets in the way and using 3.3V logic but I have got LEDs flashing. I use (user) Joan's excellent C library.

If you prove to yourself that you can control individual GPIO pins, and can create pulses and see data, you well on the way and can move on to getting your software working. I'd strongly suggest checking your external hardware to make sure that works before you blame your RPi or software.

Posts: 223
Joined: Fri May 31, 2013 11:29 am
Contact: Website

Re: Interfacing troubleshooting

Sun Aug 11, 2013 9:09 pm

For the well known "standard" chips reading the datasheet should be enough. Can also start first with the easy ones like the 8-bit I/O expander PCF8574. The expander output can be checked with a multimeter or by wiring LEDs to the outputs. For debugging a bit banged i2c on software you will probably need a logic analyser or an oscilloscope. For accurate timing tasks the scope/analyser is a must.

Return to “Interfacing (DSI, CSI, I2C, etc.)”