summaryrefslogtreecommitdiff
path: root/ir
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2014-08-26 20:50:23 -0300
committerWerner Almesberger <werner@almesberger.net>2014-08-26 20:50:23 -0300
commitcd2fcbcfd9f0793061868c9f8a08cafd4e583234 (patch)
tree57cd6895685302f276244e77749d3c541c489228 /ir
parent44e23ebee61cfb0cb7ac92cd4324838589ee591b (diff)
downloadmisc-cd2fcbcfd9f0793061868c9f8a08cafd4e583234.tar.gz
misc-cd2fcbcfd9f0793061868c9f8a08cafd4e583234.tar.bz2
misc-cd2fcbcfd9f0793061868c9f8a08cafd4e583234.zip
ir/ir.tex: more corrections
Some style improvements and typos. Larger changes: Section "Combined characteristics" - correct the lowest signal frequency: instead of 20 kHz, it can be as low as 0.9 kHz (IR-UART, 9.6 kbps, 8 bits with parity) Section "IR-UART mode" - correct description of TX/RX use - leave decision open whether LED current is always limited to <= continuous forward current or only constrained by the current-limiting circuit (i.e., one may get variable intensity during a transmission) Section "Mode summary" - new
Diffstat (limited to 'ir')
-rw-r--r--ir/filter.fig2
-rw-r--r--ir/ir.tex121
2 files changed, 71 insertions, 52 deletions
diff --git a/ir/filter.fig b/ir/filter.fig
index cedfb80..d176f15 100644
--- a/ir/filter.fig
+++ b/ir/filter.fig
@@ -46,7 +46,7 @@ Single
2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3150 4725 3150 5220
3 2 0 2 0 7 50 -1 -1 0.000 0 0 0 3
- 5397 6623 5440 6458 5535 6435
+ 5397 6623 5436 6465 5535 6435
0.000 -1.000 0.000
3 2 0 2 0 7 50 -1 -1 0.000 0 0 0 3
5310 5985 5392 5829 5535 5805
diff --git a/ir/ir.tex b/ir/ir.tex
index f1170e4..6535653 100644
--- a/ir/ir.tex
+++ b/ir/ir.tex
@@ -54,9 +54,10 @@ components:
\begin{center}
\includegraphics[scale=0.9]{sys.pdf}
\end{center}
-
-The signal named bq.GPIO determines the configuration after CPU reset and
-is described in section \ref{reset}.
+%
+The signal named bq.GPIO determines the configuration after CPU reset but
+may also be used in other system states. It is described in section
+\ref{reset}.
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -64,7 +65,7 @@ is described in section \ref{reset}.
\label{modes}
The IR subsystem supports both CIR and
-IrDA operation. In CIR mode, it can also receive incoming
+IrDA operation. In CIR mode, it can receive incoming
IR signals and thus act as a ``learning'' remote control.
Furthermore, the IR transceiver can be configured to send and receive
unmodulated data from the UART. We call this ``IR-UART'' mode
@@ -82,11 +83,11 @@ reception, and finally IrDA.
Likewise, since the IR data path is shared between CPU and Hackerbus,
conflicting configurations are possible. Their resolution is described
-in section \ref{conflict}.
+in sections \ref{conflict} and \ref{undriven}.
-Note that we don't consider IR-UART reception and SIR to be important
+Note that we don't consider IR-UART reception and IrDA to be very important
features. If their implementation should prove to be overly troublesome,
-there could therefore be omitted.
+they could therefore be omitted.
% -----------------------------------------------------------------------------
@@ -187,7 +188,7 @@ Parameter & Value & Unit \\
\hline
Wavelength & 940 & nm & transmit \\
& 850--950 & nm & receive \\
-Frequency & 20--312 & kHz \\
+Frequency & 0.9--312 & kHz \\
Beam angle & $\ge 50$ & $\hbox to 0pt{}\degree$ \\
\end{tabular}
\end{tab}
@@ -201,7 +202,7 @@ of consumer devices and therefore cannot specify the minimum
radiant intensity of the transmitter, we expect performance of the
IR transmitter to be on par with the average TV remote control.
For comparison, the N900 has a range of only approximately 2 m, which
-we would consider unacceptable.
+we would consider too short.
% Expected range
%
@@ -216,8 +217,8 @@ we would consider unacceptable.
% Jul 07 23:29:55 <DocScrutinizer05> 300mA pulsed sounds good
In order to improve its range, the transmitter should be driven with as
-high a current as reasonably possible. This current would be well above
-the permissible continuous forward current In CIR and IrDA mode. Note
+high a current as reasonably possible. In CIR and IrDA mode, this current
+would be well above the permissible continuous forward current. Note
that incorrect use could cause the IR LED to overheat and the energy of
a pulse therefore has to be limited. We discuss this in section \ref{overload}.
@@ -236,7 +237,8 @@ a pulse therefore has to be limited. We discuss this in section \ref{overload}.
% RX, via proper signal shaping/filtering.
% and possibly also to audio-in
-On the receiving side, the signal should go through a high-pass filter with
+On the receiving side, the signal should in CIR or IrDA mode go through a
+high-pass filter with
a cutoff frequency of about 20 kHz and then be shaped into a digital
signal for the RX line. The unfiltered analog signal should also be sent to
an unused input of the audio codec. We have no further specification for the
@@ -245,7 +247,7 @@ analog signal from the IR sensor at this time.
\begin{center}
\includegraphics[scale=0.9]{filter.pdf}
\end{center}
-
+%
Given that IR-UART can have very long high or low pulses, a high-pass
filter with a much lower cut-off frequency has to be used when IR-UART mode
is selected. A cut-off frequency of about 1--100 Hz should be sufficient
@@ -275,8 +277,8 @@ for DC blocking. The figure above illustrates the concept.
The IR subsystem can be configured for several different modes of operation.
The following sections detail the various configurations.
-The following sections show the configuration of both the transmitter and
-the receiver. In many real-life situations, only one direction will be
+In each case the configuration of both the transmitter and the receiver
+is shown. In many real-life situations, only one direction will be
used at a time while the other is deactivated. A deactivated transmitter
or receiver should behave as described in section \ref{off}.
@@ -337,7 +339,7 @@ active & to be defined & defined by controls \\
\end{tabular}
\end{tab}%
%
-Use of the data signals in IR-UART mode is is further explained in
+Use of the data signals in IR-UART mode is further explained in
section \ref{cfg:iruart}.
Note that Hackerbus can override the receiver and the CPU can therefore
boot from (wired) UART even if the IR-UART configuration is selected.
@@ -366,7 +368,8 @@ for transmit data.
The CIR module in the CPU could also use RTS for configuration purposes,
but we seem to have no use for this and the IR circuit must ignore its
state.
-The use of RX in CIR mode is not specified and it seems safe to use it
+The use of RX in CIR mode is not clearly specified and it seems safe to
+use it
similar to IrDA mode.
TX is not used and can be assigned to other tasks. The IR circuit must
therefore ignore the state of TX when in CIR mode.
@@ -381,7 +384,9 @@ CIR mode configuration is illustrated in the following drawing:
\subsection{IrDA mode}
In IrDA (SIR) mode, the CPU uses TX as active-high output and RX as
-active-low input. RTS could again be used for configuration but is not
+either\footnote{Depending on the setting of MDR2\_REG.RRXINVERT.}
+active-low or active-high input.
+RTS could again be used for configuration but is not
relevant in our application. CTS is not used in IrDA mode.
The IR circuit must therefore ignore the state of RTS and CTS when in
IrDA mode.
@@ -396,10 +401,13 @@ IrDA mode configuration is illustrated in the following drawing:
\subsection{IR-UART mode}
\label{cfg:iruart}
-IR-UART mode is identical to IrDA mode as far as the use of UART
-signals is concerned. One important difference is that the IR LED
-driver must be configured to operate at a current that does not exceed
+In IR-UART mode, TX and RX both are active-low. RTS and CTS are not used.
+
+The IR LED driver may be configured
+to operate at a current that does not exceed
the LED's maximum continuous forward current.
+In any case, power dissipation must be controlled as described in section
+\ref{overload}.
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -407,7 +415,7 @@ the LED's maximum continuous forward current.
The IR subsystem is inactive in UART mode and must behave as described
in section \ref{off}.
-While we call this ``UART mode'', this configuration
+While we call it ``UART mode'', this configuration
applies to any setup where the UART signals are used for some form of
communication with the Hackerbus that does not involve IR.
@@ -418,30 +426,40 @@ UART mode configuration is illustrated in the following drawing:
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-% \subsection{Mode summary}
-%
-% \def\unspec{---}
-% \def\outpos{$\stackrel{\strut\sqcap}{\longrightarrow}$}
-% \def\outneg{$\stackrel{\strut\sqcup}{\longrightarrow}$}
-% \def\inppos{$\stackrel{\strut\sqcap}{\longleftarrow}$}
-% \def\inpneg{$\stackrel{\strut\sqcup}{\longleftarrow}$}
-%
-% The following table summarizes the configuration of the I/O pins at
-% the CPU in the various IR modes. $\longrightarrow$ indicates a signal from
-% CPU or Hackerbus to the IR
-%
-%
-% \begin{tab}
-% \begin{tabular}{l|ccccc}
-% Signal & \multicolumn{5}{c}{Mode} \\
-% & Off & CIR & IrDA & IR-UART & UART \\
-% \hline
-% TX & \unspec & \outpos \\
-% CTS & \unspec &
-% RTS & \unspec &
-% RX & \unspec &
-% \end{tabular}
-% \end{tab}
+\subsection{Mode summary}
+
+\def\unspec{---}
+\def\outpos{$\stackrel{\strut\sqcap}{\longrightarrow}$}
+\def\outneg{$\stackrel{\strut\sqcup}{\longrightarrow}$}
+\def\inppos{$\stackrel{\strut\sqcap}{\longleftarrow}$}
+\def\inpneg{$\stackrel{\strut\sqcup}{\longleftarrow}$}
+\def\inpeit{$\stackrel{\strut\sqcup/\sqcap}{\longleftarrow}$}
+\def\outany{$\longrightarrow$}
+\def\inpany{$\longleftarrow$}
+\def\posact{$\sqcap$}
+\def\negact{$\sqcup$}
+\def\eitact{$\sqcup/\sqcap$}
+
+The following table summarizes the configuration of the I/O pins at
+the CPU in the various IR modes:
+
+\begin{tab}
+\begin{tabular}{l|ccccc}
+Signal & \multicolumn{5}{c}{IR subsystem mode} \\
+ & Off & CIR & IrDA & IR-UART & UART \\
+\hline
+TX & \unspec & \unspec & \outpos & \outneg & \outneg \\
+CTS & \unspec & \outpos & \unspec & \unspec & \inpneg \\
+RTS & \unspec & \unspec & \unspec & \unspec & \outneg \\
+RX & \unspec & \inpeit & \inpeit & \inpneg & \inpneg \\
+\end{tabular}
+\end{tab}
+%
+{\outany} indicates an output from
+the CPU, {\inpany} an input. An active-high signal is marked with
+{\posact} while an active-low signal is marked with {\negact}. A
+signal where the CPU can be configured for either polarity it marked
+with {\eitact}. An unused signal is marked with {\unspec}.
% -----------------------------------------------------------------------------
@@ -505,8 +523,8 @@ not have to rely on external filtering and shielding.
We considered the use of a phototransistor, but found that the readily
available SMT parts all had rise and fall times in the order of 15 $\mu$s,
-which would limit the maximum signal frequency to only about 30 kHz,
-and did not allow improving their response by biasing the transistor.
+which would limit the maximum signal frequency to only about 30 kHz.
+They do not allow improving response time by biasing the transistor.
% -----------------------------------------------------------------------------
@@ -560,16 +578,17 @@ behaviour and should be avoided. Conflict increases overall power
consumption and should be avoided during normal system operation.
Precedence is established by series resistors next to the CPU for TX and
-CTS, and a series resistor on the digital output of the IR sensor,
+CTS, and a series resistor on the digital output of the IR receiver,
before entering the RX line.
% -----------------------------------------------------------------------------
\section{Undriven signals}
+\label{undriven}
The IR circuit must be tolerant to a UART signal being driven by neither
CPU, Hackerbus, or the IR receiver. Whether this tolerance is achieved by
-pulling the signal to a safe state or by implementing a more general
+pulling the signal to a safe state or by applying a more general
protection against incorrect inputs is left as an implementation choice.
Control signals that float after CPU reset and that are not ignored by the
@@ -597,7 +616,7 @@ transmitter to cool down between bursts or pulses, the circuit should not
rely on software always
setting up things correctly. Also, the IR-UART protocol can have duty cycles
of up to 91\% and would require special handling.\footnote{One possible use
-of IR-UART it to output kernel diagnostics. This sort of text would have a
+of IR-UART is to output kernel diagnostics. This sort of text would have a
duty cycle of about 50--60\% if sent as 8 bit characters with a start and a
stop bit each and the LED lit during every ``0'' bit.}