Hi - I'm trying to interface a 3.3V ARM (Atmel AT91SAM7X256) to a 2.8V accelerometer (Kionix KXP-74) over SPI. The ARM is the master. So - tell me how much I'm off here: I was thinking I could use a simple
2-resistor voltage divider for the clock, master out slave in, and slave select pins. For the master in slave out I don't think I need to do anything, as I believe a 2.8V signal will register as high. (though I haven't verified that yet).
Is this the best way to interface these parts? Any way to make it smaller? (6 resistors is kinda chunky - maybe two 3-resistor resistor arrays, if those exist) What sorts of values would I use for the resistors? Thanks,
First double check to see if the accelerometer isn't 3.3V tolerant -- who knows, maybe it is.
Then consider if you can use some of those handy micro-packaged gates; I think they put a pair of buffers into a SOT-23; check & see if those are available in voltage tolerant versions.
Finally, if you have to use resistors you can get 1208-sized 4-resistor arrays. Use a low enough resistance to drive your expected line capacitance at your expected frequency with plenty of margin (I'd go for an RC time constant about 1/10th of the clock).
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
I already e-mailed my contact at Kionix - apparently it will work, but with decreased accuracy. What a nuisance.
I'll see if I can find some buffers like that. Any idea of who makes them?
I don't understand what you're saying about using the capacitance of the line. That would be a better method than a V divider? Also - I don't actually know how to figure out line capicatance at this point, though that is not a big deal as I am just now drawing up the schematic
- layout won't begin for another week or two. But anyways - once I do figure out what the line capicatance is - I want a RC value that is equal to 1/10 of the spi clock period (5Mhz - so 200 ns period and thus
Um, everybody? Look for "tiny logic" from anyone who makes general purpose silicon. I just don't know about its voltage tolerance -- looking at everyone's web site is your job.
You don't want to _use_ the capacitance, you have to size your resistors low enough so the capacitance doesn't screw you up.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
I'm still not following what I'd be doing with these buffers... Is the idea that I'd be buffering the signal coming from the 2.8v device to bring it up to 3.3v? I can't imagine doing it the other way as it seems like a pretty uncommon characteristic to be able to accept inputs that are nearly 20% greater than the supply voltage.
Also, regarding resistors - are you just saying that I should use a voltage divider and just be aware of the rc constant? Or is there some way you're thinking of where I can get away with just one resistor?
In these days of multiple logic levels it _is_ fairly common to have parts that accept input that are greater than the supply -- 5V tolerant
3.3V parts accept input at 5V, 3.3V tolerant 2.8V parts accept input at
3.3V, etc.
Now, I don't _know_ that there are tiny logic parts that will translate from 3.3V to 2.8, but it would be a damned good market to be in, so I _suspect_ that there would be a good selection. It's certainly worth a look.
Yes
No
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Well, no, it's the other way around - ISTR you've already mentioned that a 2.8V high output should be interpreted as a high by a 3.3V input, so that's not at issue.
For the output of the 3.3V logic going to the input of the 2.8V logic, one, if the data sheet doesn't say that the 2.8 has 3.3 compatible inputs, then you make a voltage divider.
And I'd say that the starting place would be to look up how much current this 3.3V device will source when it's high, and use a resistance that just fits r = e / i. The voltage divider, of course, is the standard voltage divider formula. I can never remember the equation, but whatever current you got from the data sheet, calculate the resistance it takes to drop 2.8V. Also, take into account the input current of the 2.8V device - this figures in as an additional resistor, to Vcc or to 0, depending on which way the leakage current is flowing. If it's CMOS, then it'll be negligible.
So, say, if your 3.3V device can source, say, 0.1 mA, then the resistor would be, uh, lessee ... R = E/I? I forget simple shit like that, but my SSN is etched somewhere in the Akashic Record... Anyway, 3.3/0.0001 = oh, Dog, will somebody please do the decimal points for me?
OK, say 33K or 330K or 3.3K or whatever - then, with that same 0.0001A, what's the value of the resistor that would drop 2.8V? 28K, of course, and the next closest 1% value is ... heh! Imagine my surprise! 28K!
formatting link
So, you subtract that from 33K, and get, um ... three minus two is one, three minus eight is five, borrow the one... 5K! I guess you'd use 4.99K in this case.
And don't worry too much about the time constant unless it has to run at high speeds - somebody else will be much better than me with advice in that department! :-)
You could go across the higher to lower voltage boundary using open drain buffers. The low voltage to high voltage (2.8V to 3.3V) should require no translation at all (2.8V is a valid high for all standard
3.3V logic families).
The 74xx07 is an open drain non-inverting buffer. Power it from the
3.3V and put a pullup to the 2.8V rail. I use precisely this technique in an existing design where I have to keep the speed up (otherwise I'd use resistor dividers).
This part is available from Philips and TI in single gate packages.
Datasheet, hex unit :
formatting link
Datasheet for all variants at Philips:
formatting link
The device comes in 1 gate, 2 gate, 3 gate and hex gate versions.
Hmm - seems like a very reasonable way to do it. But couldn't I instead use a triple buffer with voltage tolerant inputs, like this:
formatting link
and give it a vcc of
2.8V? To me that would make more sense - as that part is very small but still has leads (this is for a one-off board and I'm soldering it, and one leadless part (the accelerometer in a DFN package) is enough for me!) That seems to me the smallest and simplest method - as I'm trying to save as much space as possible on this board. Thanks,
Certainly using parts with high input voltage tolerance is a reasonable way to do this - indeed, that's one of the reasons such parts were made originally (when the industry started moving en masse to 3.3V from 5V).
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.