Author Topic: Strange chip interface issues  (Read 4202 times)

0 Members and 1 Guest are viewing this topic.

Offline allanwTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
    • Electronoblog
Strange chip interface issues
« on: May 31, 2010, 05:20:53 am »
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?
« Last Edit: May 31, 2010, 05:33:52 am by allanw »
 

Offline allanwTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
    • Electronoblog
Re: Strange chip interface issues
« Reply #1 on: May 31, 2010, 06:16:28 am »
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...
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 896
  • Country: gb
Re: Strange chip interface issues
« Reply #2 on: May 31, 2010, 11:04:58 am »
Hi,
The data sheet here

http://www.avagotech.com/docs/AV02-1726EN

Shows 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.
« Last Edit: May 31, 2010, 11:52:56 am by djsb »
David
Hertfordshire,UK
University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Credited Kicad French to English translator.
 

Offline allanwTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
    • Electronoblog
Re: Strange chip interface issues
« Reply #3 on: May 31, 2010, 03:29:28 pm »
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.
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 896
  • Country: gb
Re: Strange chip interface issues
« Reply #4 on: May 31, 2010, 05:25:30 pm »
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.  
« Last Edit: May 31, 2010, 06:35:43 pm by djsb »
David
Hertfordshire,UK
University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Credited Kicad French to English translator.
 

Offline allanwTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
    • Electronoblog
Re: Strange chip interface issues
« Reply #5 on: May 31, 2010, 05:33:28 pm »
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.
« Last Edit: May 31, 2010, 06:20:49 pm by allanw »
 

Offline allanwTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
    • Electronoblog
Re: Strange chip interface issues
« Reply #6 on: June 01, 2010, 03:19:17 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf