210 likes | 425 Views
Technion - Israel institute of technology department of Electrical Engineering. הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל. המעבדה למערכות ספרתיות מהירות. High Speed Digital Systems Laboratory. Final Presentation. Smart Door Controller. Performed by: Kobbi Kfir-El
E N D
Technion - Israel institute of technology department of Electrical Engineering הטכניון - מכון טכנולוגי לישראלהפקולטה להנדסת חשמל המעבדה למערכות ספרתיות מהירות High Speed Digital Systems Laboratory Final Presentation Smart Door Controller Performed by: Kobbi Kfir-El Ohad Brandelstein Instructor: Konstantin Sinyuk Spring semester 2004
Server Web LAN 2 CAN Remote station CAN Door 3 Door 2 Door 1 SDC vision
Initial project goals • Lab’s board validation • Implementations: • CAN transportation • SDC operating system • Server software • Integration of peripherals under RT demands • Network behavior & performances
Getting started Lab’s board validation: • Operating all peripherals devices • Keypad • Magnetic card readers • I2C module (EPROM, Thermometer) • LCD screen, Buzzer, Leds • USART • Operating all PIC relevant modules: • ISR (Interrupt Service Routine) • Timers • CAN
1 2 3 F 4 5 6 E 7 8 9 D 0 A B C Difficulties • SDC card : • Stability & Reliability : Different results in same program during development • Unable operating CAN, LCD modules • Keypad : Needed modifications. • Lab equipment : • Insufficient Demo boards, Computers.
Progress • April 04 ------------- Characterization Presentation Getting familiar with PIC Tools Basic SDC Power Up • May 04 ------------- Half Semester Presentation • May – September -- Stuck at Basic Power Up • October -------------- New Project Goals • April 05 -------------- Final Presentation
Redefinition of project goals • Completion of project • Implementation on PICDEM2 demo boards • Create prototype of a RT access system controller • Operate CAN protocol between 2 boards • Enable Magnetic card reader usage
CAN Key pad Magnetic card EPROM Thermometer LCD Redefinition of project goals
SDC Prototype • Simple operating system • Resources management (ISR, Timers, EPROM) • I/O handlers • Interface • CAN implementation • Master / Slave • Protocol fundamentals
I/O device Handle interrupt event External interrupt ISR Service Interrupt (priority) • Main routine Checking temperature Checking flags Timer/CAN Internal interrupt Flag event Flag ON Execute Flag OFF SDC PrototypeOperating System Implementation
SDC PrototypeData management (EPROM) • Solution - Hash table ( RT ) • Hash code - last 3 digits of ID • Hash properties: • Insert O(1) • Delete O(1) • Search O(1) • Principle of search: • First look in relevant cell, if full look in STACK.
ADDRESS 0 1 2 3 4 5 6 7 8 9 0 0 5 7 5 2 5 8 0 0 0 Cell 0 (000) 10 20 30 0 2 8 9 4 6 1 0 0 1 Cell 1 (001) 40 0 3 9 5 2 6 6 0 0 1 50 0 2 5 6 6 8 5 0 0 1 60 0 6 5 6 1 2 5 0 0 2 Cell 2 (002) 70 80 32Kbyte 29970 Cell 999 (999) 29980 29990 30000 0 6 6 5 7 8 6 0 0 1 Stack 30010 30020 32750 SDC PrototypeData management (EPROM)
Master CAN Slave Slave Slave Slave SDC PrototypeCAN protocol & transportation • Master / Slave implementation • Master ( Server ) - knows all SDC’s ( nodes ) • Slave ( SDC controller ) - knows only the master • Every node has unique ID
SDC PrototypeCAN protocol & transportation • Slave : • Transmits to CAN bus, own ID • Listens only to messages with it’s ID - Implemented by Filters & Masks mechanism • Master : • Listens to CAN bus, response to all nodes • Transmits emergency messages to all nodes (broadcast) • Transmits to specific node
SDC PrototypeCAN protocol & transportation • CAN message - 3 main fields Arbitration, Control, Data. • Arbitration field: • Mask • Master 111100000000 • Slave 111111111111
TQFP PLCC Lab’s board problems • PIC 18f458 : wrong type PLCC instead of TQFP • Suspected mismatch in connecting PIC to SDC board. - result: LCD not functioning • Both CAN transceivers not operating
Lab’s board problems • Connections - antennas, short welding might cause unstable behavior
Finding SDC problems Programming module on Demo Board SDC running Same program Good results LA, DVM testing Bad results Compare Conclusions
Project benefits(what we learned…) • Read hardware specifications • Learn about MCU’s • System design, implementation and integration • Basic understanding of hardware • Communication protocols: I2C, CAN • Lab equipment usage : DVM, Logical Analyzer • Experience: Wire-up, Welding • Use the Internet as a help tool • Use Wire-up prototype prior to board design
Summery • Final project exceeds redefined goals • Original design compatibility was kept • Project can be defined as a reference design for future groups • Redesign must take in mind a different MCU: • Problems with multi interrupt scenario • Tool supported by better debugger