SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By davidb
#84413
Hi all,
I'm having a bit of difficulty even getting a sensible subject header, but let's hope my question makes more sense!

My setup: I have an arduino pro mini. I usually upload sketches by connecting to the pins at the end of the board. I am only connected to the pins at the end when uploading sketches...otherwise they are open. At the same time I have an xbee attached to the Tx & Rx pins on the side (it's just an alternate location to connect to the same UART pins on the chip). In addition I usually have some other device (e.g compass or rfid reader) attached to the other (non-UART) pins on the arduino and communicate via newsoftserial.

The set-up works great while it's running. Note that at no time am I uploading sketches AND talking to the xbee at the same time (it's either or). The problem I a finding is when I want to upload a new sketch. Due to the crazy physical space limitations these devices need to live in, I usually have to solder the wires directly to the boards...often takes up considerably less space than using jumpers and the like. Since the xbee is permanently connected to the Tx & Rx UART pins, I get errors when trying to upload new sketches using the open UART pins, usually something along the line of unable to communicate to the arduino. This is even if the xbee isn't powered. I am assuming it's because data is flowing to the xbee as well (or maybe instead of?).

So the question: is there a way to have the xbee permanently attached to the Tx and Rx pins, and still be able to upload sketches to the mini? A cleverly placed resistor or diode or ??

Thanks in advance for any advice, and please let me know if any of the above doesn't make sense. I seem to be struggling with how to word the question.

Cheers,
David
By 3d29
#84418
Hi,

I would say that what you need to do is disconnect the Vcc pin from the XBee.

If you are doing this a lot I would recommend you use a simple switch between the xbee vcc pin and the power suply so you can switch off the xbee module and then program your arduino.

I guess that's what I would try.

I don't know if it's the right way to do it and if this could damage your XBee as well so...

Have fun!
By sylvie369
#84420
How about simple jumpers on the RX and TX lines to/from the XBee? When you want to program, you pull the jumpers, and when you want to do your thing, you put them back on.

Alternatively, can't you move the XBee to non-UART pins, like the RFID device is? Or are you out of pins/space?
By whoismaha
#84429
I noticed the FTDI cable was identical to the sparkfun Xbee Explorer Regulated.

So i soldered a header to the mini pro that accepts either the FTDI cable or the Xbee. It's very quick to unplug the xbee, plug in the FTDI, upload a sketch, and replace the Xbee.

Image

Image

Nevermind, i just saw SF has a picture of exactly what i'm describing. Only they mated back to back, mine is end to end (takes up less space).

Image

Not sure if this will help you because the header adds 1/4-1/2" to your project size. But it has worked great for me so far. I don't think Sparkfun sells an FTDI cable like i'm describing though. Here is a picture of one from Adafruit
Image

It might end up saving you space because you won't have extra pins sticking out. No need for programming pins when you're actually using it, really.
By whoismaha
#84445
Forgot there was a picture of it online.. please excuse the crudeness of the "device", it is packaged much better now and not just a jumble of parts : )

But you can see it doesn't take up much space and it's very easy to unplug the Xbee and plug in the FTDI to upload a new sketch. Not sure if it will fit within your space requirements? But i hope the idea helps

Image