About serial ports on Arduino duemilanove

Hi, sorry for stupid question(s).

Duemilanove has one serial port - right? This port is shared with USB - right? This port is the RX/TX pins - right?

RX/TX pins can not be connected to other serial device when sending program over the USB - right? RX/TX pins can be used when program is already stored and USB disconnected and board powered from alternative source -right?

I noted that one can use the serial terminal to communicate with the board - nice. But the terminal is always closed when program is sent. Probably because it would conflict with the transfer - right?

I was able to use NewSerial libary to connect BV103 (which is USB/Serial TTL level converter from http://www.byvac.com). With that I can even get printouts from setup routine. It was connected to pins 2 and 3. Is there way to keep arduino serial monitor open at all times?

Then the main thing. I am playing around with BV4622, which is a SD card subsystem from Byvac. It supports I2C and serial (TTL-level). It contains quite a lot functionality. So it would help if you please tell me how you think it would be used. You can get the data sheet from the Byvac's web site.I will try to implement the library for it. At least I make some instructions how to use it.

Sorry for long post.

Best Regards Kari

I suggest you connect the BV4622 to the tx/rx pins on the arduino (which are TTL), connect a common ground between the two, and start experimenting (assuming both are electrically compatable). When you have the serial monitor running, you will be able to see what the arduino is sending to the BV4622 in the serial monitor display.

Duemilanove has one serial port - right?

Well it has one hardware supported serial port...

This port is shared with USB - right?

Well, it is CONNECTED to the FTDI chip - alas quite unbreakable - which has an USB connector. Note that this connection uses two serial 1k resistors. This is terribly important for all your experiments!!!

This port is the RX/TX pins - right?

Exactly, pins 0 and 1

RX/TX pins can not be connected to other serial device when sending program over the USB - right?

Of course not, the bootloader is trying to communicate with the IDE

RX/TX pins can be used when program is already stored and USB disconnected and board powered from alternative source -right?

Not really, the disconnection of the USB line and thus USB power does not stop the FTDI chip from working. So you can just leave it as is. The RCV line from the FTDI chip will be LOW without traffic, and - remember! - is connected through a 1k resistor. so you have a puul-down here.

But the terminal is always closed when program is sent. Probably because it would conflict with the transfer - right?

This has something to do with Windows... It is not possible to share a COM port, there is one owner only! Of course there could have been a more intelligent implementation, of re-establishing the monitors connection after the program has been updated automatically....

Is there way to keep arduino serial monitor open at all times?

It will stay open as long you do not reload a program.. So what exactly is the issue?

But the terminal is always closed when program is sent. Probably because it would conflict with the transfer - right?

This has something to do with Windows... It is not possible to share a COM port, there is one owner only!

This has NOTHING to do with Windows. It has to do with the nature of a COM port. Only one device can be on each end of a COM port at one time.

Hi deSilva,

thanks a lot.

Well, it is CONNECTED to the FTDI chip - alas quite unbreakable - which has an USB connector. Note that this connection uses two serial 1k resistors. This is terribly important for all your experiments!!!

I have to dig the scema for the board. Are those resistors to ground? Newer mind I will find it out myself.

Not really, the disconnection of the USB line and thus USB power does not stop the FTDI chip from working. So you can just leave it as is. The RCV line from the FTDI chip will be LOW without traffic, and - remember! - is connected through a 1k resistor. so you have a puul-down here.

I tested with one of Byvac's serial displays. I got text output working for the display when USB cable is not connected. The LCD was not connected when I uploaded the program. Anyway now when I can use the NewSerial - this is not problem any more.

It will stay open as long you do not reload a program.. So what exactly is the issue?

Issue was that I would like to see debug output from the setup routine. I was not able to figure out how to use serial monitor for that. But now when I have the BV103 connected. It is not a problem. Or I am talking nuts because I have not slept enough....

Anyway I will now try to get this BV4622 SD card system working with duemilanove.

Thanks again!

Best Regards Kari

I suggest you connect the BV4622 to the tx/rx pins on the arduino

I am not really convinced that this so useful... Anyhow, use at least a 1k resistor for the transmission line from BV to Arduino (= RCV)

Thanks zoomcat,

I was trying with I2C. But will make a connector for serial and try like you told. I might be able to test it first interactively with commands given in serial monitor. Didn't think this myself...

Best Regards Kari

This has NOTHING to do with Windows. It has to do with the nature of a COM port. Only one device can be on each end of a COM port at one time.

We are talking of virtual COM ports. Everything is possible. Windows is a not so small Operating System. I can think of at least 3 ways how to make a more friendly interface for partial COM port sharing.

Issue was that I would like to see debug output from the setup routine

One way would be to start your program with a delay(3000) instruction. Although this is funny: When you open the Monitor your program is reset and you should see all prints from the very beginning...

The RCV line from the FTDI chip will be LOW without traffic, and - remember! - is connected through a 1k resistor. so you have a puul-down here.

Well you have that flipped in your mind. The Arduino hardware serial pins follows the 'standard' TTL serial logic levels, where 'without traffic' ( or idle state or steady mark condition, or stop bit level) is a HIGH level, so the pin state of pin 0 will be +5vdc. The FTDI provides this signal through a 1k resistor, so from the Arduino shield perspective at a idle condition, pin 0 will act like it has an external 1k ohm pull-up.

Lefty

I would like to see debug output from the setup routine.

Since connecting the serial monitor will normally cause a reset of the arduino (via the auto-reset feature), you usually WILL see output all the way to the beginning of the setup routine.

If you have auto-reset disabled or not present, you should be able to download your code, start the serial monitor, and then hit the reset button on the arduino manually. Then you should see everything from the beginning of setup() in the serial monitor as well.

It's possible (even probable) that other devices connected to the Arduino will not be reset when the arduino is reset, and that "interesting things" will have already happened by the time the reset occurs; a serial device connected to pins 0/1 will see the whole download dialog go by on its pins, after all, plus whatever happens in between the download and the reset caused by opening the serial monitor and/or hitting the reset button.

In critical cases, you can put a "delay(10000);" at the beginning of your setup() function so that you have time to start the serial monitor.

Thanks!

Kari

pin 0 will act like it has an external 1k ohm pull-up.

That is true - I am becoming a little bit unconcentrated at the moment. The good news is, that this is independent of what is going on at the other side of the chip. Be it no power from USB, no active connection, no bytes sent - in all three cases the FTDI chip keeps this line HIGH. This however will not change anything of the concept, it is now wired-AND rather than wired-OR.

I am not really convinced that this so useful... Anyhow, use at least a 1k resistor for the transmission line from BV to Arduino (= RCV)

If the gizmo to be connected is generally TTL 5v compliant, why would the 1k resistor be required? I've found this monitoring setup very useful in monitoring what is being sent from my arduino to my ssc-32 servo controller.

If the gizmo to be connected is generally TTL 5v compliant, why would the 1k resistor be required?

It's not.

Lefty

It's not.

Lefty

Not TTL 5v compliant or not required? :)

Lefty seems to be in a bad mood today...

I thought you could use input from your device and the FTDI chip on the same line But is does not work that way. Any one trying to pull the line low would stop at 2.5 Volts.

So please do not use that resistor at all! Sorry - I had my mind on other things when posting in this thread...

(BTW, it had worked with the +/- 12 volts rs232 signals )