Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. RFM69 and TLC5940

RFM69 and TLC5940

Scheduled Pinned Locked Moved Hardware
10 Posts 3 Posters 2.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Grave
    wrote on last edited by
    #1

    Hi,

    I want to controll 9 led with sensebender micro. I want to use the tlc5940. But they use both the SCK and Mosi pin of the atmega328. Is it possible to use the tlc5940 when I sent the RFM69 to sleep? Or is there another change to use both things.

    Thanks Grave

    mfalkviddM 1 Reply Last reply
    0
    • G Grave

      Hi,

      I want to controll 9 led with sensebender micro. I want to use the tlc5940. But they use both the SCK and Mosi pin of the atmega328. Is it possible to use the tlc5940 when I sent the RFM69 to sleep? Or is there another change to use both things.

      Thanks Grave

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @Grave they should be able to share SCK and MOSI. Only the (N)SS pins need to be different. See https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Independent_slave_configuration for details.

      The SPI bus is, well, a bus. So it is designed to support multiple devices.

      Some devices have trouble sharing the same SPI bus though. So if you run into problems, you might need to look at setting up a separate SPI bus (using soft SPI). How to do this is described at https://www.mysensors.org/build/ethernet_gateway#wiring-things-up

      But try sharing the SPI first.

      1 Reply Last reply
      1
      • G Offline
        G Offline
        Grave
        wrote on last edited by
        #3

        I got wrong. They use both D9-D11 and D13.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Grave
          wrote on last edited by
          #4

          These are the pins the TLC5940 use:

          digital 3 -> TLC pin 18 (GSCLK)
          - digital 9 -> TLC pin 24 (XLAT)
          - digital 10 -> TLC pin 23 (BLANK)
          - digital 11 -> TLC pin 26 (SIN)
          - digital 13 -> TLC pin 25 (SCLK)

          I think it´s not a SPI device, so I can´t use them when the RFM69 is connected.

          mfalkviddM 1 Reply Last reply
          0
          • G Grave

            These are the pins the TLC5940 use:

            digital 3 -> TLC pin 18 (GSCLK)
            - digital 9 -> TLC pin 24 (XLAT)
            - digital 10 -> TLC pin 23 (BLANK)
            - digital 11 -> TLC pin 26 (SIN)
            - digital 13 -> TLC pin 25 (SCLK)

            I think it´s not a SPI device, so I can´t use them when the RFM69 is connected.

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by mfalkvidd
            #5

            @Grave which library are you using to control the TLC5940?

            If that library supports changing pins, change the pins using the instructions provided by the library.

            If the library does not support changing pins, use soft SPI as mentioned earlier to change the pins used for the RFM69.

            Or find a library for the TLC5940 that does support changing pins.

            1 Reply Last reply
            0
            • mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #6

              This library https://github.com/PaulStoffregen/Tlc5940/blob/d765d114e0487577de2fc0eade24f59b9c944291/tlc_config.h#L44 does use SPI, which suggests the TLC6940 is in fact a SPI device. And that library supports using soft SPI. So you should be able to use any of the following solutions:

              • Share the hardware SPI, as mentioned in my first post.
              • Use software SPI for RFM69 and hardware SPI for TLC5940, as mentioned in my first post
              • Use hardware SPI for RFM69 and software SPI for TLC5940 by changing the TLC5940 configuration.
              1 Reply Last reply
              0
              • G Offline
                G Offline
                Grave
                wrote on last edited by
                #7

                But what is with Blank and Xlat on D9 and D10.

                mfalkviddM 1 Reply Last reply
                0
                • G Grave

                  But what is with Blank and Xlat on D9 and D10.

                  mfalkviddM Offline
                  mfalkviddM Offline
                  mfalkvidd
                  Mod
                  wrote on last edited by
                  #8

                  @Grave it depends on the method you choose and the library you use. If the library allows change of Blank and Xlat pins, change the configuration according to the instructions provided by the library.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    Grave
                    wrote on last edited by
                    #9

                    I think, Blank and Xlat can´t be changed. I noticed that sensebender micro doesn´t use D9. So it´s only Blank wich is double used by tlc5940 and rfm69.

                    1 Reply Last reply
                    0
                    • dbemowskD Offline
                      dbemowskD Offline
                      dbemowsk
                      wrote on last edited by
                      #10

                      Would using shift registers work?

                      Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                      Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      16

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular