Guide to RS232 / Serial Interfacing to the IRCF360

Commands can easily be sent to the IRCF360 from you robot controller (or PC) via the RS232 interface or any pin that can be programmed as a serial connection using software  The IRCF communicates at 9600 baud, 1 stop, bit no parity. 

If all this sounds a little overwhelming at first then - don't worry!! Most of this you don't need to worry about - it is actually very straight forward.

The IRCF360 delivers asynchronous serial data with a non-inverted (true) 'RS-232' format, except voltages are at 0-5 volts. Although the voltage is outside the RS-232 standard, it is suitable for interfacing to robot controllers. Depending on the configuration of your robot controller's serial connection, the signal on your robot  controller may need to be configured for 'true' signals (usually this is programmable). Please note that by default some microcontrollers (such as basic stamp or PIXAXE) have inverted serial interface connections. Ensure these are set to 'True'   

The data is true serial data format so if connecting to a PC then you'll need an external RS232 level translator such as MAX232 or the Acroname BrainStem which is also available from ROBOTmaker store.  

If you intended to only connect to PC or connect to a robot controller that can not be programmed to for true logic levels,  then select the version of the IRCF360 that has inverted serial signals. 

The IRCF360 delivers asynchronous serial data with a 8 databits and no parity. The signals are also 'true 'RS-232' format - except that voltages are at 0-5 volts, making it ideal for connection directly to a robot controllers.  

Although the voltage is outside the RS-232 standard, it is suitable for interfacing to most robot controllers.  Please note that by default some microcontrollers (such as basic stamp or PIXAXE) have inverted serial interface connections as default. These need to be set to 'non-inverted' or 'True' format. For example on the Basic Stamp by Parallax, the command is as follows:

Example Basic Stamp programming code
SERIN 1, 84, [VARIABLE_1, VARIABLE_2, etc]
 
This means receive data on pin number 1 at 9600 bps, 8 bit no parity, non-inverted format

SEROUT 2, 84 [[VARIABLE_1, VARIABLE_2, etc]
This means send data (variable_1 and variable_2 on pin number 2 at 9600 bps, 8 bit no parity,  non-inverted (true) format  

Example PICAXE programming code
SERIN   1,T9600_8, [VARIABLE_1, VARIABLE_2, etc]

This means receive data on pin number 1 at 9600 bps, 8 bit no parity, non-inverted (true) format. The '8'  after the T9600 indicates that the process is running at an internal  8MHz rather than the default 4MHz.   

SEROUT  2,T9600_8,   [VARIABLE_1, VARIABLE_2, etc]

This means send data (variable_1 and variable_2 on pin number 2 at 9600 bps, 8 bit no parity,  non-inverted (true) format.  The '8'  after the T9600 indicates that the process is running at an internal  8MHz rather than the default 4MHz.   


...and that's all there is to it. 

If however you only intend to connect the IRCF360 to PC or connect to a robot controller that can not be programmed to for non-inverted logic then select the version of the IRCF360 with inverted serial port. Alternatively a USB or serial line driver can be purchase. See below for more details.
 

What does asynchronous and synchronous mean?
One of the most popular forms of communication between electronic devices is serial communication. There are two major types of serial communication; asynchronous and synchronous. The IRCF360 uses asynchronous communication, 8 data bits and no parity and true.
 
The term asynchronous means ‘no clock.’ More specifically, ‘asynchronous serial communication’ means data is transmitted and received without the use of a separate ‘clock’ line. Data can be sent using as few as two wires; one for data and one for ground. The PC's serial ports (also called  COM  ports  or  RS232  ports)  use  asynchronous  serial  communication.  Note:  the  other kind of serial communication, synchronous, uses at least three wires; one for clock, one for data and one for ground. 

RS232  is  the  electrical  specification  for  the  signals  that  PC  serial  ports  use.  Unlike  standard  TTL logic, where 5 volts is a logic 1 and 0 volts is logic 0, RS232 uses -12 volts for logic 1 and  +12 volts for logic 0. This specification allows communication over longer wire lengths without amplification. Most  circuits  that  work  with  RS232  use a line driver/ receiver  (transceiver).  

This  component does two things: 
  • Convert the ±12 volts of RS-232 to TTL compatible 0 to 5 volt levels.  
  • Invert the voltage levels, so that 5 volts = logic 1 and 0 volts = logic 0. 
Connecting the IRCF360 to a PC
If you intend to connect the IRCF360 to a PC then a common line driver device is the MAX232 from Maxim semiconductor (www.maxim.com). With the addition of a few  capacitors,  a complete  2-way  level  converter  is  realised.  Figure below shows a typical circuit for one of these devices.


If this sounds too duanting for you, don't worry. You can buy one already assembled from many suppliers as an external RS232 level translator such as the Acroname BrainStem which is also available from ROBOTmaker store. Most of these today include a USB connection rather than serial connection too.