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 ''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.


Offered Price $90.00

ECET 330 Homework / Lab

Question # 00072956
Subject: Computer Science
Due on: 05/31/2015
Posted On: 05/26/2015 04:53 PM

Expert tutors with experiences and qualities
Posted By
Best Tutors for school students, college students
Feedback Score:

Purchase it
Report this Question as Inappropriate
Complete the attached documents. For lab use instructions for procedure and coversheet for answers.

Tags homework ecet coversheet answers procedure instructions attached documents complete

Tutorials for this Question

Available for

ECET 330 Homework / Lab

Tutorial # 00067612
Posted On: 05/26/2015 07:16 PM
Posted By:
Best Tutors for school students, college students neil2103
Expert tutors with experiences and qualities
Feedback Score:
Report this Tutorial as Inappropriate
Tutorial Preview …LabECET…
ECET330_W4_iLab.docx (40.91 KB)
Preview: (20) xxx (0 xx us) = x 049 secIV x C xxxxxxxx xxx LED xxxxxx The LEDs xx the Tower xxxxxx off xxxxxxx xxxxxxx on xxx off (toggle) xx will stay xx one xxxxx xxx about xxx second, then xxxx on to xxx next xxxxx xxx a xxxxxxx and so xx IV 4 x Copy xxx xxxxx the xxxxxx code ABSENTRY xxxxx ; Application xxxxx point xxxxxxx xxxxxxxxxxx inc' xxx $2000 ; xxxx is defined xxxx ORG xxxxxxxxxxxxxxxxxxxx xxxx #$FF xxxx DDRThere BSET xxxx %11110000 ;all xxxx are xxx xxx delay xxxx PTT, %00010000 xxx delay BSET xxxx %11110000 xxxxxx xxx LEDs xxxx are on xxx next instruction xxxx PTT, xxxxxxxxx xxx delay xxxx PTT, %11110000 xxxx PTT, %00110000 xxx delay xxxx xxxx %11110000 xxxx PTT, %01000000 xxx delay BSET xxxx %11110000 xxxx xxxx %01010000 xxx delay BSET xxxx %11110000 BCLR xxxx %01100000 xxx xxxxx BSET.....
ECET_330_Homework_4_(1).docx (37.23 KB)
Preview: PTJ                                xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %00001000                                xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HERE                                LDAA                     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx STAA                     PORTB Question x Eight xxxxxxxx xxx connected xx PORTB and xxxxx LEDs are xxxxxxxxx to xxxxx xx would xxxx to monitor xxx first two xxxxx significant xxxx xx PORTB xxxx masking technique) xx Whenever both xx these xxxx xxx set, xxxxxx all LEDs xx Port A.....
Purchase this Tutorial @ $103.00 *
* - Additional Paypal / Transaction Handling Fee (3.9% of Tutorial price + $0.30) applicable