Introduction |
|
xiii | |
Acknowledgments |
|
xix | |
|
|
1 | (10) |
|
When to use a Serial Port |
|
|
2 | (2) |
|
|
2 | (2) |
|
|
4 | (1) |
|
|
4 | (4) |
|
|
4 | (2) |
|
|
6 | (1) |
|
|
6 | (2) |
|
|
8 | (3) |
|
|
8 | (1) |
|
|
9 | (1) |
|
|
9 | (2) |
|
|
11 | (20) |
|
|
11 | (4) |
|
Asynchronous and Synchronous Communications |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
13 | (1) |
|
System Support for Low-level Protocols |
|
|
14 | (1) |
|
|
15 | (3) |
|
|
15 | (1) |
|
The Need for Accurate Timing |
|
|
15 | (2) |
|
Autodetecting the Bit Rate |
|
|
17 | (1) |
|
|
18 | (1) |
|
|
18 | (7) |
|
|
18 | (1) |
|
|
19 | (3) |
|
|
22 | (2) |
|
Application-specific Protocols |
|
|
24 | (1) |
|
|
25 | (6) |
|
|
26 | (1) |
|
|
27 | (1) |
|
Event-driven Programming and Polling |
|
|
28 | (1) |
|
|
29 | (1) |
|
|
29 | (2) |
|
|
31 | (12) |
|
|
31 | (7) |
|
|
31 | (5) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
38 | (5) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
Options for Application Programming |
|
|
41 | (2) |
|
|
43 | (18) |
|
|
43 | (5) |
|
|
43 | (3) |
|
|
46 | (2) |
|
|
48 | (1) |
|
|
48 | (7) |
|
|
49 | (4) |
|
|
53 | (2) |
|
|
55 | (3) |
|
Using Outputs as a Power Source |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
58 | (3) |
|
|
58 | (1) |
|
Other Unbalanced Interfaces |
|
|
58 | (3) |
|
|
61 | (18) |
|
|
61 | (6) |
|
|
62 | (1) |
|
|
63 | (2) |
|
Using Microcontroller Development Boards |
|
|
65 | (2) |
|
|
67 | (3) |
|
|
67 | (2) |
|
|
69 | (1) |
|
|
70 | (6) |
|
Ways to Achieve Isolation |
|
|
70 | (1) |
|
|
70 | (2) |
|
|
72 | (3) |
|
|
75 | (1) |
|
|
76 | (3) |
|
|
76 | (1) |
|
Monitoring with a Voltmeter |
|
|
77 | (1) |
|
Oscilloscopes and Logic Analyzers |
|
|
78 | (1) |
|
|
79 | (26) |
|
|
79 | (10) |
|
Balanced and Unbalanced Lines |
|
|
80 | (4) |
|
|
84 | (1) |
|
|
85 | (2) |
|
|
87 | (1) |
|
Internal Protection Circuits |
|
|
88 | (1) |
|
|
89 | (7) |
|
|
89 | (2) |
|
|
91 | (1) |
|
|
91 | (2) |
|
|
93 | (3) |
|
Controlling the Driver Enable |
|
|
96 | (9) |
|
|
97 | (1) |
|
Software-assisted Control |
|
|
97 | (2) |
|
|
99 | (6) |
|
Designing RS-485 Links and Networks |
|
|
105 | (40) |
|
|
106 | (6) |
|
|
106 | (3) |
|
|
109 | (2) |
|
|
111 | (1) |
|
|
112 | (15) |
|
|
112 | (1) |
|
|
113 | (2) |
|
|
115 | (2) |
|
|
117 | (5) |
|
|
122 | (1) |
|
Terminations for Short Lines |
|
|
122 | (1) |
|
|
123 | (2) |
|
|
125 | (2) |
|
|
127 | (4) |
|
|
127 | (3) |
|
|
130 | (1) |
|
|
131 | (3) |
|
How a Wire Picks Up Noise |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
133 | (1) |
|
Grounds and Differential Lines |
|
|
134 | (7) |
|
|
134 | (3) |
|
|
137 | (4) |
|
|
141 | (4) |
|
|
141 | (1) |
|
Implementing a Star Topology |
|
|
141 | (4) |
|
|
145 | (10) |
|
|
146 | (2) |
|
Using a Carrier Frequency |
|
|
146 | (1) |
|
Spread Spectrum Technology |
|
|
147 | (1) |
|
Ensuring Reliable Transfers |
|
|
147 | (1) |
|
|
148 | (1) |
|
Transmitters and Receivers |
|
|
148 | (1) |
|
|
149 | (1) |
|
|
149 | (6) |
|
Complying with Regulations |
|
|
149 | (1) |
|
|
150 | (1) |
|
|
151 | (1) |
|
|
152 | (3) |
|
Using .NET's SerialPort Class |
|
|
155 | (34) |
|
|
156 | (7) |
|
|
156 | (1) |
|
|
156 | (4) |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
161 | (2) |
|
|
163 | (13) |
|
|
167 | (3) |
|
|
170 | (6) |
|
|
176 | (10) |
|
BinaryReader and BinaryWriter |
|
|
177 | (5) |
|
StreamReader and StreamWriter |
|
|
182 | (4) |
|
Saving a Port and Parameters |
|
|
186 | (3) |
|
The Application Settings Architecture |
|
|
186 | (1) |
|
|
187 | (2) |
|
Managing Ports and Transfers in .NET |
|
|
189 | (40) |
|
|
190 | (13) |
|
|
190 | (1) |
|
|
190 | (7) |
|
|
197 | (5) |
|
Ensuring Efficient Transfers |
|
|
202 | (1) |
|
|
203 | (6) |
|
|
203 | (1) |
|
Sending without Blocking the Application |
|
|
203 | (4) |
|
Preventing Buffer Overflows |
|
|
207 | (1) |
|
Ensuring Efficient Transfers |
|
|
208 | (1) |
|
|
209 | (5) |
|
|
209 | (1) |
|
Monitoring and Controlling the Signals |
|
|
209 | (5) |
|
|
214 | (4) |
|
|
214 | (1) |
|
|
214 | (4) |
|
|
218 | (1) |
|
Structuring an Application |
|
|
218 | (11) |
|
Defining a ComPorts Class |
|
|
218 | (3) |
|
Setting Parameters with Combo Boxes |
|
|
221 | (3) |
|
Defining Application-specific Events |
|
|
224 | (5) |
|
Ports for Embedded Systems |
|
|
229 | (38) |
|
A Microcontroller Serial Port |
|
|
229 | (2) |
|
|
230 | (1) |
|
|
230 | (1) |
|
|
231 | (10) |
|
Configuring and Accessing the Port |
|
|
231 | (3) |
|
|
234 | (3) |
|
|
237 | (2) |
|
|
239 | (2) |
|
|
241 | (21) |
|
|
241 | (2) |
|
|
243 | (1) |
|
|
244 | (9) |
|
|
253 | (3) |
|
|
256 | (6) |
|
|
262 | (5) |
|
|
263 | (1) |
|
|
263 | (1) |
|
|
263 | (4) |
|
|
267 | (14) |
|
|
267 | (5) |
|
Steps in Exchanging a Message |
|
|
268 | (1) |
|
|
268 | (2) |
|
|
270 | (1) |
|
|
271 | (1) |
|
|
272 | (9) |
|
|
272 | (1) |
|
|
272 | (1) |
|
|
273 | (1) |
|
Defining a Message Format |
|
|
273 | (1) |
|
|
274 | (7) |
|
|
281 | (36) |
|
|
281 | (2) |
|
|
281 | (2) |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
284 | (3) |
|
|
284 | (2) |
|
|
286 | (1) |
|
|
287 | (4) |
|
Configuring the Driver-enable Line |
|
|
287 | (1) |
|
|
288 | (3) |
|
|
291 | (26) |
|
|
291 | (12) |
|
|
303 | (14) |
|
|
317 | (8) |
|
|
317 | (4) |
|
Assigning a Driver on the Host |
|
|
318 | (1) |
|
|
318 | (1) |
|
|
319 | (1) |
|
|
319 | (1) |
|
|
320 | (1) |
|
|
320 | (1) |
|
|
321 | (4) |
|
|
321 | (1) |
|
|
322 | (1) |
|
|
323 | (2) |
|
Using Special-function USB Controllers |
|
|
325 | (10) |
|
|
326 | (4) |
|
Serial Interface (FT232R) |
|
|
326 | (2) |
|
Parallel Interface (FT245R) |
|
|
328 | (1) |
|
|
329 | (1) |
|
|
330 | (5) |
|
|
330 | (1) |
|
Adding Vendor-specific Data |
|
|
330 | (1) |
|
Implementing a Virtual COM Port |
|
|
331 | (1) |
|
Converting from RS-232 to USB |
|
|
332 | (3) |
|
Using Generic USB Controllers |
|
|
335 | (21) |
|
The Communication Devices Class |
|
|
335 | (4) |
|
|
336 | (1) |
|
|
336 | (2) |
|
|
338 | (1) |
|
|
338 | (1) |
|
Using the Abstract Control Model |
|
|
339 | (7) |
|
|
339 | (1) |
|
|
340 | (1) |
|
|
341 | (3) |
|
|
344 | (1) |
|
|
345 | (1) |
|
Descriptors and INF Files |
|
|
346 | (10) |
|
|
346 | (1) |
|
|
346 | (5) |
|
Communication Class Interface Descriptors |
|
|
351 | (2) |
|
Data Class Interface Descriptors |
|
|
353 | (2) |
|
|
355 | (1) |
|
|
356 | (1) |
|
|
356 | |