Top Banner
EE 446 Project Assignment • Top Design • Sensor Components • Pin Assignment and Configuration • Completed Physical Setup • Project Tasks
79

EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Dec 28, 2015

Download

Documents

Blanche Simmons
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

EE 446 Project Assignment

• Top Design• Sensor Components• Pin Assignment and Configuration• Completed Physical Setup• Project Tasks

Page 2: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Project Top Design

Page 3: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Motion Detector (HC-SR501)

• Select Digital Input Pin component

• Drag and drop to design

Page 4: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Motion Detector (HC-SR501)

Configure Digital Input Pin

Page 5: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Motion Detector (HC-SR501)

Configure Digital Input Pin

Page 6: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

PWM – Servo Motor

• Add PWM component to design.

Page 7: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

PWM – Servo Motor

Configure PWM

Page 8: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

PWM – Servo Motor

Configure PWM

Page 9: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

PWM – Clock

• Add clock to design.

Page 10: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

PWM - Clock

Configure Clock

Page 11: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

PWM - Clock

Configure Clock

Page 12: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

PWM - Clock

• Connect the clock to the PWM.

Page 13: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Servo Motor – Digital Output Pin

• Add Digital Output Pin.

Page 14: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Servo Motor – Digital Output Pin

Configure digital output pin, then connect it to the pwm output port of the PWM.

Page 15: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Servo Motor – Digital Logic Zero

• Add Digital Logic Zero.

Page 16: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Servo Motor – Digital Logic Zero

• Connect Digital Logic Zero to the kill and reset inputs of the PWM.

Page 17: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Timer

• Add Timer.

Page 18: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Timer

Configure Timer

Page 19: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Timer

Configure Timer

Page 20: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Timer Clock

Configure the clock componentattached to the timer.

Page 21: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Timer Clock

Page 22: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine (ISR)

• Add isr and connect it to the interrupt output of the timer.

Page 23: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine (ISR)

Configure the isr.

Page 24: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine (ISR)

Configure the isr.

Page 25: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

LED Output

Add a Digital Output pin and attach it to the tc ouput of the timer.Configure the Digital Output Pin.

Page 26: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Cap Sense

• Add a CapSense component.

Page 27: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Cap Sense - General

Configure the CapSense component.

Page 28: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Cap Sense - General

Configure the CapSense component.

Page 29: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Cap Sense - Widgets Configuration

Configure the CapSense component.

Page 30: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Cap Sense - Widgets ConfigurationAdd Button0, Button1, and LinearSlider0

Configure the CapSense component.

Page 31: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Cap Sense – Scan Order

Configure the CapSense component.

Page 32: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Cap Sense – Scan Order

Configure the CapSense component.

Page 33: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Cap Sense – Advanced

Configure the CapSense component.

Page 34: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Cap Sense – Advanced

Configure the CapSense component.

Page 35: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

LCD Char Display

• Add a Character LCD component.

Page 36: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

LCD Char Display

Configure the Character LCD.

Page 37: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Inter-Integrated Circuit (I2C)

• Add an I2C Master component.

Page 38: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Inter-Integrated Circuit (I2C)

Configure the I2C.

Page 39: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Inter-Integrated Circuit (I2C)

Configure the I2C.

Page 40: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

I2C – Serial Clock (SCL) Type

Configure the I2C.

Page 41: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

I2C – Serial Data Line (SDL) Type

Configure the I2C.

Page 42: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Digital Output Pin – Temp Alarm

Add a Digital Output Pin to the design. Do not connect it to anything.Configure the pin.

Page 43: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Pin Configuration

Page 44: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Complete Physical Set-up

LCD Display

Servo MotorJTAG Programming Cable

Cap Sense Area

P0_6 Cap Sense

TMP 102 Sensor

Power Cable

USB to JTAG Cable

JTAG PROG

HC-SR501 Motion Sensor

Page 45: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

PSoC and PSoC-related Datasheets

Page 46: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

PSoC Tutorials and Project Documents

Page 47: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 1: Initialization / Startup Code

Page 48: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 2: PWM Configuration

Page 49: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 3: Motion Detection Infinite Loop

Page 50: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 4: Timer, TMP102, and Interrupt Service Routine (ISR)

Page 51: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 5: Password Set

Page 52: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 6: LCD Configuration

Page 53: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 7: Password Verification

Page 54: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 8: I2C Protocol Configuration - TMP 102 Sensor

Page 55: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Transaction over I2C Bus

Page 56: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Datasheet: CyI2C_V_2.0_001-62887_I2C_Master_Multi_Master_Slave

Page 57: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Datasheet: CyI2C_V_2.0_001-62887_I2C_Master_Multi_Master_Slave

Page 58: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 9: Setting ISR Interrupt using Timer

Page 59: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Assignment 10: Initialize TMP 102 Interrupt

Page 60: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

New Slides

Page 61: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Timer: Datasheet Access

Page 62: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Timer API

Page 63: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Timer API

Page 64: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Starting Timer – main.c

Page 65: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

TMP102.H Header File

•temp_interrupt is a software flag that is set when the interrupt occurs• when this flag is set, read the temperature in the main.c

Page 66: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine Clearing Register, Setting a flag

•Interrupt Service Request (ISR) has been set to TEMPISR vector•Read Timer Status Register to clear Interrupt and set the software flag

Page 67: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine: Datasheet Access

Page 68: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine API

Page 69: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine API

Page 70: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine Function Description: ISR_Start

Page 71: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine Function Description: ISR_SetVector

Page 72: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Interrupt Service Routine Initializing Interrupt

Set the Interrupt Vector : ISR_SetVector(…)

Page 73: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Conversion Rate Time

Page 74: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

TMP102 Serial Bus Address

Page 75: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

TMP102 Serial Bus Address

Page 76: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

I2C

• I2C connects to multiple slave devices (e.g. temperature sensor).• Each of the slave devices has a unique address• To access I2C devices a device address, register address, a number of bytes, buffer pointer have to be specified• In the project, use existing PSoC_i2c_read() function to read information from the temperature sensor

Page 77: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

I2C Datasheet Access

Page 78: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

Provided I2C Functions

Page 79: EE 446 Project Assignment Top Design Sensor Components Pin Assignment and Configuration Completed Physical Setup Project Tasks.

I2C Read Function