Lab10-Prelab

docx

School

Iowa State University *

*We aren’t endorsed by this school

Course

288

Subject

Mechanical Engineering

Date

Apr 3, 2024

Type

docx

Pages

3

Uploaded by MinisterGorillaMaster358

Report
Embedded Systems International Lab 10 Prelab Name : Lab Partner Name (if you worked together and are submitting the same document or mostly the same answers): Lab Section : 3C Submit your prelab document as a PDF file in Canvas under the corresponding prelab assignment. Every student submits their own prelab. Lab partners are allowed to work on the prelab together and submit the same document (if there is actual collaboration on the document). For full credit, the prelab must be submitted prior to the start of lab. Text responses should be typed or printed neatly. 1. System sketch Similar to system sketches in previous labs, sketch a diagram that shows how the servo motor connects to the microcontroller. Refer to the file Cybot- Baseboard-LCD-Schematic.pdf, as needed. In the photo of the CyBot baseboard, shown at right, the jumper wires are connected to the sensors and servo motor. Your diagram should show the port and the pin (or bit) number of the port that the servo is connected to. Give the port name and pin number used in the microcontroller (e.g, Port A pin 0, PA0). CPRE 288, ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT , IOWA STATE UNIVERSITY 1
GPTM TIMER 1B CCP GPIO PBS Servo Motor 2. How do you know that the pin the servo is connected to (question 1) corresponds to Timer 1B in the microcontroller? Be specific in your explanation. GPIO PB5 pin 57 PB5 57 AIN11 - SSI2FSS - M0PWM3 - - T1CCP1 CAN0TX 3. Write two or three lines of code to configure the GPIOAFSEL and GPIOPCTL registers to select the Timer 1B (T1CCP1) peripheral signal as an alternate function for the GPIO pin it is connected to. GPIO_PORTB_AFSEL_R | = 0x20; GPIO_PORTB_PCTL_R = 0b000111; 4. Refer to the GPTM Timer register list, such as in GPIO-GPTM-registers-tables.pdf. a. Which GPTM register enables PWM mode? GPTM Timer B Mode (GPTMTBMR); b. What is the memory address of this memory-mapped I/O register? 0x4003.1008 c. Sketch the register as shown in the datasheet description. Circle the bit or bit fields that must be set up for this lab. 2
5. Suppose you are outputting a PWM signal having a period of 20 milliseconds. Using a 16 MHz system clock, how many clock periods (or timer steps) are needed for the period? State your result in both decimal and hex. 320,000 for the decimal value and 0x4E200 for the hex 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help