Hey there, I’m a total n00b with programming effects, and this platform is proving very impressive and capable. I am wanting to use a 4 digit 7-segment display that’s being driven by the TM1637, and I’m having some trouble connecting it via serial. It’s a two-wire connection, clocked high, and I’m unsure if I’ve got it set up correctly and would appreciate any help.
The unit is powering on, and I’ve got the TM1637’s CLK pin connected to physical pin 9 and the DIO pin connected to physical pin 11. Here’s my setup code:
// Set up for the SPI
spi_conf.periph = SpiHandle::Config::Peripheral::SPI_1;
spi_conf.mode = SpiHandle::Config::Mode::MASTER;
spi_conf.direction = SpiHandle::Config::Direction::ONE_LINE;
spi_conf.nss = SpiHandle::Config::NSS::SOFT;
spi_conf.clock_polarity = SpiHandle::Config::ClockPolarity::HIGH;
spi_conf.clock_phase = SpiHandle::Config::ClockPhase::TWO_EDGE;
spi_conf.pin_config.sclk = seed::D8;
spi_conf.pin_config.miso = Pin(); // We are not using this
spi_conf.pin_config.mosi = seed::D10;
spi_conf.pin_config.nss = Pin(); // We are not using this
// Initialize the handle using our configuration
spi_handle.Init(spi_conf);
...
uint8_t buffer[4] = {0, 1, 2, 3};
spi_handle.BlockingTransmit(buffer, 4);
There’s nothing being displayed on the unit, feels like SOMEthing should be working. Don’t know if it’s my software or the hardware, or something else I should check.
Daisy rox.
Would appreciate any help and welcome critique!