10/317
Table of Contents
317
8.9 CONCLUSION....................................................248
9 A CARRIER-CURRENT SYSTEM FOR DOMESTIC REMOTE CONTROL . . . . . . . . . 249
9.1 CARRIER CURRENT CONTROL AND THE X-10 STANDARD . . . . . . . . . . . . . 250
9.2 TRANSMITTER ...................................................255
9.2.1 Instructionsforuse ....................................................255
9.2.2 Descriptionoftheelectroniccircuit........................................255
9.2.3 Descriptionofthesoftware ..............................................259
9.2.3.1 Themainprogram ................................................259
9.2.3.2 TimerACaptureinterruptserviceroutine ..............................262
9.2.3.3 TheTimerBoverflowinterruptserviceroutine ..........................269
9.3 RECEIVER ......................................................272
9.3.1 Instructionsforuse ....................................................272
9.3.2 Electroniccircuitry.....................................................272
9.3.3 Software ............................................................276
9.3.3.1 Interruptfunctions ................................................276
9.3.3.2 Mainprogram....................................................279
9.4 CONCLUSION....................................................285
10SECONDAPPLICATION:ASAILINGCOMPUTER ..........................286
10.1THEORYOFTHECOMPUTATION ...................................288
10.2INTERFACINGTHEMEASUREMENTDEVICES ........................291
10.2.1 Frequency-type devices: speedometer and wind gauge .......................291
10.2.1.1 Interfacing the speedometer ........................................291
10.2.1.2 Interfacing the wind gauge ..........................................291
10.2.1.3 Using a common timer for both speed measurement devices ...............292
10.2.2Interfacingtheweathervane ............................................293
10.3INTERFACINGTHEDISPLAY .......................................294
10.3.1Displaycircuit ........................................................295
10.3.2Push-buttoncircuit ....................................................298
10.3.3LEDcircuit ..........................................................299
10.4INTERFACINGTHEOPTIONALPERSONALCOMPUTER ................299
10.5PROGRAMARCHITECTURE........................................300
10.5.1 Reading and conversion of the speeds . ...................................300
10.5.2Refreshingofthedisplay ...............................................302