Realbasic Serial Communication Arduino
Dyndns Updater Download Server.
25/27th April 2018 in Denver. 6/7th September 2018 in Munich, Germany. Serial Port DTR Question (Real Studio network user group Mailinglist archive) Previous thread: Next thread: Date: 02.07.09 18:18 (Thu, 02 Jul 2009 13:18:38 -0400) From: Jeff O'Brien Hi All, I'm using and Arduino board which uses FTDI USB Serialport drivers for a mac and windows application I have created. Connecting from a mac is pretty succesful, connecting from windows is hit or miss. I am told the the arduino uses the DTR line to reset itself from software.
Do I have to Set DTR to true in order to be able to toggle SerialPort.DataTerminalReady = True and then SerialPort.DataTerminalReady false? What state is it in by default? Does setting SerialPort.DataTerminalReady = True make it high or low?
Read and send the serial data(Thank to tom & dan) The goal of this section is to understand how the microcontroller formats data when you send it serially.

What would be a good length of time in ms to hold it low to simulate the reset? Also where does LeaveDTROnClose fit into all this? So, in a nut shell I'm trying to understand how the following properties and methods interact with each other DTR DataTerminalReady LeaveDTROnClose The goal is to make my app connect to the arduino from a windows computer as consistently as it connects on the mac. Thanks Jeff _______________________________________________ Unsubscribe or switch delivery mode: Search the archives: Date: 02.07.09 23:20 (Fri, 3 Jul 2009 08:20:39 +1000) From: Tony Barry Hello Jeff, I am using Arduino NG with success from both Mac and PC. The FTDI interpretation of a virtual serial port is very good. If you use the Arduino IDE then you probably don't need to mess with the serial port settings at all.
I use the Arduino IDE to program the board, and a couple of applications to operate the board in run mode. I find that as long as my RB app 'closes' the port, the Arduino IDE can pick up the port when it needs to update the AVR program. I do not alter any of the DTR / CTS line states at all. Hope this helps - if you are having troubles contact me off list. Regards, Tony Barry On, at 3:18 AM, Jeff O'Brien wrote: >>Hi All, >>I'm using and Arduino board which uses FTDI USB Serialport drivers >for a mac >and windows application I have created. Connecting from a mac is >pretty >succesful, connecting from windows is hit or miss. I am told the the >arduino >uses the DTR line to reset itself from software.
Polycom Configuration File Generator Tool there. >>Do I have to Set DTR to true in order to be able to toggle >SerialPort.DataTerminalReady = True and then >SerialPort.DataTerminalReady >false? >>What state is it in by default? >>Does setting SerialPort.DataTerminalReady = True make it high or low? >>What would be a good length of time in ms to hold it low to simulate >the >reset?
>>Also where does LeaveDTROnClose fit into all this? >>So, in a nut shell I'm trying to understand how the following >properties and >methods interact with each other >>DTR >DataTerminalReady >LeaveDTROnClose >>The goal is to make my app connect to the arduino from a windows >computer as >consistently as it connects on the mac. >>Thanks >Jeff >>_______________________________________________ >Unsubscribe or switch delivery mode: >>Search the archives: >_______________________________________________ Unsubscribe or switch delivery mode: Search the archives: Date: 03.07.09 02:40 (Thu, 02 Jul 2009 21:40:32 -0400) From: Jeff O'Brien Hi Tony, Thanks for the response.
My problem is not with programming the board or using the arduino ide. It is that if I leave DTR set to False then the board isn't consistently able to communicate on the windows platform.

Never a problem on the mac side. If I set it to TRUE then it works but I want to understand why. Also my Arduino boards are Diecimila or Duemilanove. I feel like it has something to do with the bootloader and the rb serial port stuff or the FTDI stuff and how it differs from mac to windows. Here is a specific question. Does DTR have to be set to true or false before you open the serial port?
And please don't confuse DTR with DataTerminalReady. Thanks Jeff >Hello Jeff, >>I am using Arduino NG with success from both Mac and PC. The FTDI >interpretation of a virtual serial port is very good. >>If you use the Arduino IDE then you probably don't need to mess with >the serial port settings at all. I use the Arduino IDE to program the >board, and a couple of applications to operate the board in >run mode. I find that as long as my RB app 'closes' the port, the >Arduino IDE can pick up the port when it needs to update the AVR >program.
I do not alter any of the DTR / CTS line states at all. >>Hope this helps - if you are having troubles contact me off list. >>Regards, >Tony Barry >>On, at 3:18 AM, Jeff O'Brien wrote: >>>>>Hi All, >>>>I'm using and Arduino board which uses FTDI USB Serialport drivers >>for a mac >>and windows application I have created.
Connecting from a mac is >>pretty >>succesful, connecting from windows is hit or miss. I am told the the >>arduino >>uses the DTR line to reset itself from software. >>>>Do I have to Set DTR to true in order to be able to toggle >>SerialPort.DataTerminalReady = True and then >>SerialPort.DataTerminalReady >>false? >>>>What state is it in by default? >>>>Does setting SerialPort.DataTerminalReady = True make it high or low? >>>>What would be a good length of time in ms to hold it low to simulate >>the >>reset?
>>>>Also where does LeaveDTROnClose fit into all this? >>>>So, in a nut shell I'm trying to understand how the following >>properties and >>methods interact with each other >>>>DTR >>DataTerminalReady >>LeaveDTROnClose >>>>The goal is to make my app connect to the arduino from a windows >>computer as >>consistently as it connects on the mac. >>>>Thanks >>Jeff >>>>_______________________________________________ >>Unsubscribe or switch delivery mode: >>>>>>Search the archives: >>>_______________________________________________ >Unsubscribe or switch delivery mode: >>Search the archives: >_______________________________________________ Unsubscribe or switch delivery mode: Search the archives.
How you did it? What software you used? What were the settings to connect to the Arduino?
Input information! Knowledge is power!
I know that the Arduinos use USB, so how was that hooked up to the SE/30 Serial Port? Secondly, I a couple of Arduino Mini's (Chinese clones) that does not have USB but they do have a 6 prong serial port (2 prongs is for voltage to turn it on). I would like to get these going on a Mac 68K/PPC. I don't have any details on ande765a's project, but all Arduinos have built-in serial hardware, even though they don't physically have a serial port.
So it's probably just hooking up a few wires between the SE/30 serial connector and the corresponding pins on the Arduino. Thanks, BMoW. This is simillar to the one I got; the two end signals are different, but Tx, Rx, VCC and GND are on the same place on the header - easily to hook up to a serial port.
But what's the baud rate, software used to connect, and other fine details. And I got it from ebay for $2 - with free shipping! (OK, I had to solder the headers in but that's minor). Radio Shack sells these for $45? Guess who I'm ordering from!) Plus the other Tx and Rx on the other header are for a second serial port on this model similar to the Arduino Mega and Leonardo with 2 serial ports. (I did not test out the 2nd serial port); the one on the end header usually goes to a USB to TTL-serial adapter.
All this on a tiny package of 1.5in X.75in, it's not bad. The VCC needs to be regulated 5V though it can run at 3.3V since it does not have a regulated power supply area. But for $1, Ebay has a tiny (.75in X.25in) voltage regulation board - up to 12v goes in, regulated 5v goes out. It would be nice to get an older Mac to compile and program the Arduino, not just send commands to it though this is a great start. You set the baud rate, etc in your Mac (or Windows) terminal program, and also in the Arduino software you write. They have to match. I think the Arduino serial library uses 9600 8N1 as the default.
The Arduino IDE has a very simple built-in serial terminal that you can use to see debug text coming back from the board. There are also a couple of serial port example programs that come with the IDE. On the Mac/PC, you should also be able to use something like Hyperterm or Tera Term or the classic Z-Term on the Mac. *Nods* Though much of this knowledge is common sense, common sense is lacking these days. Thanks for the input. I'll post up my findings when I get a change. But first, at least with these Chinese Clones, I find that the ground (GND) next to the Voltage Input (VCC) on the communications header (the 6 pins on the end of the Mini Pro) is not connected to the Ground (GND) on the other two headers.
The only thing I can figure from this that this second GND is a signal ground and not a voltage ground. In my experience I have only seen signal grounds separate from voltage grounds in audio and 2-way radio systems.
Edited December 6, 2014 by Elfen. How you did it? What software you used? What were the settings to connect to the Arduino? Input information! Knowledge is power! I know that the Arduinos use USB, so how was that hooked up to the SE/30 Serial Port?
Secondly, I a couple of Arduino Mini's (Chinese clones) that does not have USB but they do have a 6 prong serial port (2 prongs is for voltage to turn it on). I would like to get these going on a Mac 68K/PPC.
'How you did it?' I just connected the TX, RX and ground pins from the Macintosh printercable to the arduino with a max232 chip in between to do the ttl rs232 conversation. But with TX going to RX and RX going to TX. The arduino was just running a program I wrote to interpret commands from the serial connection to switch pins on and off.
I can upload the source on github if you want, but the code is really not something to brag about. 'What software you used?'
On the Macintosh I used ZTerm to connect to the serial interface with baudrate 9600 as bigmessowires suggested. I think it would be cool being able to actually program the arduino from the macintosh, but would require building the avr-gcc compiler for the macintosh. I think it would be cool being able to actually program the arduino from the macintosh, but would require building the avr-gcc compiler for the macintosh Too bad; though it might be possible to throw the library into another gcc compiler for the mac that is out there.
But that might be too much work. I would like to see that program. If it's less than 25 lines of code I'm sure you can post it up here. If its more than 25 lines, then Git Hub is the way to go. And be proud, to you your code may not be much but to others it could answer some questions they have been seeking long ago. Yes, I could write one myself but why reinvent the wheel? Thanks for the information!!
Edited December 6, 2014 by Elfen. This is very similar to something I did a few years ago. I built a spectrum analyser with my SE/30. Basically, wrote a program to read serial data inputted from the atmel processor, the atmel processor was responsible for sampling the MSGEQ7 IC, and sending it to the Mac.
It worked, but was slighly slow update/refresh on the mac side. To be expected because the app was written in realbasic. RB apps wont run on the 68000 because it requires CFM68K which is 32-bit. Edited December 7, 2014 by techknight.