Attachment # 00005940 - ECET330_W4_iLab_Instructions.docx
ECET330_W4_iLab_Instructions.docx (1532.09 KB)
Raw Preview of Attachment:
(refer to the detailed question and attachment below)
ECET330 Lab4 ProceduresTitle: Introduction to Tower ModuleI. OBJECTIVESTo set up the Tower SystemBecome familiar with programming and using the Tower ModuleBecome familiar with I/O port programming.II. PARTS LISTEquipment:IBM PC or compatible with Windows 2000 or higherCodeWarrior v. 5.1Freescale TWR-S12G128 Tower KitINTRODUCTIONThe Freescale Tower Module is used in this lab. The microcontroller on this module is a 100-pin MC9S12G128. It has 128K bytes of Flash, 4K bytes of EEPROM, and 8K bytes of RAM. The bus frequency is 6.25MHz by default. Figure 1: Tower ModuleThe Tower Setup Tutorial describesa step-by-step process of connecting and using this tower system. The FreeScale TWR-S12G128 Tower Kit includes the following items. TWR-S12G128 Processor ModuleTwo Elevator Boards (one primary and one secondary)A USB cableA DB9 to IDC 2X5 Socket HeaderA CodeWarrior Development Studio for HC(S)12 Special EditionTower LEDsThe Tower Module has four green LEDs connected to Port T.The following figure shows the existence of jumpers JP1 between LEDs/pushbuttons and the pins of ports. Make sure that the jumpers are as shown. These four LEDs are connected to PT4-PT7 bits of Port T. You must define the direction of Port T as output port. The following instructions define PTT as an output port.LDAA #$FFSTAA DDRT ; Define Port T as an output Each LED is configured for active low operation. In other words, to turn the LED on, a 0 is sent to it. ABSENTRY Entry ; Application entry point INCLUDE 'derivative.inc'ORG $2000 ; Data is defined HERE ORG $C000Entry:_Startup: LDAA #$FF STAA DDRT ; Define Port T as an output LDAA #$50 STAA PTT ; Turns LED4 and LED2 ON Back BRABack ; End of main ORG $FFFE DC.W Entry ; Reset VectorPROCEDURESet up the Tower Module and connect it to the PC. Read the Tower Tutorial in Doc Sharing.Write a program to turn LED4 and LED1 ON. LED2 and LED3 must be OFF.Cut and paste the source code.Single step the code. After executing the line that sends the pattern to PTT, cut and paste the Memory Window showing the value of PTT. The Memory Address of PTT is $270. Right-click on Memory Window and select address. Type 270 in the address field.Write a program to continuously turn all four green LEDs ON and OFF (toggle). There should be a one-second delay between each toggle.Cut and paste the source code.Show the delay calculation.Run the program on the board by pressing the Reset button on the Tower. Describe the values of LEDs. Write a program that displays values from 0 to 15 sequentially, with a 0.75-second delay in between each display. After the count value reaches 15 (i.e. all LEDs are ON), the program should stop.Cut and paste the code.Show the delay calculation.Run the program on the board by pressing the Reset button on the Tower. Describe the values of LEDs. Use BSET and BCLR instructions to TurnLED2 ON and OFF continuously with a 0.5-second delay between each change.Cut and paste the source code.Show the delay calculation.Run the program on the board by pressing the Reset button on the Tower. Describe the values of LEDs. Change the delay to 1ms and run the program. Describe the values of LEDs.

ECET 330 Homework / Lab

Question # 00072956 Posted By: saabsaab Updated on: 05/26/2015 04:53 PM Due on: 05/31/2015
Subject Computer Science Topic Microprocessor Systems Tutorials:
Question
Dot Image
Complete the attached documents. For lab use instructions for procedure and coversheet for answers.
Dot Image
Tutorials for this Question
  1. Tutorial # 00067612 Posted By: neil2103 Posted on: 05/26/2015 07:16 PM
    Puchased By: 3
    Tutorial Preview
    The solution of ECET 330 Homework / Lab...
    Attachments
    ECET330_W4_iLab.docx (40.91 KB)
    ECET_330_Homework_4_(1).docx (37.23 KB)
Whatsapp Lisa