Strange chip interface issues - Page 1
Forum section: electronics / projects

author: allanw
author_rank: Frequent Contributor
timestamp: May 31, 2010, 05:20:53 am
content: I'm interfacing a microcontroller to an ADNS-9500, which is a chip-on-board laser sensor used for gaming laser mice. The interface is just plain SPI. Strangely, one of the inputs (MOSI) of the chip seems to be strongly pulled high. The other SCLK and chip select lines are fine. I'm trying to get this working over the long weekend, and I don't have any proper level shifter IC's on hand, so I thought I'd just make do using a voltage divider. I've been using two 10k resistors to change the MCU 5V outputs to their 3V max input requirement, so the max current was being limited to about 0.5mA. Thus the chip saw MOSI as always high.It takes 13mA to short MOSI to ground, which seems like a lot of current for a regular logic input, especially since the other inputs don't require any current.Out of curiosity, I connected a pot between MOSI and ground and measured the voltage vs current characteristic of the pin. Here's the result:Why would this happen? I believe this is a MOSFET i-v curve, right?To work around this, I could make a voltage divider using much smaller resistances, say 100 ohm, but it seems weird that the chip would do this. Or perhaps I have a short on this pin?

author: allanw
author_rank: Frequent Contributor
timestamp: May 31, 2010, 06:16:28 am
content: Well, I measured the i-v curve of one of the chip's outputs that was high and it behaves the exact same way. So I must have shorted the MOSI pin to an output somewhere...

author: djsb
author_rank: Super Contributor
timestamp: May 31, 2010, 11:04:58 am
content: Hi,The data sheet herehttp://www.avagotech.com/docs/AV02-1726ENShows MOSI connected directly to the MCU in the application circuit described. Also in the pin descriptions there is mention of a 5V and a 3V mode. Pin PWR_OPT should be connected to GND for 5V operation (as shown in the application schematic).David.

author: allanw
author_rank: Frequent Contributor
timestamp: May 31, 2010, 03:29:28 pm
content: Yep I've been following their 5V operation app circuit exactly. Although it's kind of confusing what they want VDDIO connected to. I hooked it up to REFB, which is their onboard 3V regulator. The schematic shows a jumper that can make it either connect to REFB or another power line which I'm not sure of.Anyway, there seems to be a low resistance path, about 20-30 ohms, between MOSI and LASER_NEN, which is an output that's usually high. It seems to pull MOSI high and I have no idea why. It can't be a short because it's not like 0 ohms between them.

author: djsb
author_rank: Super Contributor
timestamp: May 31, 2010, 05:25:30 pm
content: Hi,The VDDIO pin is a supply voltage input pin for the IO pins. If you look on the 2nd schematic on the datasheet VDDIO connected to a power supply node.If I was using this chip I would not worry too much about the internals of the chip, the only information you have is the data sheet. Treat it as a black box and connect it up to something like an arduino (using the the spi library on the arduino website). Then you can write some basic routines to establish communication with the chip. From a quick scan of the data i'm assuming the chip is used as some kind of gameing mouse, am I correct? Can you give any more info on your application?David.P.S You can always put current limiting resistors on the SPI pins if your worried about the pin current limit being exceeded.

author: allanw
author_rank: Frequent Contributor
timestamp: May 31, 2010, 05:33:28 pm
content: Yep, that's pretty much what I'm doing. I'm not doing anything fancy with the sensor, just trying to get basic serial communication working. The issue I'm having is that when the MCU tries to output 0V to MOSI, the voltage measured at the MOSI pin becomes 3V. I could try to force the pin to 0V by using smaller value resistors in my 5V to 3V conversion voltage divider, but I believe there's an underlying cause to this problem.edit: I believe the issue is that since I had to solder wires onto the pads, I might have shorted against some nearby vias. I resoldered and the pin behaves normally again.

author: allanw
author_rank: Frequent Contributor
timestamp: June 01, 2010, 03:19:17 am
content: Grr, after fixing all these connections, now the chip only responds with 8 no matter what register I read from. Not having much luck with this guy. I've checked with my oscilloscope and I'm pretty sure my signals are correct.