notes.rst 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Notes
  2. -----
  3. Cascading, power supply & level shifting
  4. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5. The MAX7219 chip supports cascading devices by connecting the DIN of one chip
  6. to the DOUT of another chip. For a long time I was puzzled as to why this didnt
  7. seem to work properly for me, despite spending a lot of time investigating and
  8. always assuming it was a bug in code.
  9. - Because the Raspberry PI can only supply a limited amount of power from the
  10. 5V rail, it is recommended that any LED matrices are powered separately by a
  11. 5V supply, and grounded with the Raspberry PI. It is possible to power one or
  12. two LED matrices directly from a Raspberry PI, but any more is likely to
  13. cause intermittent faults & crashes.
  14. - Also because the GPIO ports used for SPI are 3.3V, a simple level shifter (as
  15. per the diagram below) should be employed on the DIN, CS and CLK inputs to
  16. boost the levels to 5V. Again it is possible to drive them directly by the
  17. 3.3V GPIO pins, it is just outside tolerance, and will result in intermittent
  18. issues.
  19. .. image:: images/level-shifter.jpg
  20. :alt: max7219 levelshifter
  21. Despite the above two points, I still had no success getting cascaded matrices
  22. to work properly. Revisiting the wiring, I had connected the devices in serial
  23. connecting the out pins of one device to the in pins of another. This just
  24. produced garbled bit patterns.
  25. Connecting all the CS lines on the input side together and CLK lines on the
  26. input side all together worked. The same should probably apply to GND and VCC
  27. respectively: Only the DOUT of one device should be connected to the next
  28. devices DIN pins. Connecting through the output side, never worked
  29. consistently; I can only assume that there is some noise on the clock line, or
  30. a dry solder joint somewhere.
  31. .. image:: images/matrix_cascaded.jpg
  32. :alt: max7219 cascaded