d.h.s. digijock home security ece477 – team 7 linda stefanutti zach smith stuart pulliam will...
TRANSCRIPT
D.H.S. Digijock Home SecurityECE477 – Team 7Linda StefanuttiZach SmithStuart PulliamWill Granger
Software Design Narrative
Overview of DHSSecurity system consisting of 2
remote detection units and 1central monitoring station (CMS)
The CMS has:◦Web server
The Detectors have:◦Noise detection◦Motion sensing◦Smoke detection◦Temperature measuring
Digijock Home Security - Software Design Narrative 2
Central Monitoring System (CMS)Receiving input via USB devicesHosts a web server - Internet
Information Services (IIS)MySQL databaseWill have a program written in
C# which reads data from Xbee and places it in database
Digijock Home Security - Software Design Narrative 3
Detector (Analog-to-Digital)
Peripheral Port Code Status
Noise Detector AN7 Tested
Temperature Sensor
AN6 Tested
Smoke Detector AN5 Written
Battery Charge AN0 Tested
Digijock Home Security - Software Design Narrative 4
Register
Purpose Initial Value
0x8D ATD Input Enable Register - set AN0,5-7 as input
0xE1
0x82 ATD Control Register 2 – enable ATD
0x80
0x83 ATD Control Register 3 – set conversion sequence length to 2
0x10
0x84 ATD Control Register 4 – select nominal sample time
0x85
Detector (SCI)
Digijock Home Security - Software Design Narrative 5
Xbee Port Port
Xbee Data Out TX
Xbee Data In RX
Register
Purpose Initial Value
0xC8 SCI Baud Rate Register High - set baud rate to 9600
0x00
0xC9 SCI Baud Rate Register Low
0x9C
0xCA SCI Control Register 1 0x00
0xCB SCI Control Register 2 - initialize SCI for program-driven operation
0x0C
0x03 Port B Data Direction Register - set PB4 for output
0x10
0x01 Port B Register - assert DRT pin on COM port
0x10
Code Status for Xbee Wireless Module: N/A
Detector (PWM)
Digijock Home Security - Software Design Narrative 6
Peripheral Port Code Status
Speaker PT1 TestedRegiste
rPurpose Initial
Value
0xE0 PWM Enable Register – enable channel 1 0x02
0xE3 PWM Prescale Clock Select Register - set clock t = 24 MHz / 16
0x04
0xE8 PWM Scale A Register - set clock SB scalar to 119
119
0xE1 PWM Polarity Register - set PWM active high 0x02
0xE4 PWM Center Align Enable Register - left-aligned output mode
0
0xE5 PWM Control Register - no concatenation 0
0xF3 PWM Ch.Per. 1 Register - 24MHz/(16*2*119*7) = 900Hz
7
0xF9 PWM Channel Duty 1 Register - set duty cycle = 0%
0
0x247 Module Routing Register - PT1 used as PWM ch 1 output
0x02
0xE2 PWM Clock Select Register – select channel 1 clock
0x02
Detector (SPI)
Digijock Home Security - Software Design Narrative 7
LCD Peripheral
Port LCD Peripheral Port
LCD SCK PM5 LCD RS PM0
LCD MOSI PM4 LCD CLK PT0
LCD R/W PM1
Register
Purpose Initial Value
0xDA SPI Baud Rate Register - initialize baud rate for 6.25MHz
0x01
0xD8 SPI Control Register - transfers most significant bit first
0x50
0xD9 SPI Control Register 2 – normal mode
0x00
0x252 Port M Data Direction Register - set PM0 and PM1 as outputs
0x03
Code Status for LCD: Written
PT0Actually PM4,5
Detector (Digital I/O)
Digijock Home Security - Software Design Narrative 8
Peripheral Port Code Status
LED (Red) PT4 Tested
LED (Green) PT3 Tested
Motion Detector
PT2 Tested
Register Purpose Initial Value
0x242 Port T Data Direction Register - make PT0,1,3,4 outputs (also PT6 for debug purposes)
0x5B
Detector - Main() flowchart
Digijock Home Security - Software Design Narrative 9
Software Hierarchy
Digijock Home Security - Software Design Narrative 10
Questions?
11Digijock Home Security - Software Design Narrative
“The key to wisdom is knowing all the right questions.”
© DC Comics