Senior Design Project 2004/2005 Web-Enabled Caller Identification 12/09/2004 Barron Shurn Daniel St....
-
Upload
jeffery-grant -
Category
Documents
-
view
216 -
download
3
Transcript of Senior Design Project 2004/2005 Web-Enabled Caller Identification 12/09/2004 Barron Shurn Daniel St....
Senior Design Project Senior Design Project 2004/20052004/2005
Web-Enabled Caller Web-Enabled Caller IdentificationIdentification
12/09/200412/09/2004Barron Shurn
Daniel St. Clair
Professor Soules
Design Idea - FunctionDesign Idea - Function
Caller Identification device accessible Caller Identification device accessible via the Webvia the Web
All functions Web based, no physical All functions Web based, no physical interface to deviceinterface to device
Web Page Function:Web Page Function: View/Query Call LogView/Query Call Log Edit Call LogEdit Call Log Download/Archive Call LogDownload/Archive Call Log
Design Idea - DetailsDesign Idea - Details
Used on a Home/Business LANUsed on a Home/Business LAN
Broadband - Always ConnectedBroadband - Always Connected
Size:Size: Dimensions: 5”X5”X2” Dimensions: 5”X5”X2” Weight: Less than 2 lbs.Weight: Less than 2 lbs.
5V AC/DC Power Adapter5V AC/DC Power Adapter
System Block DiagramSystem Block Diagram
Atmel AVR AT90S8515
Caller ID Microcontroller
Holtek HT9032D
Calling Line Identification Receiver +
Supporting Hardware Microchip 24FC515
512Kb EEPROM – Caller ID Data
Packet Whacker/ Realtek RTL8019AS
Full Duplex Ethernet Controller
Atmel AVR AT90S8515
HTTP + TCP/IP Microcontroller
UART
1200bps
I2C Protocol
I2C Protocol
Proprietary Protocol
LAN
Tele
ph
one
Netw
ork
Microchip 24FC515
512Kb EEPROM – Web Pages
I2C Protocol
MDR SpecificationMDR Specification
A functioning Caller ID data decoder. The A functioning Caller ID data decoder. The Caller ID data will be decoded and stored Caller ID data will be decoded and stored in a semiconductor memory device. This in a semiconductor memory device. This data will be verifiable using a Personal data will be verifiable using a Personal Computer running microcontroller Computer running microcontroller development softwaredevelopment software
A microcontroller with a minimally A microcontroller with a minimally functional TCP/IP stack implemented so functional TCP/IP stack implemented so that it can respond to ping requeststhat it can respond to ping requests
Caller IdentificationCaller IdentificationMDR Specification was Successful!MDR Specification was Successful! Decoded data from phone lineDecoded data from phone line Stored data to EEPROMStored data to EEPROM Read data on EEPROM and displayed using Read data on EEPROM and displayed using
UART + PC Terminal Software for verificationUART + PC Terminal Software for verification
Caller Identification - Caller Identification - HardwareHardware
Holtek HT9032 - Decodes Caller ID Holtek HT9032 - Decodes Caller ID datadata
Atmel AVR AT90S9515 – Reads + Atmel AVR AT90S9515 – Reads + Parses Data From HT9032 and sends Parses Data From HT9032 and sends to EEPROMto EEPROM
Microchip 512Kb EEPROM - Stores Microchip 512Kb EEPROM - Stores Caller ID DataCaller ID Data
Caller ID DataCaller ID Data
Theory of operationTheory of operation Data transmitted between first & second ringsData transmitted between first & second rings Uses Frequency Shift KeyingUses Frequency Shift Keying
Logic 1 sent as 1200 Hz signalLogic 1 sent as 1200 Hz signalLogic 0 sent as 2200 Hz signalLogic 0 sent as 2200 Hz signal
Data sent at 1200 bps using standard ASCII codesData sent at 1200 bps using standard ASCII codes Data Transmission SchemeData Transmission Scheme
Initiation String – 30 bytes – ’01’ bit patternInitiation String – 30 bytes – ’01’ bit pattern Type of message – 1 byte – For Caller ID is always 04hType of message – 1 byte – For Caller ID is always 04h Length of message – 1 byteLength of message – 1 byte Month/Day/Hour/Minute – 2 bytes for each fieldMonth/Day/Hour/Minute – 2 bytes for each field Phone number – 10 bytesPhone number – 10 bytes Line Owner’s Name – Up to 15 bytes Line Owner’s Name – Up to 15 bytes Check sum – 1 byteCheck sum – 1 byte
Holtek DeviceHoltek DeviceTwo devices available: HT9032C / HT9032DTwo devices available: HT9032C / HT9032D
Both devices decode Caller ID data from Frequency Both devices decode Caller ID data from Frequency Shift Keying to ASCII codes which are sent out of the Shift Keying to ASCII codes which are sent out of the chip at 1200bpschip at 1200bps
Difference between two devicesDifference between two devices HT9032CHT9032C
16 pin16 pinoutputs both raw data and “cooked” data (w/o initialization outputs both raw data and “cooked” data (w/o initialization string)string)Ring + Carrier Detection pinsRing + Carrier Detection pins
HT9032DHT9032D8 pin8 pinRequires micro-controller to detect ringRequires micro-controller to detect ring
Micro-ControllerMicro-Controller
Atmel AT90S8515Atmel AT90S8515 Crystal Frequency: 4MHz (up to 16MHz)Crystal Frequency: 4MHz (up to 16MHz) Robust Instruction Set (130 Instructions)Robust Instruction Set (130 Instructions) AVR GCC C Complier (freeware)AVR GCC C Complier (freeware) Hardware UARTHardware UART Low Power Sleep ModeLow Power Sleep Mode 512 byte EEPROM + 512 byte SRAM512 byte EEPROM + 512 byte SRAM
EEPROMEEPROM512 Kbit EEPROM (64Kbyte)512 Kbit EEPROM (64Kbyte)
I2C CompliantI2C Compliant Protocol that allows EEPROM access using two lines Protocol that allows EEPROM access using two lines
(Serial Data Line, Serial Clock Line)(Serial Data Line, Serial Clock Line)
Allows for 1400 logged callsAllows for 1400 logged callsMonth/Day/Hour/Minute – 8 bytes totalMonth/Day/Hour/Minute – 8 bytes totalPhone number – 10 bytesPhone number – 10 bytesLine Owner’s Name – Up to 25 bytes Line Owner’s Name – Up to 25 bytes
(8+10+25 bytes)*8 bits= 344 bits/call(8+10+25 bytes)*8 bits= 344 bits/call512000 bit EEPROM/264 bits = 1400 calls stored512000 bit EEPROM/264 bits = 1400 calls stored*Plan to limit call log size to 500 calls *Plan to limit call log size to 500 calls
Caller ID Problems Caller ID Problems EncounteredEncountered
Holtek HT9032C device not operating as Holtek HT9032C device not operating as expectedexpected
Device clock issuesDevice clock issues
Read UART/Write EEPROM conflictRead UART/Write EEPROM conflict
Next StepsNext Steps
Caller IDCaller ID Design manageable storage schemeDesign manageable storage scheme
ValidationValidation
IndexingIndexing
ReliabilityReliability
System Block DiagramSystem Block Diagram
Atmel AVR AT90S8515
Caller ID Microcontroller
Holtek HT9032D
Calling Line Identification Receiver +
Supporting Hardware Microchip 24FC515
512Kb EEPROM – Caller ID Data
Packet Whacker/ Realtek RTL8019AS
Full Duplex Ethernet Controller
Atmel AVR AT90S8515
HTTP + TCP/IP Microcontroller
UART
1200bps
I2C Protocol
I2C Protocol
Proprietary Protocol
LAN
Tele
ph
one
Netw
ork
Microchip 24FC515
512Kb EEPROM – Web Pages
I2C Protocol
What is the Ethernet ControllerWhat is the Ethernet Controller
Allows device to directly connect to a networkAllows device to directly connect to a network
Handles all hardware complexitiesHandles all hardware complexities
Delivers raw packets to the applicationDelivers raw packets to the application
Very similar to the network interface card (NIC) Very similar to the network interface card (NIC) in your typical Desktop PCin your typical Desktop PC
How to interface the Ethernet How to interface the Ethernet ControllerController
Setup microcontroller ports for I/O Setup microcontroller ports for I/O
NIC Initialization:NIC Initialization: Perform Hard ResetPerform Hard Reset Perform Soft Reset by reading/writing a Perform Soft Reset by reading/writing a
value to the NICvalue to the NIC Write to NIC configuration registersWrite to NIC configuration registers
Set MAC AddressSet MAC Address
Accept only broadcast packets (ARP + DHCP Accept only broadcast packets (ARP + DHCP Requests) + packets intended for set MAC Requests) + packets intended for set MAC addressaddress
Ethernet Controller InterfaceEthernet Controller Interface
Software Emulation of 9346 EEPROMSoftware Emulation of 9346 EEPROM Used to store NIC configuration dataUsed to store NIC configuration data 9346 is a 16 bit x 1k serial EEPROM9346 is a 16 bit x 1k serial EEPROM Only need 3 bytes of data from the Only need 3 bytes of data from the
EEPROM for using the NIC in 8-bit mode EEPROM for using the NIC in 8-bit mode
Emulate by using 3 pins on the Emulate by using 3 pins on the microcontrollermicrocontroller EEDO, EEDI, EESKEEDO, EEDI, EESK Time sensitive code written in inline-Time sensitive code written in inline-
assemblyassembly
TCP/IP ImplementationTCP/IP Implementation
Written in CWritten in CMain LoopMain Loop Checks NIC for a packet by polling the Checks NIC for a packet by polling the
NIC interrupt pinNIC interrupt pin
Packet ProcessingPacket Processing Examine Packet Header (first four bytes)Examine Packet Header (first four bytes)
Determines Packet LengthDetermines Packet Length Read entire packet to microcontroller Read entire packet to microcontroller
SRAMSRAM Determine Packet Type Determine Packet Type
Packet TypesPacket Types
Address Resolution Protocol (ARP)Address Resolution Protocol (ARP) Bind IP Address to MAC AddressBind IP Address to MAC Address
Internet Protocol (IP)Internet Protocol (IP) Internet Control Message Protocol (ICMP)Internet Control Message Protocol (ICMP) User Datagram Protocol (UDP)User Datagram Protocol (UDP) Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
ARP Packet HandlingARP Packet Handling
ARP Response Packet ContentsARP Response Packet Contents Source MAC AddressSource MAC Address Source IP AddressSource IP Address Destination MAC AddressDestination MAC Address Destination IP AddressDestination IP Address Padding characters to meet minimum packet Padding characters to meet minimum packet
size requirements (64 bytes)size requirements (64 bytes) Number of bytes to be transmittedNumber of bytes to be transmitted
IP Packet Handling - ICMPIP Packet Handling - ICMP
ICMP is the protocol used for the ping ICMP is the protocol used for the ping functionfunction
Response packet is essentially an Response packet is essentially an echoed packet with source and echoed packet with source and destination fields swapped. destination fields swapped.
ICMP Packet HandlingICMP Packet Handling
ICMP Packet ContentsICMP Packet Contents Packet Type (ICMP = 0x00)Packet Type (ICMP = 0x00) Destination IP AddressDestination IP Address Source IP AddressSource IP Address Destination MAC AddressDestination MAC Address Source MAC AddressSource MAC Address IP Header ChecksumIP Header Checksum Original Packet Data + ChecksumsOriginal Packet Data + Checksums
IP Packet Handling – IP Packet Handling – UDP/TCPUDP/TCP
UDPUDP Used for implementing DHCPUsed for implementing DHCP ‘‘Connectionless’ – No acknowledgement Connectionless’ – No acknowledgement
sentsent
TCPTCP Used for receiving HTTP (Web Server) Used for receiving HTTP (Web Server)
RequestsRequests
Ethernet Controller ProblemsEthernet Controller Problems
Realtek RTL8019AS could not be Realtek RTL8019AS could not be reset in software.reset in software. Unable to configureUnable to configure Unable to debugUnable to debug
DebuggingDebugging
Connected HTTP + TCP/IP Connected HTTP + TCP/IP Microcontroller to UART + PC Microcontroller to UART + PC Terminal SoftwareTerminal Software Wrote software to perform a register Wrote software to perform a register
dump of the NICdump of the NICNIC was unreadableNIC was unreadable
Examined NIC drivers for other Examined NIC drivers for other processors including:processors including: Microchip PIC 16F877 and Rabbit 2000T Microchip PIC 16F877 and Rabbit 2000T
DebuggingDebugging
Simulated code in software Simulated code in software environmentenvironment Monitored Registers and I/OMonitored Registers and I/O
Quadruple Checked Wiring / Quadruple Checked Wiring / Hardware SetupHardware Setup Power Supply, ClockPower Supply, Clock
Replaced Realtek RTL8019ASReplaced Realtek RTL8019AS
Posted Messages on support forumsPosted Messages on support forums
Next StepNext Step
Exhausted all of our current resourcesExhausted all of our current resources Contact makers of the Ethernet Controller for Contact makers of the Ethernet Controller for
more documentationmore documentation
Worst Case Scenario:Worst Case Scenario: Obtain new Ethernet controllerObtain new Ethernet controller
Crystal Semiconductor CS8900ACrystal Semiconductor CS8900A Popular + Well DocumentedPopular + Well Documented