This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to use Bit order Alternatively in SPI communication Protocol

HI,

I want to configure HT1632 LED driver using SPI communication protocol

for that i should send commands LSB to MSB

immediately data should go MSB to LSB

My question is how to change bitorder after  transfer commands through nrf_drv_spi_transfer()?

kindly provide solution

Parents Reply
  • HT1632 LED driver

    This: https://cdn-shop.adafruit.com/datasheets/ht1632cv120.pdf

    In particular, this:

    Which does, indeed, have the address going A6...downwards but data going D0...upwards !!

    Open mouth Open mouth

    What were they thinking?!

    Open mouth

    But does it really matter?

    Think about it: Unless you're actually doing arithmetic with it, the bit ordering doesn't matter.

    So you can just create these as bit patterns - such that the bits will be in the right order when they arrive at the HT1632.

    In particular, the "data" is just a bitmap where 1 bit corresponds to 1 LED - so it makes no difference whether you call the left-most bit "most significant" or "least significant".

    Those bits have no "place value" - therefore, no "significance" in the arithmetic sense

Children
No Data
Related