Security System Leah Langston Daniel Suhr Project Description When Distance Sensor is triggered within 6 inches, a song is played In order to turn off the song, the correct code must be inputted to keypad Important Concepts Used Tables A to D conversion Timer System (Input Capture and Output Compare) Interrupts RTI Hardware HCS12 microcontroller Internal Speaker Keypad GP2D12 distance sensor Circuit Schematic Flowchart - Main Flowchart- Song Notes Interrupt Flowchart – Alarm Interrupt t=(1/(freq of note))/42nS Flag is set when TC7 = t Challenges Initially thought we could set TCNT to desired amount to generate desired frequencies Can’t use output compare on PM4 (speaker), used pin PT7 for toggling PM4 Why this is useful Security Systems are valuable for protection Fun to have the flexibility to program your own song as alarm Questions?