Home

AK-S12NE64-A User's Manual

image

Contents

1. W True Time Simulator amp Real Time Debugger C Documents and Settings pxausa Desktop Demo NE64_OpenTCP Monitor ini QUES File View Run MONITOR HCS12 Component Memory Window Help 5 sa ele re eee F 5 Al C Documents and Settings pxausa Desktop Demo NE64_OpenT CP Sources main c Line 66 Startup ay a 4000 BRSET 0x401D 2 8 abs 4008 4005 LDS Ox4021 4008 CLR Ox0011 400B LDAB 57 400D STAB 0x10 400F LDAA 9 4011 STAA 0x12 4013 CALL 0xB4C8 0x3C 7 mai j void main void UINTLE tl t2 System clock initialization m gt HC12 Auto g P D 0 A o B o IX D TE 0 IP 4000 PC 4000 PPAGE 3F Startup SP 4000 CCR SXHIN L E E Memory Coe Start2 c Auo Symb Global Auto _startupData lt 24 gt _tagStartup 000080 07 07 00 20 05 00 00 00 kad 000088 80 00 00 00 00 00 00 FF 000090 00 00 00 00 00 00 00 00 000098 00 00 00 00 00 00 00 00 000040 00 00 00 00 00 00 00 00 Startup Auto Symb Local After load the commands written below will be e gt Show main function at startup FindProc main done cmd monitor_postload cud lt gt For Help press F1 Automatic triggers breakpoints watchpoints and trace possible MC9512NE64 done emdimonitor_F Debugging Session Started 6 From the main menu choose Run gt S
2. BB readme txt na na ma a Application K Beem M mainc 406 Se ox M Vectors c 130 De ea E mainh 0 0 z M Memory c 670 De x M ContolPanelc 241 Be x BE Drivers_NE64 K Keen M neG4configh na ma z M address c 2 De x M neGddiver c 1508 4611 af M neG4apic 345 Me ot M ne64debug h 0 De of M neG4debug c 0 De x OpenTCP 22K Koe of M apc 1825 13e of M icmp c 331 De oa M ic 1646 128 xf D tcp c 4792 420 m_ BB bootp c 1178 8 oa AB dhepe c 1842 20 x M dns c 1008 13e x B tipsc 816 2o x BD udp c 120 44e x M http_serverc 1240 50 x htps_calbacks c 1100 2 ea M pop3_cliente 2781 o x M pop3c_calbacks c 83 4 x M smtp_clientc 1440 ie x M smtpc_callbacks c 280 10 x EE OpenT CP_Support K Ke 6 af M mue 187 o x B Inte 1 D x AB timers c 232 275 mi7 54 fles 3K SK 2 Opening the Demo Project Page 43 Getting Started 3 Make sure that the default target is set to Monitor from the main menu choose Project gt Set Default Target gt Monitor 4 Reset the microconiroller to monitor mode by pressing and keeping pressed the RESET push button and the PGO push button and releasing them in the inverse order 5 From the main menu choose Project gt Debug This will compile the source code generate an executable file and download it to the AK S12NE64 A Starter Kit board A new debugger environment will open
3. STARTER 1av AK S12NE64 A User s Manual PROTOTYPE AREA CM HCSI2NE64 POWER SUPPLY www softeemicro com g SIGNAL PINS SPEAKER TEMPERATURE AK S12NE64 A PESTER Tie DP SWITCHES HCS12 STARTER MICROSYSTEMS Development Tools for the Embedded World AK S12NE64 A Starter Kit for Freescale MC9S12NE64 User s Manual Revision 1 0 ICROSYSTEMS t 2004 SofTec Microsystems DC00784 M Copyrigh We want your feedback SofTec Microsystems is always on the look out for new ways to improve its Products and Services For this reason feedback comments suggestions or criticisms however small are always welcome SofTec Microsystems E mail general information info softecmicro com E mail marketing department marketing softecmicro com E mail technical support support softecmicro com Web http www softecmicro com Important SofTec Microsystems reserves the right to make improvements to the AK S12NE64 A Starter Kit its documentation and software routines without notice Information in this manual is intended to be accurate and reliable However SofTec Microsystems assumes no responsibility for its use nor for any infringements of rights of third parties which may result from its use SOFTEC MICROSYSTEMS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA PROFITS USE OF PRODUCTS OR INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF ADVISED OF THE POSSIBILITY THER
4. Speaker Temperature sensor 9 DC Motor 10 Inputs section 11 Reset push button 12 Prototype area NN WN Page 14 AK S12NE64 A User s Manual 2 2 1 Core Module and Signal Pins Section This area is dedicated to the hosting of the CM HCS12NE64 Ethernet Core Module described later On the evaluation board four connector strips are available with all of the Core Module s microcontroller signals one to one correspondence 2 2 2 RS 232 Section This area contains an RS 232 connector D Sub 9 pin female connector an RS 232 transceiver and two jumpers to connect disconnect the SCI0_TXD and SCIO_RXD signals to from the microcontroller The RS 232 connector can be used to communicate with the PC and take advantage of the Core Module s microcontrollers pre programmed serial monitor to download and debug your application 2 2 3 Power Supply Section This area contains a 12 V DC input connector and generates two regulated voltages 3 3 V DC and 5 0 V DC The 12 V DC input voltage is also provided to the board A green POWER LED is connected to the 3 3 V line 2 2 4 ATD Reference Section This area contains two jumpers which allow you to define the high VRH and low VRL voltage reference for the MCU internal A D converter 2 2 5 LAN Section This area contains five LEDs ACTIVITY LINK SPEED DUPLEX and COLLISION which monitor the LAN status connected
5. gso Get Speaker On Speaker enable 0 1 ssf lt freqmul gt Set Speaker Frequency freqmul 1 50 gsf Get Speaker Frequency Speaker frequency multiplier 1 50 The Demonstrative Protocol Implemented in the Starter Kit Page 31 Getting Started 6 When finished experimenting with the DevCont utility click the Disconnect button 3 6 Lesson 5 Control Panel Windows Utility The same protocol described in the previous lesson is used by a Windows application AK S12NE64 A Control Panel This utility is located on the SofTec Microsystems System Software CD ROM under the AK S12NE64 A Utilities ControlPanel directory 1 Copy the content of this directory to your hard drive and launch the ControlPanel exe program B AK HCS1 2NE64 Control Panel Communication Settings Potentiometer IP Address 192 168 1 100 Open Socket TCP Connect tion Port 5000 UDP Connect tion Port 5000 LEDs Speaker Temperature Motor D e E UEN AA ee AAAA soc ef te r Ja Ula be DIP Switches 1 FAULT 0 C Push Buttons mi oc e 8 e el PG3 PG2 PG1 PGO joie en The AK S12NE64 A Control Panel Windows Application 2 Select the communication protocol TCP or UDP 3 Click the Open Socket button to start communicating with the Starter Kit Page 32 AK S12NE64 A User s Manual 4 The board s controls will continuously update reflect
6. i AK S12NE64 A Java Demo Application Open Socket Close Socket POWER SUPPLY ors Activity Status MOTOR _oncrr _ Toggle ir by Applet demo started D Internet PADO AK S12NE64 A Control Panel Java Applet 7 Click the Open Socket button to start communicating with the starter kit 8 The board s controls will continuously update reflecting the board s real status 9 The potentiometer push buttons DIP switches temperature motor current and motor LED are input only controls all other controls are input output controls 10 When finished testing the board click the Close Socket button Page 36 AK S12NE64 A User s Manual 3 8 Lesson 7 Create your own Web Pages 3 8 1 Introduction The OpenTCP suite provides a simple web server it does not provide however a file system so that a problem arises when you need to store your web pages Where to put them We solved this problem by creating a very simple file system which stores web pages in the Core Module s external 1 Mbyte serial FLASH memory This file system is nothing more than a data structure containing the file contents together with basic information such as file size and memory address where it is stored To create this data structure we provide a simple DOS utility Web2Flash exe that ta
7. Network Connection Type What do you want to do Connect to the Internet Connect to the Internet so you can browse the Web and read email O Connect to the network at my workplace Connect to a business network using dial up or VPN so you can work from home a field office or another location O Set up a home or small office network Connect to an existing home or small office network or set up a new one O Set up an advanced connection Connect directly to another computer using your serial parallel or infrared port or set up this computer so that other computers can connect to it New Connection Wizard Step 2 5 On the next dialog box select the Set up my connection manually option and click the Next button New Connection Wizard Getting Ready The wizard is preparing to set up your Internet connection How do you want to connect to the Internet O Choose from a list of Internet service providers ISPs Set up my connection manually For a dial up connection you will need your account name password and a phone number for your ISP For a broadband account you won t need a phone number Use the CD got from an ISP New Connection Wizard Step 3 Page 22 AK S12NE64 A User s Manual 6 On the next dialog box select the Connect using a broadband connection that is always on option and click the Next button New Con
8. SMD area for soldering SMD components in SOIC package 2 3 The Ethernet Core Module The CM HCS12NE64 Ethernet Core Module is the heart of the AK S12NE64 A Starter Kit It features Page 17 AK S12NE64 A Components A112 pin LQFP MC9S12NE64 microcontroller A 10 100 Base T integrated RJ45 Ethernet connector with integrated magnetic isolation module An 8 Mbit 1 MByte x 8 serial FLASH memory A4 Kbit 512 Bytes x 8 serial EEPROM A 25 MHz crystal oscillator A Reset supervisor circuitry A BDM connector for in circuit debugging programming 7 Two header connectors to connect to the AK S12NE64 A evaluation board base with all of the microcontroller s signals Tip the Ethernet Core Module only requires a 3 3 V DC power supply to work The Ethernet Core Module can be used as the main building block in a user designed embedded system Page 18 AK S12NE64 A User s Manual 3 Getting Started 3 1 Introduction The AK S12NE64 A Starter Kit comes already pre programmed with a firmware that demonstrates all of the main features of both the board hardware and the TCP IP protocol suite To easily learn these features we have created a step by step tutorial organized in the following lessons Setup a PC connection using the provided Ethernet cross cable Test the board connection using the PING command Web server demo TCP and UDP communication AK S12NE64 A Control Panel Wi
9. TCP IP item and click the Properties button L Local Area Connection Properties wes General Authentication Advanced Connect using E9 3Com Gigabit LOM 3940 fe This connection uses the following items M Bh Client for Microsoft Networks M File and Printer Sharing for Microsoft Networks M B dos Packet Scheduler v F Intemet Protocol TCP IP Protocol Internet Proto he default jotocol that provides commit bnnected networks Install Description Transmission d wide area net across diverse Show icon in notification area when connected OK Cancel Local Area Connection Status 10 If you have started from an existing connection write down all of the TCP IP parameters You ll need them later to restore your LAN settings to the original parameters Page 24 AK S12NE64 A User s Manual 11 Select the manual settings and type in the following values IP address 192 168 1 101 Subnet mask 255 255 255 0 Internet Protocol TCP IP Properties eg General You can get IP settings assigned automatically if your network supports this capability Otherwise you need to ask your network administrator for the appropriate IP settings O Obtain an IP address automatically 3 Use the following IP address IP address 192 168 1 101 Subnet mask 255 255 255 0 Default gateway Use the following DNS server addresses Preferred DNS ser
10. EOF Trademarks Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc Metrowerks and CodeWarrior are trademarks or registered trademarks of Metrowerks Corp Microsoft and Windows are trademarks or registered trademarks of Microsoft Corporation PC is a registered trademark of International Business Machines Corporation Other products and company names listed are trademarks or trade names of their respective companies This product includes software developed by Viola Systems http www violasystems com AK S12NE64 A User s Manual Contents 0 Before Starting 5 0 1 Important Notice to Users 5 0 2 Required Skills 5 1 Overview 7 What is the AK S12NE64 A Starter Kit 7 MC9S12NE64 Overview 8 OpenTCP Software 8 TCP IP Protocol Documentation 9 CodeWarrior Integrated Development Environment 9 Recommended Reading 10 Software Upgrades 11 Getting Technical Support 11 2 AK S12NE64 A Components 13 2 1 Package Checklist 13 2 2 The Evaluation Board 13 2 2 1 Core Module and Signal Pins Section 15 2 2 2 RS 232 Section 15 2 2 3 Power Supply Section 15 2 2 4 ATD Reference Section 15 2 2 5 LAN Section 15 2 2 6 Outputs Section 16 2 2 7 Speaker Section 16 2 2 8 Temperature Section 16 2 2 9 Motor Section 17 2 2 10 Inputs Section 17 2 2 11 Reset Push Button 17 2 2 12 Prototype Area 17 2 3 The Ethernet Core Module 17 3 Getting Started 19 3 1 Introduction 19 3 1 1 Resetting Parameters to Factory D
11. I TCP IP In O bytes Out 0 bytes The DevCont Utility Page 30 AK S12NE64 A User s Manual 4 After the communication has been established type sld 0 1 and click the Send button This command will turn on the PAO LED DevCont 192 168 1 100 5000 Ready I disconnect ng fromthe use Connected ASCII TCP IP In 2 bytes Out 9 bytes Turning a LED On 5 The following table lists all of the available commands Command sld lt nled gt lt status gt Description Set Led Status nled 0 7 status 0 1 Returned Value glid lt nled gt Get Led Status nled 0 7 nled status 0 1 gsw lt nswitch gt Get DIP Switch Status nswitch 0 7 nswitch status gpt Get Potentiometer Value Potentiometer value 0 255 gpb lt nbutton gt Get Push Button Value nbutton 0 3 nbutton value 0 1 gtp Get Temperature Value Temperature 0 45 gms Get Motor Speed Motor speed 0 100 sms lt speed gt Set Motor Speed speed 0 100 gmd Get Motor Direction Motor direction 0 1 smd lt mdir gt Set Motor Direction mdir 0 1 gme Get Motor Enable Motor enable 0 1 sme lt enable gt Set Motor Enable enable 0 1 gmc Get Motor Current Motor current mA gmf Get Motor Fault State Motor fault state 0 1 sso lt enable gt Set Speaker On enable 0 1
12. Time Regional and Scanners and Windows Update Connections lodem Faxes Language Cameras Help and Support N D N a Scheduled Sounds and Speech System Taskbarand User Accounts Tasks Audio Devices Information Start Menu 27 objects Windows Control Panel Page 20 AK S12NE64 A User s Manual If a Local Area Connection is already available go to step 8 Otherwise run the New Connection wizard Network Connections max je i File Edit View Favorites Tools Advanced Help GQ rx P JO search gt Folders F Address Network Connections B Dial up Al Cle My ISP See Also LAN or High Speed Internet 4 Network fillmmeshooter h A A Local Area Other Place Connection Gr Control Panel My Network Places E My Documents 9 My Computer Details amp Network Connections System Folder 2 objects Network Connections The following dialog box will appear Click Next New Connection Wizard Welcome to the New Connection Wizard This wizard helps your Connect to the Intemet Connect to a private network such as your workplace network Set up a home or small office network To continue click Next New Connection Wizard Step 1 Page 21 Getting Started 4 On the next dialog box select the Connect to the Internet option and click the Next button New Connection Wizard
13. ate HTTP response fields at the beginning of each files including information about file size file type etc and generates the binary file that will be stored in the Core s Module external FLASH memory Usage Web2Flash exe file list web where file list web is the text file which contains the list of all of the html files and the other files that make up your web pages A file file list dat will be automatically generated To generate the Starter Kit s web site type Page 38 AK S12NE64 A User s Manual Web2Flash exe demo web and the demo dat file will be generated 3 8 5 Uploading The generated file file list dat can be uploaded to the Core s Module external FLASH memory via TFTP Trivial FTP protocol using the provided Ethernet cross cable From the DOS prompt type TFTP i 192 168 1 100 PUT file list dat where 192 168 1 100 is the default IP address of the Starter Kit To upload the Starter Kit s dat file generated in the previous section type TFTP i 192 168 1 100 PUT demo dat This operation erases all of the FLASH memory before to upload the new file At the end of the uploading your website files can be accessed by a browser If your site contains an index html file for example you can view it by typing 192 168 1 100 index html in your browser s address box Page 39 Getting Started 3 9 Lesson 8 Connect the Board to Your LAN Before connecting the Starter Kit board to
14. by documents called Requests For Comments RFC We suggest to visit the site http www ietf org where all of the TCP IP RFCs are available For example a good starting point is the RFC 1180 Tutorial on TCP IP document 1 5 CodeWarrior Integrated Development Environment The AK S12NE64 A Starter Kit comes with a free version of CodeWarrior Development Studio for HC S 12 Microcontrollers Special Edition CodeWarrior Development Studio for HC S 12 is a powerful and easy to use tool suite designed to increase your software development productivity Its Integrated Development Environment IDE provides unrivaled features such as Processor Expert application design tool full chip simulation Data Page 9 Overview Visualization and project manager with templates to help you concentrate on the added value of your application The comprehensive highly visual CodeWarrior Development Studio for Freescale HC S 12 Microcontrollers enables you to build and deploy HC S 12 systems quickly and easily This tool suite provides the capabilities required by every engineer in the development cycle from board bring up to firmware development to final application development Without a license key the product will run in a 1 KB code size limited demonstration mode To break the 1 KB limit you have two options 1 Contact Metrowerks to request an unlimited period free license key to increase the code size limit to 12 KB 2 Conta
15. ct Metrowerks to request a 30 day limited free license key to run the compiler without limitations Please note however that the OpenTCP source code is larger than 12 KB and therefore the first option will not allow you to compile the OpenTCP project This documentation covers the basic setup and operation of the CodeWarrior IDE but does not cover all of its functions For further information please refer to the CodeWarrior on line help and on line documentation provided 1 6 Recommended Reading This documentation describes how to use the AK S12NE64 A Starter Kit and how to set up basic debugging sessions with Metrowerks CodeWarrior Additional information can be found in the following documents MC9S12NE Datasheets Freescale TCP IP PowerPoint Tutorials AK S12NE64 A Schematic OpenTCP Function Reference Page 10 AK S12NE64 A User s Manual All of the above documents and many more are available in the AK S12NE64 A System Software CD ROM 1 7 Software Upgrades The latest version of the AK S12NE64 A system software is always available free of charge from our website htto www softecmicro com When installing the AK S12NE64 A system software you have the option to electronically register the product If you register the product you will be automatically notified by e mail every time a new version of the AK S12NE64 A system software is available 1 8 Getting Technical Support Technical assistance i
16. curity Privacy Content Connections Programs Advanced D To set up an Internet connection click Im Setup ane Dial up and Virtual Private Network settings amp MyISP Add Choose Settings if you need to configure a proxy sd Never dial a connection Dial whenever a network connection is not present Always dial my default connection Local Area Network LAN settings LAN Settings do not apply to dial up connections LAN Settings Choose Settings above for dial up settings Disabling the Proxy Server Step 1 Page 27 Getting Started Then if the connection has a proxy enabled make sure that the Use proxy server for your LAN option is disabled Local Area Network LAN Settings Jeg Automatic configuration Automatic configuration may 0 manual settings To ensure the use of manual settings disable Bh atic configuration automatically detect setting Cluse automatic configurat Use a proxy server for your LAN These settings wil not apply to dial up or YPN connections Disabling the Proxy Server Step 2 3 Connect to the following address 192 168 1 100 The Starter Kits home page will appear Page 28 AK S12NE64 A User s Manual E Welcome to the AK S12NE64 A Starter Kit Microsoft Internet Explorer Jog Fie Edt View Favorites Tools Help r fi Q A A Ps avorites Meda O R L A http 192 168 1 100 ind
17. development environment is provided which allows you to write your own software download it to the MC9S12NE64 microcontroller and debug it Downloading and debugging your application is possible through a serial monitor pre programmed into the microcontroller The Starter Kit includes full source codes of the TCP IP protocol together with full documentation for an easy porting to your custom application Starter Kit Overview MC9S12NE64 Overview Ethernet Core Module OpenTCP Software JAVA Applet Demo Copyright 2004 SofTec Microsystems amp Internet 5 The Starter Kits Default Home Page Page 29 Getting Started 3 5 Lesson 4 TCP and UDP Communication The Starter Kit firmware implements a simple command based ASCII protocol over the TCP and UDP network protocols By using a TCP UDP terminal you will control some of the Starter Kit s hardware resources 1 The TCP UDP terminal utility provided with the Starter Kit is called DevCont and is located on the SofTec Microsystems System Software CD ROM under the AK S12NE64 A Utilities DevCont directory 2 Copy the content of this directory to your hard drive and launch the DevCont exe program 3 Type in the board s address 192 168 1 100 and the port number 5000 and click the Connect button DevCont 192 168 1 100 5000 Woks Bar eaea S sna clear Ready Connected ASCI
18. ed in the SofTec Microsystems System Software CD ROM under the AK S12NE64 A Utilities Web directory You can copy this directory to your hard drive and follow the steps in this lesson The Web2Flash exe utility explained in the next section reads data from two configuration files and generates the binary file that will be stored in the Core s Module external FLASH memory The first configuration file demo web in this example is a text file which contains the list of all of the html files and the other files that make up the web pages File names are case sensitive The second file Web2Flash ini is a separate configuration file that must be edited so that each file type making up your web site is properly defined The contents of this file specify the content type field for each of the file types in your web site This field is part of the HTTP header that the embedded web server returns when a browser requests the corresponding file The Web2Flash ini file already includes most common file types and in particular the file types needed to build the Starter Kits sample web site if your web site contains a file type non included in the list you should add it specifying the correct content type string otherwise browsers may not correctly interpret the file returned by the embedded web server 3 8 4 Using Web2Flash exe The Web2Flash exe utility takes in every file specified in the web file appends the appropri
19. efaults 19 3 2 Lesson 1 Setup PC Connection 20 3 3 Lesson 2 Test Board Connection Using PING Command 26 ss O O1 amp D Contents 3 9 3 10 Lesson 3 Web Server Demo 27 Lesson 4 TCP and UDP Communication 30 Lesson 5 Control Panel Windows Utility 32 Lesson 6 Control Panel Java Applet 34 Lesson 7 Create your own Web Pages 37 3 8 1 Introduction 37 3 8 2 Limitations 37 3 8 3 Preparing the Files 38 3 8 4 Using Web2Flash exe 38 3 8 5 Uploading 39 Lesson 8 Connect the Board to Your LAN 40 Lesson 9 In circuit Debugging Programming 42 3 10 1 Introduction 42 3 10 2 Installing Metrowerks CodeWarrior IDE 42 3 10 3 Connecting the Serial Cable 42 3 10 4 Copying the Example 43 3 10 5 Launching the Example 43 3 10 6 Serial Monitor Limitations 45 3 10 7 Serial Monitor Documentation 45 3 10 8 BDM Based Debugging 46 Electrical Specifications 47 AK S12NE64 A User s Manual 0 Before Starting 0 1 Important Notice to Users While every effort has been made to ensure the accuracy of all information in this document SofTec Microsystems assumes no liability to any party for any loss or damage caused by errors or omissions or by statements of any kind in this document its updates supplements or special editions whether such errors are omissions or statements resulting from negligence accidents or any other cause 0 2 Required Skills In order to beneficially use the AK S12NE64 A Starter Kit yo
20. ex html Do tins G Welcome to the AK S12NE64 A Starter Kit The AK S12NE64 A Starter Kit is an integrated system developed by SofTec Microsystems designed to provide the user with a complete ready to use embedded Ethernet application The Starter Kit is built around the Freescale MC9S12NE64 microcontroller which has a built in dedicated Ethernet peripheral The Starter Kit demonstrates how effectively the MC9S12NE family of microcontrollers can be used in real world embedded Ethemet applications The Starter Kit is composed of o A general purpose evaluation board including LEDs a DC motor a temperature sensor a buzzer a serial connector a potentiometer DIP switches and push buttons A Core Module board including the MC9S12NE64 microcontroller external FLASH and EEPROM memory an Ethernet connector and a BDM connector An AC power adapter Ethernet and serial cables Software including free source code of the TCP IP stack The Starter Kit can be used in two ways 1 For demonstration purposes The Starter Kit works as a web server Connect the board to your local network and use a standard browser to access HTML pages A JAVA applet is provided which allows the board to be viewed controlled through a browser With the provided software utilities you can upload your own HTML pages images etc and access them through any PC in your LAN 2 For user application development A complete integrated
21. ing the board s real status S AK HCS1 2NE64 Control Panel Communication Settings Potentiometer Value 87h x Close Socket LEDs Speaker Temperature Motor CIRE NIET TUE 20m0 mmo A Sorc STOP ruere x DIP Switches E 1 FAULT 0 a Push Buttons il GE D Cc S Freq 1600 Hz Temp 25 C Speed 48 Curent 4 m oF PG3 PG2 PG1 PGO s Real Time Board Monitoring 5 The potentiometer push buttons DIP switches temperature motor current and motor LED are input only controls all other controls are input output controls When finished testing the board click the Close Socket button Page 33 Getting Started 3 7 Lesson 6 Control Panel Java Applet A similar utility to that explained in the previous lesson is available as a Java applet This applet resides in the Starter Kit s FLASH memory can be accessed through a browser and is platform independent This applet has been developed using Sun Microsystems Java 2 Platform version 1 4 2 You need to have the Java 2 Runtime Environment version 1 4 2 plug in installed in your PC in order for the browser to execute the Java code 1 The Java 2 Runtime Environment plug in setup for Windows is located on the SofTec Microsystems System Software CD ROM under the AK S12NE64 A Utilities SunJava directory 2 Launch the setup and follow the instructions Reboot your machine if requested 3 Verify that
22. kes in a list of files you specify and automatically generates an output binary file that subsequently can be stored in the serial FLASH memory 3 8 2 Limitations You can create your own web pages with the tools you prefer you can include images java applets and whatever you need to create your pages However due to the embedded nature of the web server resources are scarce and the web server cannot serve more than a small number of requests simultaneously By default each web page cannot contain more than 3 external objects such as images css files java applets etc This number is the total number of requests that the microcontroller can serve simultaneously This number is related to both the number of users connected to the embedded web server and to the number of requests each single browser sends to the server This number can be increased by changing the NO_OF_HTTP_SESSIONS define in the http_server h file If only one browser connects to the server a number of http sessions of 5 should be enough to handle most of the situations browsers usually do not send more than a finite small number of requests simultaneously Page 37 Getting Started 3 8 3 Preparing the Files All of the html files and the other files that make up a website must be located in the same directory on your PC You can copy the sample files used to build the Starter Kit s default web pages to your hard disk The files are locat
23. low the user application to detect the motor driver s overtemperature However the featured motor will not generate any significant temperature increase under any circumstances Page 16 AK S12NE64 A User s Manual 2 2 9 Motor Section This area contains a brushed permanent magnet 12 V DC motor 0 95 A locked rotor current together with a 5 0 A H bridge motor driver MC33887 A series of jumpers allows you to connect disconnect the lines required to interface the H bridge motor driver to from the microcontroller Two additional jumpers OUT1 and OUT2 are available to connect disconnect the motor to from the H bridge motor driver This enables you to drive your own DC motor A red FAULT LED indicates the H bridge motor driver s fault state A 0 5 A auto restore fuse is present on the 12 V line used to power the H bridge motor driver 2 2 10 Inputs Section This area contains various input controls a potentiometer together with a jumper to connect disconnect it to from the microcontroller s PADO pin four push buttons connected to the microcontroller s PG3 PG2 PG1 and PGO pins and eight general purpose DIP switches connected to the microcontrollers Port H and Port G pins 2 2 11 Reset Push Button The Reset push button is directly connected to the microcontrollers RESET pin 2 2 12 Prototype Area The prototype section features both a standard thru hole area for mounting traditional components and a
24. mance to be adjusted to suit operational requirements Furthermore an on chip bandgap based voltage regulator VREG generates the internal digital supply voltage of 2 5 V VDD from a 3 15 V to 3 45 V external supply range The MC9S12NE64 microcontroller has full 16 bit data paths throughout The 112 pin package version has a total of 70 I O port pins and 10 input only pins available The 80 pin package version has a total of 38 I O port pins and 10 input only pins available 1 3 OpenTCP Software The AK S12NE64 A Starter Kit includes full source codes of the OpenTCP Open Source project developed by Viola Systems together with full documentation for an easy porting to your custom application The OpenTCP Open Source project brings a high quality TCP IP stack to embedded systems Entirely written in C it allows easy porting to any existing microcontroller platform for which a C compiler is available The OpenTCP Open Source supports the following protocols and services Page 8 AK S12NE64 A User s Manual ARP BOOTP DHCP Client DNS Client HTTP Web Server POP3 Client SMTP Client TCP IP TFTP Client UDP ICMP 1 4 TCP IP Protocol Documentation Detailed information about the TCP IP protocol and related protocols HTTP UDP SMTP POP3 etc is beyond the scope of this user manual Full information is easily available from other sources All of the protocols in the TCP IP suite are defined
25. ndows utility AK S12NE64 A Control Panel Java Applet Create your own WEB pages Connect the board to your LAN In circuit debugging programming MNO PWN 3 1 1 Resetting Parameters to Factory Defaults At any moment all of the Starter Kit s board parameters can be restored to the factory default settings To do so Press and keep pressed the RESET push button Press and keep pressed the PG3 and PG2 push buttons Release the RESET push button Release the other push buttons BOON a Page 19 Getting Started 3 2 Lesson 1 Setup PC Connection All the lessons in this tutorial require that the AK S12NE64 A Starter Kit communicates with the host PC through a LAN connection In this lesson you ll learn how to configure the PC to communicate with the starter kit using an Ethernet cross cable The following steps are based on a Windows XP system 1 Open the Windows Control Panel and open the Network Connections item Control Panel max Fie Edt View Favorites Tools Help ie Q 4 Po search Folders Faz G Control Panel ypo 5 Gg A E cont ot D amp ee 9 e DateandTime Display Folder Options Fonts Game Internet Controllers Options address Accessibility Add Hardware Add or CF Switch to Category view Options 4 s k iw E See Also z io x 2 gt 5 JavaPlugin Keyboard Mouse Network one and Power Options Printers and Quick
26. nection Wizard Internet Connection How do you want to connect to the Internet O Connect using a dial up modem This type of connection uses a modem and a regular or ISDN phone line Connect using a broadband connection that requires a user name and password This is a high speed connection using either a DSL or cable modem Your ISP may refer to this type of connection as PPPoE Connect using a broadband connection that is always on This is a high speed connection using either a cable modem DSL or LAN connection It is always active and doesn t require you to sign in New Connection Wizard Step 4 7 When the last dialog box appears click the Finish button New Connection Wizard Completing the New Connection Wizard Your broadband connection should already be configured and ready to use If your connection is not working properly click the following link Leam more about To close this wizard click Finish New Connection Wizard Step 5 Page 23 Getting Started 8 Open the newly created connection or the existing connection if you are coming from step 2 and click the Properties button lt 5 Local Area Connection Status wey General Support Connection Status Connected D 00 00 11 s 100 0 Mbps Sent Al Received Le P 323 Local Area Connection Status 9 Select the Internet Protocol
27. pages A JAVA applet is provided which allows the board to be viewed controlled through a browser With the provided software utilities you can upload your own HTML pages images etc and access them through any PC in your LAN 2 For user application development A complete integrated development environment is provided which allows you to write your own software download it to the MC9S12NE64 microcontroller and debug it Downloading and debugging your application is possible Page 7 Overview through a serial monitor pre programmed into the microcontroller The Starter Kit includes full source codes of the TCP IP protocol together with full documentation for an easy porting to your custom application 1 2 MC9S12NE64 Overview The MC9S12NE64 is a 112 80 pin low cost low end connectivity applications MCU The MC9S12NE64 features standard on chip peripherals including a 16 bit central processing unit CPU12 64 Kbytes of FLASH EEPROM 8 KB of RAM Ethernet Media Access Controller EMAC with integrated 10 100 Mbit s Physical transceiver EPHY two asynchronous serial communications interface modules SCI a serial peripheral interface SPI one Inter IC Bus IIC a 4 channel 16 bit timer module TIM a 8 channel 10 bit analog to digital converter ADC up to 21 pins available as Keypad Wake Up inputs KWU and 2 additional external asynchronous interrupts The inclusion of a PLL circuit allows power consumption and perfor
28. request a 30 day limited free license key to run the compiler without limitations 3 10 2 Installing Metrowerks CodeWarrior IDE To install the CodeWarrior IDE insert the CodeWarrior CD ROM into your computer s CD ROM drive A startup window will automatically appear Follow the on screen instructions 3 10 3 Connecting the Serial Cable Connect the provided serial cable to a PC serial port and to the Starter Kit s RS 232 connector Make sure that both the TXDO and the RXDO jumpers are inserted Page 42 AK S12NE64 A User s Manual 3 10 4 Copying the Example The demo example is located in the SofTec Microsystems System Software CD ROM under the AK S12NE64 A Sources Demo directory Copy this directory to your hard drive 3 10 5 Launching the Example 1 Start the CodeWarrior HC S 12 IDE by selecting Start gt Programs gt Metrowerks CodeWarrior gt CW12 gt CodeWarrior IDE The CodeWarrior HC S 12 IDE will open 2 From the main menu choose File gt Open Select the demo mcp workspace located in the NE64_OpenTCP directory inside the demo directory you have copied from the CD Click Open The following window will appear E Metrowerks CodeWarrior o X Fie Edt View Search Project Debug ProcessorExpert Window Help Bee Boe xR RRanue SRE EF Demo mcp Monitor By S R gt A Files Link Order Targets File Code Data e
29. s provided to all customers For technical assistance documentation and information about products and services please refer to your local SofTec Microsystems partner SofTec Microsystems offers its customers a technical support service at support softecmicro com Before getting in contact with us we advise you to check that you are working with the latest version of the AK S12NE64 A system software upgrades are available free of charge at http www softecmicro com Page 11 AK S12NE64 A User s Manual 2 AK S12NE64 A Components 2 1 Package Checklist The AK S12NE64 A package includes the following items A general purpose evaluation board base AK S12NE64 A An Ethernet core module CM HCS12NE64 An AC adapter n An Ethernet cross cable 7 A serial cable The SofTec Microsystems AK S12NE64 A System Software CD ROM The Metrowerks CodeWarrior for HC S 12 CD ROM This users manual 2 2 The Evaluation Board The following figure illustrates the main functions of the AK S12NE64 A evaluation board Page 13 AK S12NE64 A Components PROTOTYPE AREA CM HCSI2NE64 POWER SUPPLY 12V 8 g 3 E 8 3 BDM TEMPERATURE 8 NTC 2 ENABLE AK S12NE64 A DIP SWITCHES AK S12NE64 A Evaluation Board CM HCS12NE64 Core Module and signal pins section RS 232 section Power supply section ATD reference section LAN section Outputs section
30. ssed the PGO push button Release the RESET push button Release the PGO push button AR OMY gt 3 10 7 Serial Monitor Documentation Detailed documentation about the serial monitor can be found in the AN2548 D Application Note available in the Soffec Microsystems System Software CD ROM Page 45 Getting Started 3 10 8 BDM Based Debugging A better debugging approach would be to use a BDM based debugging tool such as SofTec Microsystems inDART HCS12 This tool connects to the Core Module s BDM connector and allows for in circuit programming and debugging without the limitations of the serial monitor Page 46 AK S12NE64 A User s Manual 4 Electrical Specifications Parameter Minimum Typical Maximum Global Ratings Power Input Voltage 12 V AC DC Power Consumption 250 mA motor on 1 A motor stalled Operating Temperature 0 C 50 C Storage Temperature 20 C 70 C Humidity 90 Motor DC Permanent Magnet Brushed Motor Nominal Power Supply 12V Power 1 5W No Load Speed 8700 rpm No Load Current 0 07A Locked Rotor Torque 9 mNm Locked Rotor Current 0 95 A Speaker Piezo Ceramic Operating Voltage 1 Vpp 30 Vpp Rated Current lt 1mA Sound Output at 4 KHz 10 cm gt 90 dB Resonant Frequency 4000 500 Hz Temperature Sensor NTC Resistor Resistor 25 C Ros 10 KQ Maximum Po
31. tart Continue The program will be executed in real time All of the features explained in the previous lessons are running 7 You can now continue to experiment with the CodeWarrior user interface and discover by yourself its potentialities For an in depth guide of all of the user interface features select Help gt CodeWarrior Help from the CodeWarrior HC S 12 IDE s main menu Page 44 AK S12NE64 A User s Manual 3 10 6 Serial Monitor Limitations Due to the nature of the serial monitor a piece of software running into the target microcontroller some limitations to in circuit debugging apply 2KB of Flash memory are reserved by the serial monitor from address F800h to address FFFFh This memory area cannot be erased reprogrammed The PLL peripheral is reserved by the serial monitor and should not be used by the user application The serial monitor automatically sets the PLL to the maximum available frequency 50 MHz The COP module is reserved as well and must not be used by the user application The SCIO peripheral is reserved and must not be used Interrupts must be always enabled SWI SCIO and CRG interrupt vectors should not be used Note pressing the RESET push button on the Starter Kit s board will cause the user program to be restarted To reset the microcontroller to monitor mode the user program is not restarted Press and keep pressed the RESET push button Press and keep pre
32. the Java 2 Runtime Environment plug in is enabled on your browser settings If you are using Internet Explorer go to the Advanced tab in the Internet Options dialog box and verify that the Java Sun plug in is enabled Internet Options Je General Security Privacy Content Connections Programs Advanced Settings C Use Passive FTP for firewall and DSL modem compatibility Use smooth scrolling M Us HTTP 1 1 settings ml se HTTP 1 1 through proxy c Restore Defaults Enabling the Java 2 Runtime Environment Plug In Page 34 AK S12NE64 A User s Manual 5 Make sure that the Java Plug in cache is disabled Go to the Windows Control Panel open the Java Plug in item and in the Cache tab disable the cache amp Java TM Plug in Control Panel fi B se Browser Proxies Cache Certificates Update About Enable Caching Local Size Jar Ci ssion Q None High _apny Reset Hem Disabling the Java Plug In Cache Launch your web browser and connect to 192 168 1 100 demo html Page 35 Getting Started 6 The following HTML page containing the Java applet will appear AK S12NE64 A Demo Microsoft Internet Explorer File Edit View Favorites Tools Help a Qa x A QD seach She revortes Aui O R LJ Address http 192 168 1 100 demo html MES ms y Ta AK S12NE64 A Demo
33. to the respective microcontroller pins Page 15 AK S12NE64 A Components The ACTIVITY LED blinks when packets are sent to received from the Ethernet The LINK LED indicates that an Ethernet link is available the board is attached to another device e g the PC or a hub The SPEED LED indicates the Ethernet link speed if turned on indicates a 100 Mbit s speed if turned off indicates a 10 Mbit s speed The DUPLEX LED indicates the Ethernet Duplex mode if turned on indicates Full Duplex if turned off indicates Half Duplex The COLLISION LED indicates a packet collision 2 2 6 Outputs Section This area contains eight high efficiency low current LEDs connected to Port A together with eight jumpers to connect disconnect each of the eight LEDs to from their respective microcontroller s Port A pins 2 2 7 Speaker Section This area contains a piezoelectric speaker with the appropriate driving circuit A jumper is present which connects disconnects the speaker circuitry to from the microcontrollers PT6 TIM_IOCE6 pin 2 2 8 Temperature Section This area contains an NTC temperature sensor and associated amplifier calibrated to detect a temperature in the range 0 45 C A jumper is present which connects disconnects the temperature sensor circuitry to from the microcontrollers PAD2 AN2 pin The NTC temperature sensor is located near the H bridge motor driver MC33887 to al
34. tored in the Core Module s serial EEPROM memory For the new configuration to be effective you must reset the board 6 You must now restore your PC network configuration to its original state previously changed in Lesson 1 Page 40 AK S12NE64 A User s Manual Please note that the Ethernet cross cable provided can only be used to connect the Starter Kit to a PC if you want to connect the Starter Kit to a hub you must use an Ethernet patch cable Verify that the board is properly configured by issuing a PING command as explained in Lesson 2 but this time using the board s new IP address Page 41 Getting Started 3 10 Lesson 9 In circuit Debugging Programming 3 10 1 Introduction The Core Module s microcontroller comes pre programmed with a serial monitor that allows you to download your application into the microcontroller and debug it The serial monitor communicates with the PC through a serial cable connected to the Starter Kits RS 232 connector In this lesson you ll learn how to use the serial monitor together with Metrowerks CodeWarrior for HC S 12 to write and debug your own applications Note in order to compile the provided example which includes the OpenTCP software you need a CodeWarrior license unlimited in size To obtain such a license 1 Contact Metrowerks to request a unlimited period free license key to increase the code size limit to 12 KB or 2 Contact Metrowerks to
35. u should be acquainted with certain skills ranging from hardware design to software design In particular you should possess knowledge of the following TCP IP knowledge Programming knowledge Assembly and C Microcontroller systems HCS12 architecture knowledge Page 5 AK S12NE64 A User s Manual 1 Overview 1 1 What is the AK S12NE64 A Starter Kit The AK S12NE64 A Starter Kit is an integrated system designed to provide the user with a complete ready to use embedded Ethernet application The Starter Kit is built around the Freescale MC9S12NE64 microcontroller which has a built in dedicated Ethernet peripheral The Starter Kit demonstrates how effectively the MC9S12NE family of microcontrollers can be used in real world embedded Ethernet applications The Starter Kit is composed of A general purpose evaluation board including LEDs a DC motor a temperature sensor a buzzer a serial connector a potentiometer DIP switches and push buttons A Core Module board including the MC9S12NE64 microcontroller external FLASH and EEPROM memory an Ethernet connector and a BDM connector An AC power adapter Ethernet and serial cables Software including free source code of the TCP IP stack The Starter Kit can be used in two ways 1 For demonstration purposes The Starter Kit works as a web server Connect the board to your local network and use a standard browser to access HTML
36. ver Altemate DNS server TCP IP Properties Click the OK button on all LAN setup dialog boxes Page 25 Getting Started 3 3 Lesson 2 Test Board Connection Using PING Command In this lesson you will test the connection you created in the previous lesson 1 Power up the board with the provided AC adapter and verify the POWER led turn on 2 Connect the starter kit to the PC through the provided Ethernet cross cable 3 Open a Command Prompt window on Windows XP from the Windows Start menu select Run enter CMD and click the OK button 4 Atthe command prompt type PING 192 168 1 100 If the connection has been properly setup the PING command will return a positive feedback C WINDOWS System32 CMD exe o x oft Windows XP Version 5 1 2600 yright 1985 2001 Microsoft Corp TTL 100 TTL 108 TIL 108 TTL 100 Pinging the Board Page 26 AK S12NE64 A User s Manual 3 4 Lesson 3 Web Server Demo In this lesson you will connect to the Starter Kit s built in web server which has some demonstration web pages pre programmed in the core module s serial FLASH memory 1 Launch your favorite web browser 2 You must disable the proxy server if one is enabled To disable this feature in Internet Explorer open the Internet Options dialog box go to the Connections tab and click the LAN Settings button Internet Options eg General Se
37. wer 210 mW Epcos No of R T characteristic 1011 Ethernet Speed 10 100 Mbit s Connector Type 10 100 Base T integrated RJ45 without LED RS 232 Speed 250 Kbit s Connector Type D Sub 9 pin female BDM Speed Up to microcontrollers maximum speed Operating Voltage 3 3V Connector Type Header connector 6 pin male Electrical Specifications Page 47
38. your LAN the Starter Kit s IP address must be changed to match the LAN settings To change the Starter Kit s IP address do the following 1 With the Starter Kit board still connected to the PC via the Ethernet cross cable launch the NetConfig exe utility that is located in the SofTec Microsystems System Software CD ROM under the AK 12NE64 A Utilities NetConfig directory AK HCS1 2NE Board Network Configuration v 1 00 Current IP Address Current IP Address 192 168 1 100 New Network Configuration Hardware Address MAC m 23 45 56 78 9B IP Address 182 168 1 100 Subnet Mask 255 255 255 0 Default Gateway 192 168 1 1 The NetConfig Utility 2 Verify that the Current IP Address parameter corresponds to the currently used Starter Kit s IP address default is 192 168 1 100 3 The Hardware Address MAC parameter is a unique hardware address that identifies the board across the network No two devices can have the same MAC address However all of the SofTec Microsystems AK S12NE64 A Starter Kits have the same MAC address If you want to connect two or more Starter Kits on the same network each must have a different MAC address 4 Specify the new board s IP address subnet mask and default gateway address To obtain these data please contact your network administrator 5 Click the Configure button The new configuration will be s

Download Pdf Manuals

image

Related Search

Related Contents

Westinghouse 7201800 Use and Care Manual  REX 2000 Digital Burette  achtung  Avira Benutzerhandbuch  Épreuve E2 - BAC PRO SEN Alarme Sécurité Incendie  目隠しシートチラシ _最終校  Panasonic PT-CW230U  

Copyright © All rights reserved.
Failed to retrieve file