by Miamicanes » Fri Jun 20, 2008 5:47 am
by Miamicanes
Fri Jun 20, 2008 5:47 am
Does this circuit look like it will work for interfacing a (presumably 5v logic) AX-12 with an Atmel ATmega88 running at 3.0v, using a
TI SNLVC1T45 level shifter?
As I understand it, when the DIR pin is high, a 3v signal on the "A" pin creates a 5v signal on the "B" pin. When the DIR pin is low, a 5v signal on the "B" pin creates a 3v signal on the "A" pin.
Some of my main concerns (besides whether it will work at all...) are:
* I'm taking the "10k with 5v" resistor value as an article of faith based on the AX-12 manual's sample interface circuit. Should the resistor on the 3v side be 10k as well?
* Is there actually going to be enough time between the moment I finish transmitting and the moment the AX-12 sends back its response to clear the TxEnable bit, change PD2 from high to low, set the RxEnable bit, and have everything settle down to its proper state?
Now... playing Devil's Advocate for a moment, do I even HAVE to screw around with level conversion? Or can I safely connect the 3v Mega88's TX & RX pins directly to the AX-12's (presumably) 5v serial bus, and feel confident that something ELSE (like, say, a 3.0v ARM9) connected to the same AVR via SPI won't see or feel the metaphorical 5v tidal wave hitting the Rx pin and the tristated Tx pin on the AVR? I have to admit that interfacing 3v to 5v is one area where I feel really uncertain about what I can get away with, and something I've generally bent over backwards up to now to avoid at any and all cost. I'm fairly sure the AVR *itself* is probably 5v-tolerant when running at 3.0v, but I know almost nothing about how pumping 5v into one of its pins might affect other, less-tolerant and significantly more expensive, components connected to the same AVR.
Does this circuit look like it will work for interfacing a (presumably 5v logic) AX-12 with an Atmel ATmega88 running at 3.0v, using a
TI SNLVC1T45 level shifter?
As I understand it, when the DIR pin is high, a 3v signal on the "A" pin creates a 5v signal on the "B" pin. When the DIR pin is low, a 5v signal on the "B" pin creates a 3v signal on the "A" pin.
Some of my main concerns (besides whether it will work at all...) are:
* I'm taking the "10k with 5v" resistor value as an article of faith based on the AX-12 manual's sample interface circuit. Should the resistor on the 3v side be 10k as well?
* Is there actually going to be enough time between the moment I finish transmitting and the moment the AX-12 sends back its response to clear the TxEnable bit, change PD2 from high to low, set the RxEnable bit, and have everything settle down to its proper state?
Now... playing Devil's Advocate for a moment, do I even HAVE to screw around with level conversion? Or can I safely connect the 3v Mega88's TX & RX pins directly to the AX-12's (presumably) 5v serial bus, and feel confident that something ELSE (like, say, a 3.0v ARM9) connected to the same AVR via SPI won't see or feel the metaphorical 5v tidal wave hitting the Rx pin and the tristated Tx pin on the AVR? I have to admit that interfacing 3v to 5v is one area where I feel really uncertain about what I can get away with, and something I've generally bent over backwards up to now to avoid at any and all cost. I'm fairly sure the AVR *itself* is probably 5v-tolerant when running at 3.0v, but I know almost nothing about how pumping 5v into one of its pins might affect other, less-tolerant and significantly more expensive, components connected to the same AVR.