You are here: Home DOCUMENTATION Debugging Tools uBug12JE User Manual - Connecting to the Module

Technological Arts Inc.

Your Shopping Cart

Your Cart is currently empty.

uBug12JE User Manual - Connecting to the Module

Article Index
uBug12JE User Manual
Installation
Connecting to the Module
Programming the Module
Extending uBug12 INSTALL
Assemblers
Developing Software Using Projects
Script Command Buttons
uBug12 Miscellaneous Features
Command Glossary
Writing Compatible Applications
Appendix
All Pages

Connecting to the Module

WARNING: The MCU board contains electrostatic sensitive components, and it is recommended that standard electrostatic precautions be taken when handling the module. There does not have to be a visible spark for a dangerous voltage to affect the electronics. Just walking across a carpet on a dry day is enough to build up a potentially damaging amount of static charge. Recommended precautions include using a wrist grounding strap and/or a grounded workstation. The module can also be installed in a protective housing to keep it isolated from undesired external voltage sources.

You will need a Freescale MCU board with a variant of the HCS12 or S12X processors, such as one of the processor boards available from Technological Arts, with an available serial port. (Some boards come with a built-in serial port-to-USB adapter, which can also be used.)  The on-chip Flash memory must also be programmed with a serial monitor compatible with the one described in the Freescale document AN2548.

Next, the board must be connected to your computer via a cable for communication to occur. For "Adapt" style boards (and other boards with RS-232C interface), this will require an RS-232C serial connection between the two systems. If your computer does not have a serial port available, you can use a USB to serial converter to provide the necessary interface. The Technological Arts #USB2COM or #USB232 USB to serial converter interface products will work, should you need one. The serial cable should go to the 9-pin D connector on the module, which is mapped to SCI0 on the MCU. (If the S12 module you are using has a built-in USB interface (e.g. Esduino), just connect it to your computer via a USB cable.)  Once the serial cable is in place check to make sure the Load/Run switch is in the Load position, and then power can be applied to the module. That's all that is required to get the two systems physically connected. You are then ready to have uBug12 communicate with the board.

It is also possible that your Technological Arts "Adapt" module has been programmed with a version of the serial monitor that uses SCI1, if it exists, rather than SCI0. This may be the case if the module was either received from or set up by another party. If so, you will need an adapter that plugs into the 4-pin header next to SCI0 on the board. Technological Arts provides a cable (#SCPC9) for SCI1 that plugs into the header and provides a standard 9-pin D connector, just like SCI0.

Once the hardware connection is made, start up the uBug12 program. After the program is running, you will see two text sections that occupy most of the program window. The upper box is where the program prints its output. The one-line lower text box is where you type in commands.

For your first command, type 'HELP', followed by the Enter key on your computer. All commands are completed by use of the Enter key. The upper output box should then show a summary of the commands uBug12 understands at that point.  The list of available commands will change based on whether or not uBug12 is communicating with a board, and the type of MCU on that board.

The second command to type in uBug12 is 'CON', which is shorthand for CONnect, to connect to the board via the serial connection. Just typing 'CON' will cause the program to search for the connected serial port.  If you specify a Windows COM port, this will need to be specified as in 'CON 1' for COM port 1, etc. If the connection is successful, the program will report that the connection is established by printing "CONNECTED". Otherwise you will get "Connection Error: Unable to open COM1". (The port number will be replaced by the actual port number you specify.)

The port name can also be specified completely for all OS types. Port names are case sensitive though, even for Windows.  So 'COM5' is legal, but 'com5' isn't.

On some systems the port search variation of the CON command may not work.  This is not an issue with uBug12, but is due to the Operating system and its interaction with its native serial port drivers. Instead, first EXIT uBug12, restart the program, then specify the port explicitly with CON.

It may be possible that the version of the serial monitor programmed into your module is modified to communicate using a different baud rate. This will not generally be the case, as all boards from Technological Arts are programmed to use the default baud rate of 115200. However if your serial monitor program has been changed for baud rate, you will have to use the 'CON' command with both a port number and baud rate specified. Example: CON 5 9600

At this point the module should be communicating with the uBug12 program. If reset is pressed on the board, most likely you will need to enter the same 'CON' command again to reconnect.

If there are problems, check your serial cable, make sure the board has power applied and the green power LED is on, and make sure the Load/Run switch is in the Load position. Then press the Reset button on the board again, and retry the CON command.

The next command to use is 'VERSION'. This will check the version of the serial monitor currently installed in Flash. uBug12 requires that the microcontroller have a serial monitor programmed into the top 2K of Flash memory. The serial monitor is based on the popular AN2548 version originally developed for the HCS12 microcontroller series, but may have been adapted to the particular CPU environment. If your flash does not have a serial monitor programmed into it, you will need to program it into the flash memory. However to do this will require the use of a BDM pod. (See the Appendix for the upgrade procedure.)



Last Updated ( Tuesday, 13 September 2016 08:12 )