GEX thesis source code, full text, references

ch.unit.sipo.tex 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. \section{SIPO (Shift Register) Unit}
  2. The shift registers driver unit is designed for the loading of data into \gls{SIPO} shift registers, such as 74xx4094 or 74xx595. These are commonly used to control segmented \gls{LED} displays, \gls{LED} user interfaces, etc.
  3. \noindent
  4. A SIPO shift register has the following digital pins:
  5. \begin{itemize}[itemsep=0pt]
  6. \item \textit{Shift} -- \gls{SCK}; shifts the data in the register by one bit
  7. \item \textit{Data In} -- \gls{MOSI}; serial data to load into the register
  8. \item \textit{Data Out} -- output for daisy-chaining with other shift registers
  9. \item \textit{Store} -- latches the current register data and shows it at the outputs
  10. \item \textit{Clear} -- erases the latched data and clears the display
  11. \end{itemize}
  12. This unit automatically handles both the \textit{Shift} and \textit{Store} signals, provides access to the \textit{Clear} output, and is capable of loading multiple shift registers in parallel (an arrangement sometimes used instead of daisy-chaining). The polarity (active level) of all signals can be configured.
  13. It is, additionally, possible to set the data lines to arbitrary ``idle'' level(s) before sending the \textit{Store} pulse; this may be latched and used for some additional feature on the user interface, such as a brightness control.
  14. \subsection{SIPO Configuration}
  15. \begin{inicode}
  16. [SIPO:display@9]
  17. # Shift pin & its active edge (1-rising,0-falling)
  18. shift-pin=A1
  19. shift-pol=1
  20. # Store pin & its active edge
  21. store-pin=A0
  22. store-pol=1
  23. # Clear pin & its active level
  24. clear-pin=A2
  25. clear-pol=0
  26. # Data port and pins
  27. data-port=A
  28. data-pins=3
  29. \end{inicode}
  30. \subsection{SIPO Commands}
  31. The WRITE and CLEAR\_DIRECT commands are the only ones normally used. The others provide manual control over all the output signals for debugging or testing.
  32. \begin{cmdlist}
  33. 0 & \cname{WRITE}
  34. Load the shift registers and leave the \textit{Data} outputs in the ``trailing data'' state before sending a \textit{Store} pulse.
  35. &
  36. \begin{cmdreq}
  37. \cfield{u16} trailing data (packed pins)
  38. \item For each output (same size)
  39. \begin{pldlist}
  40. \cfield{u8[]} data to load
  41. \end{pldlist}
  42. \end{cmdreq}
  43. \\
  44. 1 & \cname{DIRECT\_DATA}
  45. Directly write to the \textit{Data} pin(s)
  46. &
  47. \begin{cmdreq}
  48. \cfield{u16} values to write (packed pins)
  49. \end{cmdreq} \\
  50. 2 &
  51. \cname{DIRECT\_CLEAR}
  52. Pulse the \textit{Clear} pin & \\
  53. 3 &
  54. \cname{DIRECT\_SHIFT}
  55. Pulse the \textit{Shift} pin & \\
  56. 4 &
  57. \cname{DIRECT\_STORE}
  58. Pulse the \textit{Store} pin & \\
  59. \end{cmdlist}