You are here: Home DOCUMENTATION Adapt9S12D Using Your Adapt9S12D Microcontroller Module - Setup the hardware

Technological Arts Inc.

Your Shopping Cart

Your Cart is currently empty.

Using Your Adapt9S12D Microcontroller Module - Setup the hardware

Article Index
Using Your Adapt9S12D Microcontroller Module
Overview of features
Getting Started
Setup the hardware
Application Programming
Software Debugging
Software Considerations
Memory Map
Interrupts
Software Considerations - S12 Clock
Hardware Details
Appendix
All Pages

Setup and Verification of Hardware

Power and serial connections, switch positions, default jumper positions

If you have purchased a bundle (i.e. an Evaluation Package or Solderless Experimentor Package), a suitable power supply is included.  Otherwise, the power cable assembly #PCJ1-8, supplied with the board, can be used to connect to your external power source. The tinned ends of the cable assembly can be connected to a bench power supply, spliced onto the cut-off end of a power supply, connected to a battery pack, or used in some other arrangement which you find suitable for your application.  The board requires a DC power source capable of delivering between 6 and 12 volts at a minimum of 100 mA.  Most standard "wall wart" power supplies should be capable of meeting this requirement. If you need to purchase one, Technological Arts offers a few suitable choices:

  1. #DC9V, a 9V 300mA North American style wall adapter, which has a 2-pin Molex connector, ready to attach to the board's power connector
  2. #DC12VRS, a 12V North American style switchmode wall adapter, with 2.1mm center-positive barrel plug
  3. #DC9VSI-INT DC, a 9V international Switching Power Supply with a set of interchangeable plugs to accommodate all regional power outlets.

Additional power cables are also available if needed. Item #BJ2PCJ1 includes a barrel jack to connect to items 2 and 3, listed above.  Once the power cable has been attached to your power supply, use a voltmeter to verify that the red wire is in the +6 to +12 DC volts range in relation to the black (ground) wire. Only then should the cable be plugged into the matching two-pin power connector on the board. (Refer to the diagram below.) When power is first applied, the green LED on the board should light up. This provides verification that the module is receiving power. Unplug power before proceeding.

There are several jumpers placed on the board as well as pads to put jumpers. When the board is first used, there are only a couple of jumpers that need to be checked. These are listed below, along with their default settings. (A full jumper list is provided later.)

Jumper Function Default Setting
JB1 ModA select 0
JB1
ModB select 0

These should generally be left at their default settings, unless there is an application need to change it. The ModA and ModB settings shown select Single Chip mode.  For Expanded Mode settings, refer to the Freescale S12D Device Guide.

The 9-pin D-sub connector on the board is a standard RS232 serial port implemented on SCI0 on the S12 chip. SCI1 is also implemented as an RS232 port, next to the 9-pin D-sub, as a four pin header. The board includes an RS232 level translator for both of these, so the output can attach directly to a serial port on your computer. Technological Arts provides a cable (Item #SCPC9) for SCI1 that plugs into the header and provides a standard 9-pin D-sub connector, just like SCI0. The pinouts for these two serial connectors are as follows:

SCI 0 Description
  SCI 1 Description
Pin 2 Transmitter Output   Pin 1 Receiver Input
Pin 3 Receiver Input   Pin 2 Ground
Pin 5 Ground   Pin 3 Transmitter Output
      Pin 4 No Connection

You will need a serial cable for the 9-pin SCI0 connector if you plan to use the pre-installed monitor to program the board and troubleshoot your applications, or if you are using the StickOS BASIC version of the board.  If you prefer to use your host PC's USB port, a Technological Arts #USB232 retrofit module may be used instead, plugging on to the 9-pin D-sub connector.  This module can optionally provide 5VDC to power the Adapt9S12D module from the host USB port, plugging into the J1 power connector via flying leads provided.  If this configuration is used, an external power supply isn't necessary.

Using the Factory-Installed Demo Program

The S versions of Adapt9S12D modules (i.e. those with the Serial Monitor installed) come pre-programmed with a Demo program in Flash. You can run this with the Load/Run switch in the Run position when applying power or pressing reset. When the program starts, it will blink the red LED on Port P7 three times, to show that it is running. To use the program, though, you will need to connect a serial cable from the SCI0 serial connector to your computer. The Demo program requires use of an ASCII terminal program, such as HyperTerminal on Windows systems, to provide a means for you to interact with the program. The terminal program will need to be set up with the following properties:

  • Emulate ANSI terminal type
  • 9600 baud
  • 8 bits
  • One stop bit
  • No parity
  • No flow control
  • Do not append line feeds to incoming line ends
  • No local echoing of typed characters

When the Demo program starts, it prints out a menu somewhat like this:


Adapt9S12DP512 DEMO PROGRAM COMMAND MENU V1.00
_________________________________________________

A => SHOW PORT A STATUS
B => SHOW PORT B STATUS
C => CLEAR PORT P OUTPUTS
E => SHOW PORT E STATUS
F => FLASH LED (CONNECT TO PP7)
H => SHOW PORT H STATUS
J => SHOW PORT J STATUS
K => SHOW PORT K STATUS
M => SHOW PORT M STATUS
P => SHOW PORT P STATUS
S => SHOW PORT S STATUS
T => SHOW PORT T STATUS
R => SHOW 10 BIT REAL-TIME ANALOG VALUES
0 TO 7 => TOGGLE THE SELECTED P PORT LINE
?

Typing each of the available letter commands in sequence from A through R will generate output similar to the following:

PORTA=255
PORTB=000
PORT P CLEARED
PORTE=159
>>> LED FLASH! <<<
PTH=000
PTJ=247
PORTK=255
PTM=015
PTP=000
PTS=255
PTT=000
AD0=0384 AD1=0390 AD2=0391 AD3=0385 AD4=0384 AD5=0384 AD6=0384 AD7=0387

The analog output updates the same line continuously on the screen.  You can terminate the update with the Enter key, which will reprint the menu.  The number keys 0 through 7 will toggle the logic level of the corresponding pin on Port P.  You can see this by typing 7, and watching the red LED on the board change state.

Connecting to D-Bug12

The default versions of Adapt9S12D modules come pre-programmed with the Freescale D-Bug12 Monitor program in Flash. D-Bug12 has four operating modes, which are set by jumper options on PAD00 and PAD01.  These pins are read by the startup code in D-Bug12 whenever a reset event occurs.  The operating modes and their settings are covered in the Freescale D-Bug12 Reference Guide.

To use D-Bug12, you will need to connect a serial cable from the SCI0 serial connector to your computer. D-Bug12 requires use of an ASCII terminal program, such as HyperTerminal on Windows systems, to provide a means for you to interact with the program. The terminal program will need to be set up with the following properties:

  • Emulate ANSI terminal type
  • 9600 baud
  • 8 bits
  • One stop bit
  • No parity
  • Software flow control (i.e. XON/XOFF)
  • Do not append line feeds to incoming line ends
  • No local echoing of typed characters

Refer to the D-Bug12 Reference Guide for all further information related to D-Bug12.

 



Last Updated ( Wednesday, 17 April 2019 11:53 )