adafruit / RGB-matrix-Panel

Arduino library and example code for the 16x32 RGB matrix panels in the shop
http://www.adafruit.com/products/420
303 stars 145 forks source link

ADDED: Support for Teensy 3.1/3.2 #22

Open Minostaurus0 opened 8 years ago

Minostaurus0 commented 8 years ago

Added Support for Teensy 3.1. By default:

The rest should work like before. But i can not test it. Teensy stuff was added inside defines CORE_TEENSY

ErikWegner commented 7 years ago

Thanks for your contribution, it is a good starting point for my experiments. In my setup, there is a 32x64 rgb matrix panel connected to a Teensy 3.5. There are a few minor issues with the changes:

  1. The function swap(x,y) is not definied.
  2. The Teensy 3.5 running at 120 MHz needs additional cycles to wait for the matrix
  3. The PIN 21 (line C) and PIN 20 (line D) are connected to PORTD on a Teensy 3.5, too. When using a 64x32 matrix, the D line is neccessary. This mixes up with the RGB lines in my case.
  4. An actual listing which matrix pin goes to which Teensy pin would be very helpful. At least, are the RGB-lines connected to D0 to DD5 or D2 to D7?

Please have a look at 518b9fff52e748fb9cb7f01ffb664c517a2e88ac for my changes.

samyk commented 6 years ago

Do you think this cleanly extends to 64x64? I've tried this on a Teensy 3.2 with a 64x64 panel I received (which has an extra pin, E), and created a new instantiation - passing in false, 64, 64:

RGBmatrixPanel::RGBmatrixPanel(boolean dbuf, uint8_t width, uint8_t height) :
  Adafruit_GFX(width, height) {

  init(height/2, dbuf, width);
}

but not getting great results. I can get the full panel to have colors, but never what I expect. I've added the e pin everywhere the d pin is but I wonder if maybe I need to do something specific with the PORTD mapping, or perhaps the e pin needs to be on a specific port...still investigating.