DOC PREVIEW
U of U CS 5780 - MCU Ports

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECE/CS 5780/6780: Embedded System DesignScott R. LittleLecture 7: MCU PortsScott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 1 / 23AdministriviaYour FSM and schematic in Lab 3 should match yourimplementation.You will need a parts card for Lab 4 to purchase the keypad.Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 2 / 23Communicating with the MCUApplication Module Student Learning Kit Users Guide pg. 11Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 3 / 23What is Port T?MC9S12C Family Reference Manual pg. 20Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 4 / 23Where is Port T?MC9S12C Family Reference Manual pg. 42Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 5 / 23Configuring Port T (PTT)MC9S12C Family Reference Manual pg. 81Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 6 / 23Port T ModesMC9S12C Family Reference Manual pg. 81Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 7 / 23TIMEN[x]MC9S12C Family Reference Manual pg. 81TIMEN[x] = 0 when:TSCR1[7] = 0 ∨ (TIOS[x ] = 0 ∧ TTOV [x] = 0)∨(TCTL1 = 0x00 ∧ TCTL2 = 0x 00)Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 8 / 23TSCR1[7]MC9S12C Family Reference Manual pg. 445-6Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 9 / 23TSCR1[7]MC9S12C Family Reference Manual pg. 445-6Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 10 / 23TIOS[x]MC9S12C Family Reference Manual pg. 442-3Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 11 / 23TTOV[x]MC9S12C Family Reference Manual pg. 446Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 12 / 23TCTL1/TCTL2MC9S12C Family Reference Manual pg. 446-7Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 13 / 23TCTL1/TCTL2MC9S12C Family Reference Manual pg. 446-7Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 14 / 23Port T Direction: DDRTMC9S12C Family Reference Manual pg. 446-7Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 15 / 23Port T Polarity: PPSTMC9S12C Family Reference Manual pg. 446-7Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 16 / 23Port T Device Enable: PERTMC9S12C Family Reference Manual pg. 446-7Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 17 / 23Accessing Port T: HardwareConnect external hardware to the correct MCU port:PT0 → MCU Port pin 13PT1 → MCU Port pin 15PT2 → MCU Port pin 30PT3 → MCU Port pin 32PT4 → MCU Port pin 34PT5 → MCU Port pin 36PT6 → MCU Port pin 38PT7 → MCU Port pin 40Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 18 / 23Accessing Port T: Softwaremc9s12c32.h contains macro definitions for PTT, DDRT,PPST, PERT, etc.Get input from the bottom 4 bits of Port T:unsigned char inputVal = 0x0F & PTT;Really... unsigned char inputVal = 0x0F & 0x0240;Set the top 4 bits of Port T to 1:PTT |= 0xF0;Really... 0x0240 |= 0xF0;Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 19 / 23Using the Project BoardMCU Project Board Student Learning Kit User Guide pg. 24Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 20 / 23Connected FeaturesHow did we “talk” to LED1-4 and PB1-2 in Lab 1 without usingjumper wires?“To simplify circuit construction and emphasize softwaredevelopment, several user features have been connected to theMCU PORT through FET switches and jumpers. The FETswitches are controlled by enable signals that are also routed tothe MCUPORT header. This setup allows the user toelectronically connect and disconnect each connected featuregroup. A 6-position jumper (UFEA or JP10) allows the user todisconnect the enable signal if applying the associated port toother uses.”Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 21 / 23Connected Features: LEDsFeature Connection MCU PortLED1 MCU PORT 33 PAD4LED2 MCU PORT 35 PAD5LED3 MCU PORT 37 PAD6LED4 MCU PORT 39 PAD7LED EN MCU PORT 34 PT4JUMPER UFEA-3 n/aScott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 22 / 23Design ProblemWhen PB4-7 are pushed the numeric value of the push buttonshould be output to LED1-3.For example:Push PB4 → 100 on LED1-3.Push PB5 → 101 on LED1-3.All UFEA jumpers must be removed.Only Port T may be used.Scott R. Little (Lecture 7: Ports) ECE/CS 5780/6780 23 /


View Full Document

U of U CS 5780 - MCU Ports

Documents in this Course
Lab 1

Lab 1

5 pages

FIFOs

FIFOs

10 pages

FIFOs

FIFOs

5 pages

FIFO’s

FIFO’s

12 pages

MCU Ports

MCU Ports

12 pages

Serial IO

Serial IO

26 pages

Load more
Download MCU Ports
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view MCU Ports and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view MCU Ports 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?