I have a couple questions about the microcontroller. Lately I have heard the terms “rs-232”, RX and TX, serial port, and TTL. What are all of these ports? Are they just advanced ways to connect to the microcontrollers? And what would they be used for? Thanks if you know anything about these.
Well, I will try to explain them the best that I can.
“RS-232” refers to a specific communications standard used when devices communicate with each other over a serial port. It typically uses positive and negitive voltages.
“RX” and “TX” in this case, refer to the top two connection ports on the Vex Microcontroller above the Analog/Digital ports. These are used for serial communications. “RX” receives the incoming data and “TX” transmits the outgoing data.
A “Serial Port” refer to a type of communications port used by devices to communicate with each other. A “Serial Port” uses just two lines - one to transmit data and one to receive data. The digital information is sent in a series of 0’s and 1’s.
The VEX MIcrocontroller has two serial ports - one on the back next to the RC receiver inputs that is used for programming and the one I mentioned above the Analog/Digital ports (TX and RX ports) which can be used for accessories like the upcoming LCD screen due out this fall.
“TTL” refers to a family of logic chips that are used to build electronic circuits that run on +5 Volts. A low level logic signal is usually less than 1 Volt and a high level signal is usually around 4 Volts ( I think ).
I hope this information will help answer your questions and if I got anything wrong, hopefully somone will correct me
Does any one actually use the Rx and Tx Ports on top of the microcontroller. I have never seen these in use for any robots. Does any one have any pictures or applications of these ports in use? I think I read somewhere that robots could “talk” to each other through these ports. Has any one accomplished this either? It is going to be cool when the LCD screen comes out!
i attempted to make a connection between the Vex microcontroller and the Parallax BS2px microcontroller but I walked into the problem of BAUD rates. The baud rates of the Vex 115200 (i think close) and the BS2px 19600 were different thereofore I could not establish a connection btw the two controllers.
I use the serial ports all the time, and I’ve been working on a robot that uses two Vex controllers that talk to each other. There are also serial devices like a compass that use the serial port. There is a prior poster that says serial isn’t used much any more, but you would be surprised at the number of systems that still use serial for external devices.
You can change the baud rates on the Vex to match the BS2. The default baud rate is 115200. Technic-R-C tell us your programming environment (Easy-C, MPLab, etc) and we can tell you how to get the BS2 to talk to your Vex
Great, I was misinformed about this topic. However now I would appreciate if you gave me the code for changing the baud rate in EasyC. Just plain C code will work great.
Thanks for clearing up what some of these ports are used for. Now I have a very random question and I don’t want to start a new thread. I want to store data from a ultrasonic sensor and I have read that you can use an array? Can someone explain these more and how they work? Or does any one else know a simpler way of storing variables?
Yes you can. I believe I started this topic a couple of months, maybe years ago. (don’t have much time to find the post) Here is some more information about arrays that should help you get started.
EasyC has a central library of routines that it uses. The library is distributed as the WPILibray. If you look at the documentation you will find a series of routines that you need to use with the serial port: