Freescale Semiconductor Quick Start Guide Rev. 0, 7/12/2004 The Connector: MC9S12NE64 Game Quick Start Guide Introduction This guide is a quick overview of the "Connector: MC9S12NE64 Game". It will also walk you through how to install source code and troubleshoot problems that may occur during game play. The Connector is a standalone application that runs on a windows-based PC environment. The user controls the car by pressing the proper keys on the PC keyboard, and the messages are then sent to the Connector game via the keyboard port. With the MC9S12NE64 demo board (or evaluation board), OpenTCP stack software, and MC9S12NE64 source code, the game play becomes Ethernet optimized. This means the MC9S12NE64 demo or evaluation board becomes an Ethernet joystick. This is possible because the MC9S12NE64 and the OpenTCP stack software have the ability to send and receive User Datagram Protocol (UDP) messages over the Ethernet. Once the UDP messages are received by the Connector game running on the PC, the Connector source code executions the desired response on screen. The Connector and the MC9S12NE64 is an example of a simple Ethernet application that sends and receives UDP messages, but this example can be applied to real-world applications. For example, the MC9S12NE64, with the proper software, could be installed into a remote vending machine and UDP messages could be sent to home office. The MC9S12NE64 could send UPD messages that would inform the home office that the remote vending machine is out of inventory, out of change, or a power failure has occurred. (c) Freescale Semiconductor, Inc., 2004. All rights reserved. How to Install How to Install The Connector has two modes of operation. In the first mode of operation, the game can be played using the keyboard. In second mode of operation, the game is played using the MC9S12NE64 demo or evaluation board. This mode of operation sends and receives UPD messages to and from the PC and the MC9S12NE64 board. PC controlled game play 1. Insert the MC9S12NE64 Resource CD into the CDROM drive on the PC. 2. Click on the "MC9S12NE64 game" link. 3. Double click on "The Connector: MC9S12NE64 Game" link. 4. The Connector game will open and you can begin game play. DEMO9S12NE64 or EVB9S12NE64 controlled game play To play the game via the MC9S12NE64 MCU the Connector_App source code must be installed to the DEMO9S12NE64 or EVB9S12NE64 board. Please refer to the quick start guide included in the box for the exact details on how to program the Connector_App code to the board. Source Code Connector_Flash_MX for the Game This game was created in Flash MX Professional 2004, and the UDP and TCP/IP communications was created by a third party tool called Flash Studio Pro V2. You can download trial versions of Flash Studio Pro V2 from the MDM website at http://www.multidmedia.com/software/flashstudio/. All the Flash ActionScript (*.as) files are included on the MC9S12NE64 CD, and these files may be viewed in Notepad.exe. The raw flash (*.fla) files that contain the graphics of the game are not included due to Freescale Semiconductor, Inc. regulations. Within the Flash ActionScript code, the extended commands for communicating with the board all contain the prefix "flashstudio " and take the format of normal Flash FS commands - i.e. fscommand("flashstudio.socketlistenon", "_root.listenPort"); These commands can be found in the external script pages NE64_init.as and NE64_control.as. The NE64_control.as page has all of the processing functions for commands received from the MC9S12NE64 board. All other external script pages are named according to the device that is controlled by the scripts. The majority of the scoring and game play functions are within the init_external.as page. The Connector: MC9S12NE64 Game, Rev. 0 2 Freescale Semiconductor Troubleshooting Connector_App for the DEMO9S12NE64 or EVB9S12NE64 The Connector_App source code for the DEMO9S12NE64 and EVB9S12NE64 was created using CodeWarrior Development Studio 3.1 for HCS12. The source code can be broken into three parts: * * * User I/O - handles the input and outputs of the demo or evaluation board Scaled Down version of the OpenTCP stack to support UDP and TCP/IP only - handles the sending and receiving of the UDP messages in the MC9S12NE64 MCU Low-level EMAC and EPHY drivers - handles the configuration of the EMAC and EPHY Troubleshooting If you can not control the game play from the demo or evaluation board or the following window appears: * * * * * * * * Make sure the cable Ethernet cable is a crossover cable. This cable is a special Ethernet cable that switches the Tx and Rx signals. This cable is included in the demo or evaluation board box. Make sure the board is powered correctly. Refer to DEMO9S12NE64 or EVB9S12NE64 quick start guide for further details. Make sure the IP address on the PC is 192.168.2.1 by performing a ping test. Refer to DEMO9S12NE64 or EVB9S12NE64 quick start guide for further details on how to perform a ping test. Make sure the Connector_App code is programmed into the MCU on the demo or evaluation board and perform a ping test. Make sure the IP address on the demo or evaluation board is 192.168.2.3 by performing a ping test. Refer to DEMO9S12NE64 or EVB9S12NE64 quick start guide for further details on how to perform a ping test. Make sure all the devices on the network are not using the following IP addresses: 192.168.2.3 (MC9S12NE64 IP address) or 192.168.2.1 (PC or Connector game IP address) To remove the Error Window, press the "No" button and press "R" on the PC keyboard to restart the game. The DEMO9S12NE64 or EVB9S12NE64 has the same MAC address as another device on the network. Remove the other device from the network and try again. Other Issues When using the keyboard controls, mission statements sometimes appear when pressing the space bar. If this occurs, reset the game by pressing the "R" key or re-launch the game application. The Connector: MC9S12NE64 Game, Rev. 0 Freescale Semiconductor 3 How to Reach Us: Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted USA/Europe/Locations not listed: Freescale Semiconductor Literature Distribution P.O. Box 5405, Denver, Colorado 80217 1-800-521-6274 or 480-768-2130 hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the Japan: Freescale Semiconductor Japan Ltd. SPS, Technical Information Center 3-20-1, Minami-Azabu Minato-ku Tokyo 106-8573, Japan 81-3-3440-3569 suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "Typical" parameters which may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including "Typicals" must be validated for each customer application by customer's technical experts. Asia/Pacific: Freescale Semiconductor H.K. Ltd. 2 Dai King Street Tai Po Industrial Estate Tai Po, N.T. Hong Kong 852-26668334 Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Learn More: For more information about Freescale Semiconductor products, please visit http://www.freescale.com Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. FreescaleTM and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. (c) Freescale Semiconductor, Inc. 2004. Rev. 0, 7/12/2004