Hands-On Technical Training (hott) Workshop: Introduction to Microcontroller Programming in C


Freescale IDE Software Installation



Download 110.29 Kb.
Page3/5
Date29.01.2017
Size110.29 Kb.
#11287
1   2   3   4   5

Freescale IDE Software Installation


The necessary software, “Special Edition: CodeWarrior for Microcontrollers”, is already installed on the computers in this lab, so we won’t be installing it today. However, if you want to download and install the free IDE/Assembler/C compiler on your own PC, you should go to www.freescale.com and search for keywords “codewarrior for microcontrollers special edition download”, then look for the Download link. The installation process is quite easy, though it may take the better part of an hour.
Note: If you purchased a demonstration board, that package may include a CD or DVD with an earlier version of the IDE that does not include the C compiler. This should not be installed.
If you purchase a development board like the one used in this lab, you will also need to install the USB drivers to enable the PC to communicate with the board.


Hardware Familiarization and Connection to PC


Demo board hardware is described in the demonstration board user’s manual on various pages. Click the link and/or go to the manual, read the pages listed below, and answer these questions:


  1. Referring to the user’s manual section 1.3, what devices are supported by the DEMO9RS08KA2 development board? ____________________________________________________

  2. From PDF pages 9 & 10 (manual pages 7-8), briefly review the location of the various items on the demo board, comparing your actual board to the drawing and description. Note that the programming target microcontroller is a socketed DIP that may be removed after it is programmed. This is convenient for stand-alone applications. Also, realize that the majority of the board exists simply to support communication with the PC and demo I/O (LEDs, pushbuttons, and NTC resistor). As a side note, Zilog handles this in a different way that some designers prefer.

  3. Section 8 in the manual outlines the various jumper and connector settings. Review it briefly at this time and locate the connectors on your demo board. If you are not familiar with this type of jumper, ask your lab instructor to demonstrate how it works.

  4. Read through section 4.1, entitled “First Connection”, and go through the steps to verify the demo board jumper settings and connect the board to the PC USB port.

Emphasizing again, the microcontroller is one small chip on the development board. The rest of the board is fairly complex and exists to support USB communication with the host PC. Without getting too concerned with the abbreviations right now, consider this example of a simple, stand-alone microcontroller application:






Understanding the RS08 I/O


Look at Figure 2-2 in the RS08 data sheet. Most of the pins are multi-purpose, described by terms such as “PTA3/ACMPO/BKGD/MS”. Refer to Table 2-1 and fill in the blanks below with the functions associated with each of these terms:
PTA3 (Port A, bit 3): ___________________________________

ACMPO: __________________________________

BKGD: ___________________________________

MS: ______________________________________


The data sheet table describes each of the RS08 pins and not just the PTA3 pin. Refer to this as necessary throughout the lab if you are having problems understanding the pin names and functions.
While you’re on that page, right above Table 2-1 is a paragraph that says:
NOTE To avoid extra current drain from floating input pins, the reset initialization routine in the application program should either enable on-chip pullup/pulldown devices or change the direction of unused pins to outputs.
Two important points should be made here. First, typical of CMOS integrated circuits with their high input impedance MOSFETs, the RS08 will possibly oscillate and/or draw excess current if an input is left floating. Normally this is solved by tying any unused inputs high or low. However, and this is the second point, the RS08 contains internal pullup and pulldown resistors (approx. 50-60 kilohms each) that may either be connected or disconnected, depending upon the configuration (initialization) settings, which will be examined in more detail shortly. Any pins configured as inputs should have their internal pullup or pulldown resistors connected unless the external circuitry makes provision for pullup/pulldown. Remember that when you make configuration settings in the software.
Section 2.4 in the data sheet provides a detailed explanation of each of the pins on the chip. Glance through it now.
Statements such as the following may be ignored unless you plan to handle device initialization yourself through program code: “To use as an output-only port, BKGDPE in SOPT must be cleared.” This refers to initializing the device, or telling it which pins are inputs, outputs, etc., which is not normally a concern since device initialization is handled through a very nice GUI (Graphical User Interface) in the IDE. That tool enables RS08 programmers to easily generate device initialization code, which runs once when the microcontroller begins program execution.
Refer to the schematic for the demo board, which is in a separate document, and draw lines in the following table connecting each microcontroller pin listed in the left column to its corresponding development board component on the right. The first one has been done for you.
PTA0/KBIP0/ACMP+ SW0

PTA1/KBIP1/ACMP RESET

PTA2/KBIP2/TCLK/RESET/VPP NTC



PTA3/BKGD/MS/ACMPO LED1

PTA4/KBIP4 LED2

PTA5/KBIP5 LED0
The bold items in the list above are the settings required for connection to the devices listed on the right. These settings would be made using the Device Initialization tool.


Directory: people
people -> Math 4630/5630 Homework 4 Solutions Problem Solving ip
people -> Handling Indivisibilities
people -> San José State University Social Science/Psychology Psych 175, Management Psychology, Section 1, Spring 2014
people -> YiChang Shih
people -> Marios S. Pattichis image and video Processing and Communication Lab (ivpcl)
people -> Peoples Voice Café History
people -> Sa michelson, 2011: Impact of Sea-Spray on the Atmospheric Surface Layer. Bound. Layer Meteor., 140 ( 3 ), 361-381, doi: 10. 1007/s10546-011-9617-1, issn: Jun-14, ids: 807TW, sep 2011 Bao, jw, cw fairall, sa michelson
people -> Curriculum vitae sara a. Michelson
people -> Curriculum document state board of education howard n. Lee, C
people -> A hurricane track density function and empirical orthogonal function approach to predicting seasonal hurricane activity in the Atlantic Basin Elinor Keith April 17, 2007 Abstract

Download 110.29 Kb.

Share with your friends:
1   2   3   4   5




The database is protected by copyright ©ininet.org 2024
send message

    Main page