Show Posts
Pages: 1 ... 5 6 [7] 8 9 ... 57
91  Using Arduino / Project Guidance / Re: Arduino FSK Demodulation on: September 07, 2012, 06:58:00 pm
That is the standard choice, and a good choice. Many years ago (don't ask) I build a radio teletype demodulator with that chip. It was used for ham radio RTTY over HF and VHF. Now, such things are nearly obsolete.
92  Using Arduino / Project Guidance / Re: 8 RS422 with Mega board ? on: September 07, 2012, 12:36:47 pm
Is the DSS Circuits I2C library used with this?
Or is it one or the other?

Do you mean with this chip or with the MultiSerial shield?

Either the standard Wire library or the DSS Circuits library will work with this chip. I use the DSS Circuits library because I need to talk to this chip from inside an interrupt service routine (ISR). The Wire lib uses interrupts, and therefore can not be used inside an ISR. The DSS library does not use interrupts, so it can be used inside an ISR.

I hope I answered the question...

93  Using Arduino / Project Guidance / Re: 8 RS422 with Mega board ? on: September 07, 2012, 11:44:14 am
I found in old posts that you worked with that chip. Did you success on your project ?

Can you give us some schematics, or elements that will help me to realize it ?

Best Regards

I also found on the net : http://hackstrich.sarahemm.net/MultiSerial_Shield

May be it can be useful. Just have to remove Max232 chip and use max488. But I've to design it...

Yup, the project came out nicely. The hackstrich board is a great model, you can find Eagle files and code here:

http://www.strichlabs.com/pages/multiserial-shield
94  Using Arduino / Project Guidance / Re: 8 RS422 with Mega board ? on: September 06, 2012, 11:51:19 pm
I doubt SoftwareSerial is going to do the job you need. In fact, given the strict conditions that would have to be met for there to be even a hope that SoftwareSerial would work for more than 1 stream, I would say with confidence that it won't work. Now the UART Crossroads suggested, that's is worth your time. Two of those added to a mega would be 8 UARTs. Four of those coupled with some RS-422 driver chips and you are in really, really good shape. Then you can use any Arduino board you like.
   
95  Using Arduino / Project Guidance / Re: 3.3V to 5V level shifter for high speed serial on: September 04, 2012, 01:20:09 am
What makes the bss138 or txb approach so attractive is that these circuits are bidirectional. This is especially useful on circuits like twi or i2c where signals can originate from either slave or master on a shared bus.

Because of its inherent uni-directionality, SPI is easy to implement with inexpensive buffer chips. For other buses / hardware configurations / protocols, you have to figure out a way to enable/disable the buffer chip via the OE pin as needed. That may not be feasible with some types of devices /buses that do not feature a suitable OE signal output as part of the package.

Got it, thanks!

Quote
Another thing to keep in mind is that you may be able to economize on level-translating chips as long as whatever target voltage is within spec for all devices. Of course it's best to hit the specification bang on but spec sheets wouldn't be publishing allowable ranges if the designers had not anticipated this sort of thing happening in the real world.

Perhaps with this device:

http://www.digikey.com/product-detail/en/TXS0104EPWR/296-20697-1-ND/1143681

I could use half of it for the I2C bus and the other half for the UART. Yes the UART lines are unidirectional but who cares, it will still work. I found some interesting reading in these here:

http://www.ti.com/lit/an/scea044/scea044.pdf
http://e2e.ti.com/support/interface/etc_interface/f/390/t/149757.aspx

So apparently I don't need pullups because the level translator has 10K pullups internally. But that presents a problem. The device I am interfacing with already has pullups on the bus, and they can not be disabled. This is fine for the 3.3V side, but the 5V side might be a problem.

Also, the data sheet says to pull OE to ground through a resistor, the value of which depends upon the current capability of the driver. But which side, and how would that be calculated?



96  Using Arduino / Project Guidance / Re: 3.3V to 5V level shifter for high speed serial on: September 03, 2012, 04:24:02 pm
4) Use a buffer like a 74LCX125.
Advantages: Very cheap (the TI version is $0.08 each each line), all 4 signals can be handled by one chip
Disadvantages: ??

.
.
.

I read the data sheet and didn't see how that works...
 

Oh wait, I get it. Its can be powered by a wide range of voltage and all it does is turn on and off whatever voltage is tied to Vcc. So I would need two of them. To go from 5V to 3.3V I hook 3.3V up to Vcc, tie the OE pins to ground and then attach the 5V signal lines, and that switches on and off the 3.3V output. To go the other way I just do the same thing the other way with a different chip.

 
97  Using Arduino / Project Guidance / Re: Tips on writing efficient code for Arduino on: September 03, 2012, 04:01:43 pm
To augment the point about the libraries eating up flash space, the SD card library, as masterful as it is, takes up a good chunk of flash space. It would probably use more flash then your constants will. Also, if you're worried about flash space, then don't put your constants into flash, leave them in RAM. The compiler will optimize your code reasonably well. As others have said, use the smallest types that you need to fit your data. 

There is another option; get a bigger chip. There are a bunch of Arduino boards based on the 1284P, which has an ocean of flash. 
98  Using Arduino / Project Guidance / Re: 3.3V to 5V level shifter for high speed serial on: September 03, 2012, 03:54:46 pm
Okay, I apologize that this thread is running on and on, and if it seems like I am beating a dead horse I apologize again.

That app note from NXP is great, thanks for linking that!  One thing I had not mentioned is that the part I am connecting to also has a TWI port at 3.3V that I want to marry to the ATMega processor at 5V, so that was spot on.

So there are at least four ways to do this:

1) Use a resistive voltage divider to knock the 5V down to 3.33V.
Advantages: Cheapest solution, easy, uses very little space on the PCB.
Disadvantages: Only works to change 5V to 3.3V, does not go the other way. Won't work for TWI.

2) Use a single BSN20 per line.
Advantages: Fast enough for at least TWI at 400 Kbaud, not sure about UART at almost 1Mbaud.
Disadvantages: May not be fast enough for UART, moderate cost at $0.37US each, consumes a lot of space

3) Use a pair of TXS0102 (one for TWI, one for UART)
Advantages: No speed issues, super easy to use
Disadvantages: At about $1.50 each, very high cost, lots of space consumed

4) Use a buffer like a 74LCX125.
Advantages: Very cheap (the TI version is $0.08 each each line), all 4 signals can be handled by one chip
Disadvantages: ??

I worked on another project, with the help of Crossroads, that has an SD card. We did have some trouble with the level translation and ended up using a chip like a 74LCX125 (I have to check to be sure). I have to confess, I am not clear on how this works. The buffer output goes high or low depending upon the logic states of the input, but I don't see how the output voltage is controlled. I read the data sheet and didn't see how that works...
 
And yes, much of my concern with speed issues stems from my experience with the SD card issue. So perhaps I need not worry about it with other device.

Thanks again for the help everyone...

This is with res dividers @ 2Mbaud, 20pF stray capacitance. You may use smaller resistors thus make edges even steeper..
Here is the analysis from Hermann Shutte, who first popularized the BSS138 MOSFet approach (at least to my knowledge). Those are pretty steep and well-defined edges, however!

All I recall (and it's been a while) is that the level-shifting issue would usually rear its ugly head in SD card applications and that the resistor networks that "classic" SD cards used to work with would stop working OK as SD card speeds advanced. Maybe Mr. Greiman can chime in? I note that the current ethernet shield now features the 74LVC1G125 buffer chip. Presumably, for a reason.

My guess is that it's not the Atmel IC that is the issue, it's likely the SD card that doesn't feature a nice 100MOhm input impedance like the ADC in the Atmel 328P. For me, since the primary reason I need level-shifting is logging to a SDHC card, using a TXB-series chip is second nature.
99  Using Arduino / Project Guidance / Re: 3.3V to 5V level shifter for high speed serial on: September 02, 2012, 11:49:11 pm
Question is though, do you feel lucky?  Since I rarely breadboard, I rely on solutions that ought to work 100% of the time. I have had great success with level-shifting via the TXB series on the SPI bus. So, I'll keep adding the three chips necessary (one IC, two decoupling caps) and call it a day.

And at $1.47 for the chip, its pricy but I can live with it. After doing some reading though, it seems TXB series workk for SPI, TXS series works for I2C. Which is the proper choice for serial? It seems that the TXB series needs the device to source 2mA to drive it, but the TXS does not.
100  Using Arduino / Project Guidance / Re: 3.3V to 5V level shifter for high speed serial on: September 02, 2012, 09:17:40 pm
So I guess there is a difference of opinion on the speed issue. But let's set that aside for a minute.

I can use a simple resistive voltage divider (a 1K and a 2K) to knock 5V down to 3.33V. No capacitors, so I guess there is not a speed issue. But, I have a 3.3V signal coming into my ATMega1284P. Will the uC reliably read this as a logic high? If not, then maybe I need something like a TXS0102?

101  Using Arduino / Project Guidance / Re: 3.3V to 5V level shifter for high speed serial on: September 02, 2012, 08:18:06 pm
Okay, thanks everyone. Why is there such a reluctance to using resistors as level shifters when connecting SD cards to the SPI bus?
102  Using Arduino / Project Guidance / Re: 3.3V to 5V level shifter for high speed serial on: September 02, 2012, 06:13:04 pm
What do you mean by "high speed serial"?? 10Mbaud??
Up to ~500kbaud you may use resistor divider without any problem, the smaller values the better smiley

This application will run at a maximum rate of 921.6 kbaud, and speed is exactly my concern.


103  Using Arduino / Project Guidance / 3.3V to 5V level shifter for high speed serial on: September 02, 2012, 02:51:59 am
Hi All...

I need to connect the UART of a ATMega1284P to another device serial port. The 1284P will be 5V, the other device is 3.3V. So I think I need a bidirectional level shifter, but the ones I have found are not only expensive but have many, many pins. I prefer to avoid using resistors. Can anyone offer some suggestions?

Thanks...
104  Using Arduino / Programming Questions / Re: SPI between 2 Arduinos one as master and one as slave on: September 02, 2012, 02:29:23 am
On the slave, jumper pins 10 and 2. Pin 10 is SS, and pin 2 which you can use in attachInterrupt will let you know when SS line goes low.

Oh, now I get it. Thanks!

Quote
However as I said above, you could probably (I haven't tested it) do the same thing with a pin change interrupt on pin 10.

I'll give it a try at some point and post back.

Thanks Nick!
105  Using Arduino / Programming Questions / Re: SPI between 2 Arduinos one as master and one as slave on: September 02, 2012, 01:09:43 am
I used the words "you would physically connect SS to one of the interrupt inputs", suggesting you would connect pin 10 to pin 2, for the interrupt detection.

Right, but where? Pin 10 on the slave to pin 2 on the master?  I don't understand how the interrupt pin works with the SS pin.


Pages: 1 ... 5 6 [7] 8 9 ... 57