Pages: [1]   Go Down
Author Topic: Arduino mini Serial for download and communication in the same time???  (Read 373 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm planning to do a project with an arduino controller and it's my first one. Before to buy an arduino I want to be certain of something with the arduino mini. When the program is running, and the mini is on communication with another serial device or waiting for it, how I can download the program for an update.

Is the reset button must be pushed and right after I can download on it....

I'm habituated with PLC's and I know that I cannot use a serial port for com and download in the same time, but I'm not sure for mini with USB-Serial adapter.

thanks!
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The serial port can only communicate with one device at a time.

But you can use the softserial library to create an extra serialport (in software) that uses other pins than the dedicated Tx and Rx pins on your Arduino.
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

the mini is on communication with another serial device or waiting for it, how I can download the program for an update.
It's not recommended to connect multiple devices to the serial pins, since it makes it difficult to prevent one or the other from communicating.

However, pushing the RESET button is not necessary.  When avrdude begins uploading the code, it RESETs the ATmega chip automatically.  Again, the challenge will be keeping the "other device" from trying to communicate when the code upload is happening.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5666
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm planning to do a project with an arduino controller and it's my first one. Before to buy an arduino I want to be certain of something with the arduino mini. When the program is running, and the mini is on communication with another serial device or waiting for it, how I can download the program for an update.

If the other device sends data while you're downloading a program it will mess things up.

What you need is an ISP programmer. This bypasses the Arduino bootloader and serial port. You can easily get one for under $15. I got mine on eBay for $12.

Is the reset button must be pushed and right after I can download on it....

Arduinos have auto-reset, no need to push any buttons.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5666
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm planning to do a project with an arduino controller and it's my first one. Before to buy an arduino I want to be certain of something with the arduino mini. When the program is running, and the mini is on communication with another serial device or waiting for it, how I can download the program for an update.

If the other device sends data while you're downloading a program it will mess things up. You can do software serial comms on other pins but it's a bit rubbish (it works, but it's very CPU intensive...)

I can think of two solutions:
a) Build in a way to get the other device to shut up. When the Arduino is reset its pins are disconnected so you'll lose any output from them.
b) Get an ISP programmer. This bypasses the Arduino bootloader and serial port for uploading programs. You can easily get one for under $15 (I got mine on eBay for $12).

Is the reset button must be pushed and right after I can download on it....

Arduinos have auto-reset, no need to push any buttons.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Pages: [1]   Go Up
Jump to: