trinket MO and TLC59711

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
tobink64
 
Posts: 14
Joined: Sun Jan 21, 2018 1:55 pm

trinket MO and TLC59711

Post by tobink64 »

Can I use a Trinket MO and Adafruit 12-Channel 16-bit PWM LED Driver - SPI Interface - TLC59711 together. What pins to pins would I need to connect.
Thank you for all advice.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: trinket MO and TLC59711

Post by dastels »

That should be fine. I suggest using hardware spi: MOSI (pin 4) for Di and SCK (pin 3) for CI and the hardware SPI constructor. See https://learn.adafruit.com/tlc5947-tlc5 ... ce-1476421. For more information, see the guide at https://learn.adafruit.com/tlc5947-tlc5 ... r-breakout.

Dave

User avatar
tobink64
 
Posts: 14
Joined: Sun Jan 21, 2018 1:55 pm

Re: trinket MO and TLC59711

Post by tobink64 »

I took your advice and tried using a TLC59711, and even tried running the programs from the overview pages. The trouble I ran into is now I am getting a memory allocation error.

Traceback (most recent call last):
File "code.py", line 3, in <module>
MemoryError: memory allocation failed, allocating 896 bytes


Thank You for any help you could provide

Code: Select all

import board
import busio
import adafruit_tlc59711

print("tlc59711_simpletest.py")

spi = busio.SPI(board.SCK, MOSI=board.MOSI)
pixels = adafruit_tlc59711.TLC59711(spi, pixel_count=16)

pixels.set_pixel_all((10, 10, 10))

pixels[0] = (100, 100, 100)
pixels[1] = (0, 0, 100)
pixels[2] = (0.01, 0.0, 0.01)
pixels[3] = (0.1, 0.01, 0.0)

pixels.show()

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: trinket MO and TLC59711

Post by dastels »

Hmmm... yeah. The TLC59711 module is pretty big. Unfortunately the M0 (SAMD21) doesn't have much RAM which really limits how much CircuitPython code you can load/run. It's fine for simple things, but anything more complex will run out of space quickly.

You have two real options:

1) switch to a board/MCU with more RAM. One of the QtPy boards (not the M0 one) would be good. Or something like an ItsyBitsy M4 Express or Feather M4 Express (or one with more RAM).

2) switch to programming in C++/Arduino.

Dave

User avatar
tobink64
 
Posts: 14
Joined: Sun Jan 21, 2018 1:55 pm

Re: trinket MO and TLC59711

Post by tobink64 »

Thank You for the response, I appreciate the help offered.

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”