2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

31
2 Lines Electronics 2 Lines Electronics I I 2 C Analyzer C Analyzer Ching-Yen Beh Ching-Yen Beh Robert S. Stookey Robert S. Stookey Advisor: Dr. J. W. Bruce Advisor: Dr. J. W. Bruce

Transcript of 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Page 1: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

2 Lines Electronics2 Lines Electronics

II22C AnalyzerC Analyzer

Ching-Yen BehChing-Yen Beh

Robert S. StookeyRobert S. Stookey

Advisor: Dr. J. W. BruceAdvisor: Dr. J. W. Bruce

Page 2: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

I2C BackgroundI2C Background

Serial data transfer protocolSerial data transfer protocol Developed in 1992 by Phillips Developed in 1992 by Phillips

semiconductorsemiconductor

Page 3: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

I2CI2C??

Digital Peripheral Digital Peripheral CommunicationsCommunications– 2 bi-directional bus lines2 bi-directional bus lines– Conserves I/O pins on controllerConserves I/O pins on controller

Data TransferData Transfer– Addresses a slave listenerAddresses a slave listener– Encoded into 8-bit bytesEncoded into 8-bit bytes

Page 4: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

User ProblemsUser Problems

Debug ComplexityDebug Complexity

Equipment CostsEquipment Costs

Page 5: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

User ProblemsUser Problems

Figure represents IFigure represents I22C dataC data

SDASDA

SCLSCL

StartStart Stop Stop

SignalSignal Signal Signal

Data byte (F1)Data byte (F1)

Page 6: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

SolutionSolution

Decodes DataDecodes Data– Hexadecimal Wave FormHexadecimal Wave Form– Individual Address ShownIndividual Address Shown

CostCost– Roughly $65.00Roughly $65.00

Page 7: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

What is inside our What is inside our devicedevice Ubicom SX52 Micro controllerUbicom SX52 Micro controller

– Analyze data transferred from the IAnalyze data transferred from the I22C bus, and C bus, and store them into memory. store them into memory.

256 x 128 Hyundai LCD Module256 x 128 Hyundai LCD Module– Display the analyzed data in waveformDisplay the analyzed data in waveform

3 leads3 leads– Get signals from IGet signals from I22C bus line.C bus line.– Ground loop.Ground loop.

4 S.P.S.T pushbuttons4 S.P.S.T pushbuttons– Control the Menu/Display settingControl the Menu/Display setting

1 rotary encoder1 rotary encoder– Change the setting valueChange the setting value

Page 8: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Ubicom SX52 MCUUbicom SX52 MCU

40 I/O pins40 I/O pins 4K Words programming space4K Words programming space 262 Bytes RAM262 Bytes RAM Voltage Range 3.0 – 5.5 VVoltage Range 3.0 – 5.5 V Operating Temperature 0Operating Temperature 0ْْC + 70C + 70ْْCC Program in Assembly LanguageProgram in Assembly Language

Page 9: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Hyundai LCD ModuleHyundai LCD Module

Viewing area: 5" x 2.75". Viewing area: 5" x 2.75". 256 x 128 pixel.256 x 128 pixel. STN gray positive type STN gray positive type

display. display. 5 Vdc logic. 5 Vdc logic. 18 Vdc LCD drive voltage. 18 Vdc LCD drive voltage. Physical area 5.8" x 4.58“Physical area 5.8" x 4.58“

Page 10: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Pushbuttons Pushbuttons and Rotary Encoderand Rotary Encoder PushbuttonsPushbuttons

– S.P.S.TS.P.S.T– Normally OpenNormally Open

Rotary EncoderRotary Encoder– Grayhill Series Grayhill Series

25L25L– 36 Position36 Position– 3 Pin PCB Mount3 Pin PCB Mount

Page 11: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Block DiagramBlock Diagram

Ubicom SX52

LCD Module12

SDA SCL

Push Button 1

Push Button 2

Push Button 3

Push Button 4

2 Rotary Encoder

Page 12: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Design SpecificationDesign Specification

PerformancesPerformances– II22C Mode SupportC Mode Support

100K bps in Standard Mode100K bps in Standard Mode 400K bps in Fast Mode400K bps in Fast Mode

– Show data in waveformShow data in waveform– Store 128 bytes of sniffed data for best Store 128 bytes of sniffed data for best

case and 64 bytes of sniffed data for worse case and 64 bytes of sniffed data for worse case.case.

Physical appearancePhysical appearance– Handheld Device (approx. 6” x 6” x 2” ).Handheld Device (approx. 6” x 6” x 2” ).– Not more than 3.5 lbs.Not more than 3.5 lbs.

Page 13: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Design Specification Design Specification (cont)(cont)

User Interface and OptionsUser Interface and Options– GUI menuGUI menu– Data filteringData filtering– Start byteStart byte– WaveformWaveform

Page 14: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Design Specification Design Specification (cont)(cont)

GUI Menu Interface

Page 15: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Design Specification Design Specification (cont)(cont)

Master and Slave Data Waveforms

Page 16: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Design Specification Design Specification (cont)(cont)

Power consumptionPower consumption– Three 9V batteries.Three 9V batteries.– 4 Hours Operation 4 Hours Operation

Page 17: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Design Parts ListDesign Parts List

Economics  Economics  – Ubicom SX52 - $ 7.32Ubicom SX52 - $ 7.32– 50MHz Crystal - $ 1.6650MHz Crystal - $ 1.66– LCD Module - $ 18.50LCD Module - $ 18.50– Rotary Encoder - $ 3.26Rotary Encoder - $ 3.26– 4 Pushbuttons - $ 1.504 Pushbuttons - $ 1.50– 3 Test leads - $ 1.003 Test leads - $ 1.00– 3@9V batteries - $ 6.503@9V batteries - $ 6.50– Chassis - $ 11.50Chassis - $ 11.50– Labor - $ 10.00Labor - $ 10.00– Machinery operating cost - $ 5.00Machinery operating cost - $ 5.00

Manufacturing Cost <$65Manufacturing Cost <$65

Page 18: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Design ConsiderationDesign Consideration

Manufacturability  Manufacturability  – Our device can be easily mass Our device can be easily mass

produced for a cheap cost. produced for a cheap cost. – Simple circuit requires less Simple circuit requires less

machining time.machining time.

Page 19: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Design ConsiderationDesign Consideration

Health and Safety  Health and Safety  – Our device is operated by batteries Our device is operated by batteries

and contains sharp leads. Therefore, and contains sharp leads. Therefore, it’s not advisable for kids below 6.it’s not advisable for kids below 6.

Legal  Legal  – Applicable FCC rules and regulation.Applicable FCC rules and regulation.

Page 20: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

ImplementationImplementation

HardwareHardware– Breadboard circuit developmentBreadboard circuit development– PCB prototypePCB prototype

SoftwareSoftware– 2 Main Threads2 Main Threads

II22C, Button, and Rotary (Background)C, Button, and Rotary (Background) Data management (Background)Data management (Background) Flag processing (Foreground)Flag processing (Foreground) LCD communication (Foreground)LCD communication (Foreground)

Page 21: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Power On

Processor/LCDInitialization

Main Flag Processing

LCD Refresh

Software Foreground Software Foreground LoopLoop

Page 22: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Software Background Software Background LoopLoop

ISR

ISRSate = 1

I2C Buss Monitoring ISR

ISRSate = 2

Push Button ISR

Rotary ISR

End

Yes

Yes

Yes

No

No

Page 23: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Minimum Minimum RequirementsRequirements Read and Decode dataRead and Decode data Works with standard and fast Works with standard and fast

modemode Display data on LCD screenDisplay data on LCD screen Hand-held battery operationHand-held battery operation

Page 24: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

TimelineTimeline

Date Task Duration (days)

Jan 7 – Jan 13 Research & Looking for parts 7

Jan 14 – Jan 17

Start simple coding on Ubicom SX28 while waiting for the SX52 Chip to arrive.

4

Jan 18 Hardware hook-up for Ubicom SX52, Rotary Encoder, and Buttons

1

Jan 19 – Jan 25

Coding - Able to read the signal from SCL, SDA and process it into byte form

7

Jan 26 – Jan 29

Hardware hook-up of LCD and MCU on prototype board

4

Jan 30 – Feb 5 Coding for LCD drawing 7

Page 25: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Timeline Timeline (cont)(cont)

Date Task Duration (days)

Feb 6 – Feb 14 More coding for I2C 9

Feb 15 – Feb 21

Coding - Combine LCD and I2C 7

Feb 22 – Feb 23

Coding on LCD Display Layout and User Selection Function

2

Feb 24 – Feb 25

Prepare for Critical Design Review Presentation 2

Feb 26 Critical Design Review Presentation 1

Feb 27 – March 2

More coding on LCD Display Layout and User Selection Function

4

March 3 – March 16

Coding Displaying data on LCD 14

Page 26: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Timeline Timeline (cont)(cont)

Date Task Duration (days)

March 17 – March 23

Final coding 7

March 24 – March 30

Testing 7

March 31 -April 8 Bugs and Problems 9

April 9 – April 18 Packaging 10

April 19 – April 22 Documentation 4

April 23 – April 24 Prepare for Final Presentation 2

April 25 Final Presentation 1

Page 27: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Design ProblemsDesign Problems

LCD requirements are highLCD requirements are high– -18 volt to drive LCD-18 volt to drive LCD– Takes two 9-volt batteriesTakes two 9-volt batteries

Processor RequirementsProcessor Requirements– High power consumption at 50 Mhz.High power consumption at 50 Mhz.

SX ProgrammerSX Programmer– Heats up!!Heats up!!

Page 28: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Possible SolutionsPossible Solutions

D/C ConverterD/C Converter– Battery inputBattery input– Dual Output (logic and LCD drive)Dual Output (logic and LCD drive)

LCDLCD– 5-volt drive voltage5-volt drive voltage

ProcessorProcessor– Slower clock speed (30 Mhz)Slower clock speed (30 Mhz)

Page 29: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Device TestingDevice Testing

Microprocessors II class projectMicroprocessors II class project– Multiple IMultiple I22C devicesC devices– All different data lengthsAll different data lengths

Data Bus SpeedsData Bus Speeds– 100 and 400 kbits/second100 and 400 kbits/second

Power ConsumptionPower Consumption– Battery lifeBattery life

Page 30: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

Questions?Questions?

Page 31: 2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.

ReferencesReferences

www.semiconductors.philips.comwww.semiconductors.philips.com– I2C SpecificationI2C Specification

www.ubicom.comwww.ubicom.com– Controller and software informationController and software information

www.allelectronics.comwww.allelectronics.com– LCD manual and specificationLCD manual and specification