You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.6 KiB

3 years ago
  1. \documentclass[11pt]{article}
  2. %Gummi|065|=)
  3. \usepackage{graphicx}
  4. \usepackage{caption}
  5. \usepackage{xcolor}
  6. \usepackage[vcentering,dvips]{geometry}
  7. \geometry{papersize={6in,9in},total={4.5in,6.8in}}
  8. \title{\textbf{}}
  9. \author{Steak Electronics}
  10. \date{}
  11. \begin{document}
  12. %\maketitle
  13. \tableofcontents
  14. \textcolor{green!60!blue!70}{
  15. \section{60Hz Divider}}
  16. \subsection{Overview}
  17. Let's count. There is a schematic in Practical Electronics For Beginners 4th edition. I've built that up, and will add some CPLD counter logic, along with a micro to output the SPI to a 7seg counter module.
  18. The goal is relative accuracy. Not absolute. No GPS here.
  19. \subsection{Counting the Hz}
  20. pseudo code goal:
  21. \begin{verbatim}
  22. Using 1Hz signal
  23. Start counting 1MHz every 1Hz
  24. when next cycle is received,
  25. display count
  26. start counting again
  27. \end{verbatim}
  28. That's all the objective is here. Easy with a micro, but goal is to complete using cmos or 74 logic.
  29. 4553 x 5
  30. 74hct132
  31. 1MHz clock (or 6MHz clock), or some variation thereof
  32. jk flip flop
  33. 74376 - quad jk flip flop
  34. 7476 - jk flip flop
  35. 1mhz clk will be main counter,
  36. 6 hz or 1 hz will be latch / reset
  37. \subsection{MAX7219 8 digit 7 LED segment Display Driver}
  38. Basic code tested with this was the LedControl arduino library.
  39. \begin{verbatim}
  40. /*
  41. Now we need a LedControl to work with.
  42. ***** These pin numbers will probably not work with your hardware *****
  43. pin 12 is connected to the DataIn
  44. pin 11 is connected to the CLK
  45. pin 10 is connected to LOAD
  46. We have only a single MAX72XX.
  47. */
  48. \end{verbatim}
  49. Some of the lines have to be edited to allow for all digits to be read, and
  50. also to lower intensity of display. I think also a component package (dark
  51. grey clear plastic bag) in front of the leds with intensity 1 is about right.
  52. \subsection{CPLD Programming}
  53. Using the XC9500XL series. This chip has some limitations - which are good.
  54. As you get faster clocks, you need bigger registers to handle parsing the clocks.
  55. bigger registers, use more power.
  56. \subsubsection{6KHz clock}
  57. Due to limitations of the XC9500XL FPGA logic blocks, I ended up limiting the counter registers to 12+1 bits\footnote{Possibly I could use multiple smaller registers in a type of cascade, but let's not bother with that for now. I had 600KHz resolution, until I added the UART out/}, so I have around 6,000 (assuming 60Hz), resolution. With this, I need a 6KHz clock. I could do this with the uno, but let's throw an attiny in there because it's a good tool for this kind of purpose and resolution. It should be able to function as a rough 6KHz timer, easily.
  58. \end{document}