Browse Source

editing and figures

Ondřej Hruška 1 year ago
parent
commit
58212184ba
Signed by: Ondřej Hruška <ondra@ondrovo.com> GPG key ID: 2C5FD5035250423D

+ 35 - 9
ch.existing_solutions.tex View File

@@ -4,7 +4,13 @@ The idea of making it easier to interact with low level hardware from a PC is no
4 4
 
5 5
 \section{Bus Pirate}
6 6
 
7
-\todo[inline]{pictures}
7
+\begin{figure}[H]
8
+	\centering
9
+	\includegraphics[width=0.6\textwidth] {img/buspirate.jpg}
10
+	\caption{\label{fig:buspirate}Bus Pirate v.4 (picture by \textit{Seeed Studio})}
11
+\end{figure}
12
+
13
+\todo[inline]{link to pic source page}
8 14
 
9 15
 %http://dangerousprototypes.com/blog/about/
10 16
 
@@ -18,7 +24,11 @@ The board is based on a PIC16 microcontroller running at 32\,MHz. Its analog/dig
18 24
 
19 25
 \section{Raspberry Pi}
20 26
 
21
-\todo[inline]{link, pictures}
27
+\begin{figure}[H]
28
+	\centering
29
+	\includegraphics[width=0.6\textwidth] {img/rpi2.jpg}
30
+	\caption{\label{fig:rpi2}Raspberry Pi 2 (picture by \textit{Raspberry Pi Foundation})}
31
+\end{figure}
22 32
 
23 33
 The Raspberry Pi's GPIO header, which can be directly controlled by user applications, was one of the primary inspirations behind GEX. It can be controlled using C and Python (among others) and offers general purpose I\O, SPI, I2C, UART and PWM, with other protocols being easy to emulate thanks to the high speed of the system processor.
24 34
 
@@ -28,13 +38,29 @@ The Raspberry Pi could be used for the same quick evaluations or experiments we
28 38
 
29 39
 \section{Professional DAQ Modules}
30 40
 
31
-Various professional tools that would fulfill our needs exist on the market, but their high price makes them inaccessible for users with a limited budget, such as hobbyists or students who would like to keep such a device for personal use. An example is the National Instruments "I²C/SPI Interface Device", which also includes several GPIO lines, or some of the Total Phase I²C/SPI gadgets which sell for about \$300 a piece. 
32
-
33
-The performance GEX can provide may be inferior to those professional tools, but in many cases it'll be a sufficient substitute at a fraction of the cost.
34
-
35
-\todo[inline]{http://www.ni.com/en-gb/shop/select/i2c-spi-interface-device} 
36
-
37
-\todo[inline]{pictures}
41
+Various professional tools that would fulfill our needs exist on the market, but their high price makes them inaccessible for users with a limited budget, such as hobbyists or students who would like to keep such a device for personal use. An example is the National Instruments (NI) "I²C/SPI Interface Device" which also includes several GPIO lines, the NI USB DAQ module, or some of the Total Phase I²C/SPI gadgets (figure \ref{fig:profidaq}). The performance GEX can provide may not always match that of those professional tools, but in many cases it'll be a sufficient substitute at a fraction of the cost.
42
+
43
+\begin{figure}
44
+	\centering
45
+	\begin{subfigure}{.5\textwidth}
46
+		\centering
47
+		\includegraphics[width=.8\linewidth]{img/ni-i2c-device.jpg}
48
+		\caption{NI I²C/SPI Interface Device}
49
+	\end{subfigure}%
50
+	\begin{subfigure}{.5\textwidth}
51
+		\centering
52
+		\includegraphics[width=.8\linewidth]{img/nidaq.jpg}
53
+		\caption{NI USB DAQ module}
54
+	\end{subfigure}
55
+	\begin{subfigure}{.5\textwidth}
56
+		\centering
57
+		\includegraphics[width=.8\linewidth]{img/total-phase-spi-i2c.jpg}
58
+		\caption{Total Phase SPI/I²C Host "Aardwark"}
59
+	\end{subfigure}
60
+	\caption[Professional tools that GEX can replace]{\label{fig:profidaq}An example of professional tools that GEX could replace in less demanding scenarios (pictures taken from marketing materials)}
61
+\end{figure}
62
+
63
+%http://www.ni.com/en-gb/shop/select/i2c-spi-interface-device}
38 64
 
39 65
 \section{The Firmata Protocol}
40 66
 

+ 1 - 1
ch.fat16.tex View File

@@ -1,3 +1,3 @@
1
-\chapter{The FAT16 Filesystem and Its Emulation}
1
+\chapter{The FAT16 Filesystem and Its Emulation} \label{sec:fat16}
2 2
 
3 3
 ...

+ 19 - 7
ch.introduction.tex View File

@@ -2,23 +2,35 @@
2 2
 
3 3
 Prototyping, design evaluation and the measurement of physical properties in experiments make a daily occurrence in the engineering praxis. Those tasks typically involve the generation and sampling of electrical signals coming to and from sensors, actuators, and other circuitry. 
4 4
 
5
-In the recent years a wide range of intelligent sensors became available thanks to the drive for miniaturization in the consumer electronics industry. Those devices often provide a sufficient accuracy and precision while keeping the circuit complexity and cost low. In contrast to analog sensors, here the signal conditioning and processing circuits are built into the sensor itself and we interface it using a digital connection.
5
+In the recent years a wide range of intelligent sensors became available thanks to the drive for miniaturization in the consumer electronics industry. Those devices often provide a sufficient accuracy and precision while keeping the circuit complexity and cost low. In contrast to analog sensors, here the signal conditioning and processing circuits are built into the sensor itself and we access it using a digital connection.
6 6
 
7
-It's natural that we'd want to communicate with those integrated sensors from our computers and laptops to perform experiments or even to just get familiar with the particular device before using it in a project. It's also convenient to have a direct access to hardware, be it analog signal sampling, generation, or even just logic level inputs and outputs. However, the drive for miniaturization and the advent of USB (Universal Serial Bus) lead to the disappearance of low level computer ports, such as the printer port (LPT), that would provide an easy way of doing so.
7
+\begin{figure}[H]
8
+	\centering
9
+	\includegraphics[width=0.8\textwidth] {img/inteligent-sensors.jpg}
10
+	\caption[A collection of intelligent sensors and devices]{A collection of intelligent sensors and devices, most on breadboard adapters: (from top left) a waveform generator, a gesture detector, a LoRa and two Bluetooth modules, an air quality and pressure sensor, a CO$_2$ sensor, a digital compass, an accelerometer, a GPS module, a camera, an ultrasonic range finder, a humidity sensor, a 1-Wire thermometer, a color detector and an RGB LED strip.}
11
+\end{figure}
8 12
 
9
-Today, when one wants to perform some measurements using a digital sensor, the usual route is to implement an embedded firmware for a microcontroller that connects to the PC through USB, or perhaps just shows the results on a display. This approach has some advantages, but is time-consuming and requires knowledge entirely unrelated to the measurements we wish to perform. It would be advantageous to have a way to interface hardware without having to burden ourselves with the technicalities of the connection, even at the cost of lower performance compared to a specialized device or a professional tool. 
13
+To conduct experiments with those integrated modules, or even just familiarize ourselves with a device before using it in a project, we need a way to easily interact with them. It's also convenient to have a direct access to hardware, be it analog signal sampling, generation, or even just logic level inputs and outputs. However, the drive for miniaturization and the advent of USB (Universal Serial Bus) lead to the disappearance of low level computer ports, such as the printer port (LPT), that would provide an easy way of doing so.
10 14
 
11
-The design and implementation of such a universal instrument is the object of this work. For technical reasons, such as naming the source code repositories, we need a name for the project; it'll hereafter be referred to as \textit{GEX}, originating from GPIO Expander.
15
+Today, when one wants to perform measurements using a digital sensor, the usual route is to implement an embedded firmware for a microcontroller that connects to the PC through USB, or perhaps just shows the results on a display. This approach has its advantages, but is time-consuming and requires knowledge entirely unrelated to the measurements we wish to perform. It would be advantageous to have a way to interface hardware without having to burden ourselves with the technicalities of the connection, even at the cost of lower performance compared to a specialized device or a professional tool. 
12 16
 
13
-\section{Project's Expected Outcome}
17
+The design and implementation of such a universal instrument is the object of this work. For technical reasons, such as naming the source code repositories, we need a name for the project; it'll be hereafter called \textit{GEX}, a name originating from "GPIO Expander".
14 18
 
15
-The idea behind GEX has formed over many years, and it's the author's belief that many engineers have at some point wanted to build something similar, and often did so. Indeed, several projects approaching this problem from different angles can be found on the internet; those will be presented in chapter \ref{sec:prior-art}. The aim here is to build an extensible open source platform that others could re-use and adapt to their specific needs.
19
+\section{The Project's Expected Outcome}\label{sec:expected-outcome}
20
+
21
+It's been a desire of the author to create an universal instrument connecting low level hardware to a computer for many years, and with this project it is finally being realized. Several related projects approaching this problem from different angles can be found on the internet; those will be presented in chapter \ref{sec:prior-art}. This project should not end with yet another tinkering tool that will be produced in a few prototypes and then forgotten. By building an extensible, open-source platform, GEX can become the foundation for future projects which others can expand, re-use and adapt to their specific needs.
22
+
23
+\begin{figure}[H]
24
+	\centering
25
+	\includegraphics[width=0.7\textwidth] {img/early-sketch.jpg}
26
+	\caption[An early sketch of a universal bench device]{An early (2016) sketch of a universal bench device including a power supply, electronic load, a signal generator and a bus module. The bottom half of the panel is in a large part implemented by GEX.}
27
+\end{figure}
16 28
 
17 29
 Building on the experience with earlier embedded projects, a STM32 microcontroller shall be used. Those are ARM Cortex M devices with a wide range of hardware peripherals that appear be a good fit for the project. Low-cost evaluation boards are widely available that could be used as a hardware platform instead of developing a custom PCB. In addition, those chips are relatively cheap and popular in the embedded hardware community; there's a good possibility of the project building a community around it and growing beyond what will be presented in this paper.
18 30
 
19 31
 Besides the use of existing development boards, custom PCBs will be developed in different form factors. Those could use the Arduino connector or the Raspberry Pi Zero GPIO header (and board shape) to exploit the cases and boxes available for the minicomputer on the market, as well as add-on boards (\textit{shields} and \textit{HATs}).
20 32
 
21
-The possibilities of wireless connection should be evaluated. This feature would make GEX more convenient to use when it's attached e.g. to a mobile robot or installed in poorly accessible locations.
33
+The possibilities of wireless connection should be evaluated. This feature should make GEX useful e.g. in mobile robotics or when installed in poorly accessible locations.
22 34
 
23 35
 
24 36
 

+ 54 - 12
ch.requirement_analysis.tex View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 We'll now investigate some situations where GEX could be used, to establish its requirements and desired features. 
4 4
 
5
-\subsection{\label{sec:uses-digital-ifaces}Interfacing Intelligent Modules}
5
+\subsection{Interfacing Intelligent Modules}\label{sec:uses-digital-ifaces}
6 6
 
7 7
 When adding a new digital sensor or a module to a hardware project, we want to test it first, learn how to properly communicate with it and confirm its performance. Based on this evaluation we decide whether the module matches our expectations and learn how to properly connect it, which is needed for a successful PCB layout.
8 8
 
@@ -12,23 +12,23 @@ A couple well known hardware buses have established themselves as the standard w
12 12
 
13 13
 Moving to industrial and automotive environments, we can encounter various fieldbuses, Ethernet, CAN, current loop, HART, LIN, DALI, RS485 (e.g. Modbus), mbus, PLCBUS and others. Those typically use transceiver ICs and other circuitry, such as TVS, discrete filters, galvanic isolation etc. They could be supported using add-on boards and additional firmware modules handling the protocol. For simplicity and to meet time constraints, the development of those boards and modules will be left for future expansions of the project.
14 14
 
15
-\subsection{Analog signal acquisition}
15
+\subsection{Analog Signal Acquisition}
16 16
 
17 17
 Sometimes it's necessary to use a traditional analog sensor, capture a transient waveform or to just measure a voltage. GEX was meant to focus on digital interfaces, however giving it this capability makes it much more versatile. Nearly all microcontrollers include an analog-digital converter which we can use to measure input voltages and, paired with a timer, to records signals varying in time.
18 18
 
19 19
 Certain tasks, such as capturing transient effects on a thermocouple when inserted into a flame (an example from developing fire-proof materials) demand level triggering similar to that of oscilloscopes. The converter continuously measures the input voltage and a timed capture starts only after a set threshold is exceeded. This can be accompanied by a pre-trigger feature where the timed capture is continuously running and the last sample is always compared with the threshold, recording a portion of the historic records together with the following samples.
20 20
 
21
-\subsection{Analog signal output}
21
+\subsection{Analog Signal Output}
22 22
 
23 23
 An analog signal can not only be measured, but it's often necessary to also generate it. This could serve as an excitation signal for an experiment, for instance to measure the characteristic curves of a diode or a transistor. Conveniently, we can at the same time use GEX's analog input to record the output.
24 24
 
25 25
 Generating an analog signal is possible using a pulse-width modulation (PWM) or by a dedicated digital-analog converter included in many microcontrollers. Higher frequencies or resolution can be achieved with a dedicated external IC.
26 26
 
27
-\subsection{Logic level input and output}
27
+\subsection{Logic Level Input and Output}
28 28
 
29 29
 We've covered some more advanced features, but skipped the simplest feature: a direct access to GPIO pins. Considering the latencies of USB and the PC's operating system, this can't be reliably used for "bit banging", however we can still accomplish a lot with just changing logic levels - e.g. to control character LCDs, or emulate some interfaces that include a clock line, like SPI. As mentioned in \ref{sec:uses-digital-ifaces}, many digital sensors and modules use plain GPIOs in addition to the communication bus for out-of-band signaling or features like chip selection or reset.
30 30
 
31
-\subsection{Pulse generation and measurement}
31
+\subsection{Pulse Generation and Measurement}
32 32
 
33 33
 Some sensors have a variable frequency or a pulse-width modulated (PWM) output. To capture those signals and convert them to a more useful digital value, we can use the external input functions of a timer/counter in the microcontroller. Those timers have many possible configurations and can also be used for pulse counting or a pulse train generation.
34 34
 
@@ -38,15 +38,17 @@ Some sensors have a variable frequency or a pulse-width modulated (PWM) output.
38 38
 
39 39
 USB shall be the primary way of connecting the module to a host PC. Thanks to USB's flexibility, it can present itself as any kind of device or even multiple devices at once.
40 40
 
41
-The most straightforward method of interfacing the board is by passing binary messages in a fashion similar to USART (and plain UART can be available as well). We'll need a two-way connection to enable command confirmations, query-type commands and asynchronous event reporting.
41
+The most straightforward method of interfacing the board is by passing binary messages in a fashion similar to USART (and plain UART can be available as well). We'll need a duplex connection to enable command confirmations, query-type commands and asynchronous event reporting.
42 42
 
43 43
 This is possible either using a "Virtual COM port" driver (the CDC/ACM USB class), or through a raw access to the corresponding USB endpoints. Using a raw access avoids potential problems with the operating system's driver interfering or not recognizing the device correctly; on the other hand, having GEX appear as a serial port makes it easier to integrate into existing platforms that have a good serial port support (such as National Instruments LabWindows CVI or MATLAB).
44 44
 
45
+A wireless attachment is also planned; after establishing a connection, the two-way link should work in a similar manner to UART or USB. \todo[inline]{link to where this is better explained}
46
+
45 47
 \subsection{Configuration Files}
46 48
 
47 49
 The module must be easily reconfigurable. Given the settings are almost always going to be tied on the connected external hardware, it would be practical to have an option to store them permanently in the microcontroller's non-volatile memory.
48 50
 
49
-We can load those settings into GEX using the serial interface, which also makes it possible to reconfigure it remotely when the wireless connection is used. With USB, we can also make the board appear as a mass storage device and expose the configuration as text files. This approach, inspired by ARM mbed's mechanism for flashing firmware images to development kits, avoids the need to create a configuration GUI, instead using the PC OS's built-in applications like File Explorer and Notepad. We can expose additional information, such as a README file with instructions or a pin-out reference, as separate files on the virtual disk.
51
+We can load those settings into GEX using the serial interface, which also makes it possible to reconfigure it remotely when the wireless connection is used. With USB, we can additionally make the board appear as a mass storage device and expose the configuration as text files. This approach, inspired by ARM mbed's mechanism for flashing firmware images to development kits, avoids the need to create a configuration GUI, instead using the PC OS's built-in applications like File Explorer and Notepad. We can expose additional information, such as a README file with instructions or a pin-out reference, as separate files on the virtual disk.
50 52
 
51 53
 \section{Planned Feature List}
52 54
 
@@ -68,17 +70,57 @@ Let's list the features we wish to initially support in the GEX firmware:
68 70
 		\begin{itemize}	
69 71
 			\item USB connection as virtual serial port or direct endpoint access
70 72
 			\item Connection using plain UART
71
-			\item Wireless connection
73
+			\item Wireless attachment
74
+		\end{itemize}
75
+	\item \textbf{Configuration}
76
+		\begin{itemize}
77
+			\item Fully reconfigurable, temporarily or permanently
78
+			\item Settings stored in INI files
79
+			\item File access through the communication API or using a virtual mass storage
72 80
 		\end{itemize}
73
-	\item Reconfiguration using INI files, accessed through the API or using a virtual mass storage
74 81
 \end{itemize}
75 82
 
76
-\section{Microcontroller selection}
83
+\section{Microcontroller Selection}
77 84
 
78
-The STM32F072 microcontroller was chosed for the built prototypes and the initial firmware, owning to it's low cost, advanced peripherals and the availability of development boards. GEX can be later ported to other MCUs, like the STM32L072, STM32F103 or STM32F303. 
85
+The STM32F072 microcontroller was chosen for the built prototypes and the initial firmware, owning to it's low cost, advanced peripherals and the availability of development boards. GEX can be later ported to other MCUs, like the STM32L072, STM32F103 or STM32F303. 
79 86
 
80 87
 The STM32F072 is a Cortex M0 device with 128\,KiB of flash memory, 16\,KiB of RAM and running at 48\,MHz. It is equipped with a USB Full Speed peripheral block, a 12-bit ADC and DAC, a number of general purpose timers/counters, SPI, I$^2$C, and USART peripherals, among others. It supports crystal-less USB, using the USB SOF packet for synchronization of the internal 48\,MHz RC oscillator; naturally, a real crystal resonator will provide better timing accuracy.
81 88
 
82 89
 To effectively utilize the time available for this work, only the STM32F072 firmware will be developed while making sure the planned expansion is as straightforward as possible.
83 90
 
84
-\todo[inline]{info about form factor choices + some sketches}
91
+\section{Form Factor Considerations}
92
+
93
+It was mentioned in \ref{sec:expected-outcome} that, while the GEX firmware can be used with existing evaluation boards from ST Microelectronics (figure \ref{fig:discovery}), we wish to design and realize a few custom hardware prototypes that will be smaller, more convenient to use and hopefully also cheaper. Three possible form factors are drawn in figure \ref{fig:ff-sketches}.
94
+
95
+Several factors play a role when deciding what the GEX PCB should look like:
96
+
97
+The device must be comfortable and easy to use, which affects the choice of the USB connector, also with respect to cable availability: USB type A is not suitable for desktop computers where it would have to be plugged in the rear of the computer or in the front panel, but it may be usable with laptops; USB Mini-B and Micro-B connectors are both a popular choice in existing kits (e.g. Discovery and Nucleo boards), but Micro-B has a higher rated number of insertions and the cables are ubiquitous thanks to their use in mobile phones, therefore this appears to be the better connector choice. \todo{link to the insertion count spec}
98
+
99
+The PCB size should be kept minimal to save manufacturing costs. When a standard connector shape and a pin assignment are used we gain the ability to install existing add-on boards designed for other platforms, like the Arduino or Raspberry Pi. Lastly, when the entire board shape is copied from an existing commercial product for which we can buy official or after-market cases, we get an easy access to cases without having to design them ourselves. This is the case of the Raspberry Pi Zero form factor.
100
+
101
+\begin{figure}
102
+	\centering
103
+	\includegraphics[width=0.9\textwidth] {img/disco072.jpg}
104
+	\caption[A Discovery board with STM32F072]{\label{fig:discovery}A Discovery board with STM32F072 that can be used to run the GEX firmware}
105
+\end{figure}
106
+
107
+
108
+\begin{figure}
109
+	\centering
110
+	\includegraphics[width=\textwidth] {img/gex-ff-sketches.png}
111
+	\caption[Form factor sketches]{\label{fig:ff-sketches}A sketch of three possible form factors for the GEX hardware prototype. Note the ESP8266 module which was considered as an option for wireless access but was eventually not used due to it's high current usage, unsuitable for battery operation.}
112
+\end{figure}
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+

+ 21 - 10
ch.usb.tex View File

@@ -1,12 +1,24 @@
1 1
 \chapter{Universal Serial Bus}
2 2
 
3
-This chapter presents an overview of the \textit{Universal Serial Bus} (USB) \textit{Full Speed} interface, with focus on the features used in the GEX firmware. USB is a versatile but complex interface, thus explaining it in its entirety is beyond the scope of this text. References to external materials which explain the protocol in greater detail will be provided for the interested reader.\todo{add those refs}
3
+This chapter presents an overview of the \textit{Universal Serial Bus} (USB) \textit{Full Speed} interface, with focus on the features used in the GEX firmware. USB is a versatile but complex interface, thus explaining it in its entirety is beyond the scope of this text. References to external material which explains the protocol in greater detail will be provided where appropriate.\todo{add those refs}
4
+
5
+\begin{figure}[H]
6
+	\centering
7
+	\includegraphics[width=0.8\textwidth] {img/usb-hierarchy.png}
8
+	\caption{\label{fig:usb-hierarchy}A diagram from the USB specification rev. 1.1 showing the hierarchical structure of the USB bus; The PC (Host) controls the bus and initiates all transactions.}
9
+\end{figure}
4 10
 
5 11
 \section{Basic Principles and Terminology}
6 12
 
7
-\todo[inline]{add a diagram of the hierarchical topology}
13
+\todo[inline]{review and correct inaccuracies}
8 14
 
9
-USB is a hierarchical bus with a single master (\textit{host}) and multiple slave devices. A USB device that provides functionality to the host is called a \textit{function}. Communication between the host and a function is organized into virtual channels called \textit{pipes}. Each pipe is identified by an \textit{endpoint} number. 
15
+USB is a hierarchical bus with a single master (\textit{host}) and multiple slave devices. A USB device that provides functionality to the host is called a \textit{function}. Communication between the host and a function is organized into virtual channels called \textit{pipes}. Each pipe is identified by an \textit{endpoint} number.
16
+
17
+\begin{figure}[H]
18
+	\centering
19
+	\includegraphics[width=\textwidth] {img/usb-structure.png}
20
+	\caption{\label{fig:usb-logical}A detailed view of the host-device connection (\textit{USB specification rev. 1.1})}
21
+\end{figure}
10 22
 
11 23
 Endpoints can be either unidirectional or bidirectional; the direction from the host to a function is called \textit{OUT}, the other direction (function the host) is called IN. A bidirectional endpoint is technically composed of a IN and OUT endpoint with the same number. All transactions (both IN and OUT) are initiated by the host; functions have to wait for their turn. Endpoint 0 is bidirectional, always enabled, and serves as a \textit{control endpoint}. The host uses the control endpoint to read information about the device and configure it as needed.
12 24
 
@@ -25,9 +37,7 @@ The function's endpoints are grouped into \textit{interfaces}. An interface desc
25 37
 
26 38
 \todo[inline]{add reference to the document}
27 39
 
28
-\todo[inline]{fix: massive gap here}
29
-
30
-\todo[inline]{function - https://technet.microsoft.com/en-us/library/cc939102.aspx}
40
+% function - https://technet.microsoft.com/en-us/library/cc939102.aspx}
31 41
 
32 42
 \newpage
33 43
 \input{fig.gex-descriptors}
@@ -57,7 +67,7 @@ USB revisions are, where possible, backwards compatible, often even keeping the
57 67
 
58 68
 \begin{figure}
59 69
 	\centering
60
-	\includegraphics[width=\textwidth]{img/usb-pullup-fs.png}
70
+	\includegraphics[width=.8\textwidth]{img/usb-pullup-fs.png}
61 71
 	\caption{\label{fig:usb-pullup-fs}Pull-up and pull-down resistors of a Full Speed function, as prescribed by the USB specification rev. 2.0}
62 72
 \end{figure}
63 73
 
@@ -70,12 +80,13 @@ The V$_\mathrm{BUS}$ line supplies power to \textit{bus-powered} devices. \texti
70 80
 
71 81
 \section{USB Classes}
72 82
 
73
-This section explains the Mass Storage class and the CDC/ACM class that are used in the GEX firmware. A list of all standard classes with a more detailed explanation can be found in \todo{link to the ref manual}.
83
+This section explains the Mass Storage class and the CDC/ACM class that are used in the GEX firmware. A list of all standard classes with a more detailed explanation can be found on the USB.org website at \url{http://www.usb.org/developers/defined\_class}.
74 84
 
75 85
 \subsection{Mass Storage Class}
76 86
 
77 87
 The Mass Storage class (MSC) is supported by all modern operating systems (MS Windows, MacOS, GNU/Linux, FreeBSD etc.) to support thumb drives, external disks, memory card readers and other storage devices.
78
-\todo[inline]{links}
88
+
89
+\todo[inline]{references}
79 90
 %http://www.usb.org/developers/docs/devclass_docs/Mass_Storage_Specification_Overview_v1.4_2-19-2010.pdf
80 91
 %http://www.usb.org/developers/docs/devclass_docs/usbmassbulk_10.pdf
81 92
 
@@ -95,7 +106,7 @@ The command set's commands let the host read information about the attached stor
95 106
 
96 107
 The MSC class together with the SCSI command set are implemented in a USB Device library provided by ST Microelectronics. The library also includes a basic CDC/ACM implementation (see below).
97 108
 
98
-In order to emulate a mass storage device without having a physical storage medium, we need to generate and parse the filesystem on-the-fly as the host OS tries to access it. This will be discussed in chapter ??\todo{chapter num}.
109
+In order to emulate a mass storage device without having a physical storage medium, we need to generate and parse the filesystem on-the-fly as the host OS tries to access it. This will be discussed in chapter \ref{sec:fat16}.
99 110
 
100 111
 \subsection{CDC/ACM Class} \label{sec:cdc-acm}
101 112
 

+ 1 - 0
ctuth-pkg.tex View File

@@ -9,6 +9,7 @@
9 9
 % it heavily depends on l2e packages, and we decided not to mix the code together too much.
10 10
 
11 11
 \RequirePackage{lmodern}
12
+%\RequirePackage{cfr-lm}
12 13
 \RequirePackage[T1]{fontenc}
13 14
 \RequirePackage{microtype}
14 15
 \RequirePackage{graphicx}

+ 3 - 0
document_config.tex View File

@@ -13,6 +13,7 @@
13 13
 \usepackage{titlecaps}
14 14
 \usepackage{cprotect}
15 15
 \usepackage{framed}
16
+\usepackage{subcaption}
16 17
 
17 18
 \usepackage{bigfoot} % verbatin in footnote
18 19
 
@@ -22,6 +23,8 @@
22 23
 \newcommand{\VperA}{\V/\A}
23 24
 
24 25
 %nobreak dash
26
+%\usepackage{lmodern}
27
+%\usepackage{cfr-lm}
25 28
 
26 29
 
27 30
 \usepackage[style=numeric,backend=biber,sorting=none]{biblatex}

+ 1 - 1
fig.gex-descriptors.tex View File

@@ -134,5 +134,5 @@ Device Descriptor:
134 134
 \end{verbatim}
135 135
 \end{minipage}\vspace{-1em}
136 136
 \begin{figure}[H]
137
-	\cprotect\caption{USB descriptors of a GEX prototype, read using \verb|lsusb -vd vid:pid|}
137
+	\cprotect\caption{USB descriptors of a GEX prototype obtained using \verb|lsusb -vd vid:pid|}
138 138
 \end{figure}

BIN
img/buspirate.jpg View File


+ 3 - 0
img/buspirate.txt View File

@@ -0,0 +1,3 @@
1
+https://www.seeedstudio.com/Bus-Pirate-v4-p-740.html
2
+Bus Pirate v.4
3
+Seeed Studio

BIN
img/disco072.jpg View File


BIN
img/early-sketch.jpg View File


BIN
img/gex-ff-sketches.png View File


BIN
img/inteligent-sensors.jpg View File


BIN
img/ni-i2c-device.jpg View File


+ 3 - 0
img/ni-i2c-device.txt View File

@@ -0,0 +1,3 @@
1
+pic   https://s7d5.scene7.com/is/image/ni/08301212?$ni-card-lg$
2
+page  https://www.ni.com/en-gb/shop/select/i2c-spi-interface-device
3
+National Instruments

BIN
img/nidaq.jpg View File


+ 3 - 0
img/nidaq.txt View File

@@ -0,0 +1,3 @@
1
+http://www.ni.com/en-gb/support/model.usb-6008.html
2
+National Instruments
3
+NI daq

BIN
img/rpi2.jpg View File


+ 4 - 0
img/rpi2.txt View File

@@ -0,0 +1,4 @@
1
+img   https://www.raspberrypi.org/app/uploads/2015/01/Pi2ModB1GB_-comp.jpeg
2
+page  https://www.raspberrypi.org/blog/raspberry-pi-2-on-sale/
3
+Raspberry PI 2
4
+RASPBERRY PI FOUNDATION

BIN
img/total-phase-spi-i2c.jpg View File


BIN
img/usb-hierarchy.png View File


+ 2 - 0
img/usb-hierarchy.txt View File

@@ -0,0 +1,2 @@
1
+Hubs in a Desktop Computer Environment
2
+USB spec

BIN
img/usb-logical.png View File


+ 2 - 0
img/usb-logical.txt View File

@@ -0,0 +1,2 @@
1
+USB Interlayer Communications Model
2
+the usb spec

BIN
img/usb-structure.png View File


+ 1 - 0
img/usb-structure.txt View File

@@ -0,0 +1 @@
1
+USB structure, ushb spec rev. 1.1

BIN
thesis.pdf View File