Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
249 views
in Technique[技术] by (71.8m points)

c - Send Data to Adafruit HAT boonet and LED Matrix

I am taking a masters level embedded course and I am doing a project to do characterization of the the raspberrypi. So I choose to use the AdaFruit HAT bonnect and RGB 32 by 64 LED matrix. However, since this is learning, I cannot use libraries written specifically to drive the matrix but I can use the bcm2735 or wiringpi. The Adafruit datasheet is very poor. I don't want to burn my PI and accessories and I have the following questions

  1. The Adafruit specifies which pin is used for which (attached image]. Based on this how can write a simple, maybe for loop to send data at least to one row (RGB data)
  2. Does the Adafruit HAT RGB use a true 24 bit color ?
  3. Does the HAT shift register is parallel or series ?

So far my plan of action ( hypothesis).

  1. Make those PINS in the datasheet( attached) OUTPUT and LOW
  2. Assuming a 8 bit color, each row having three line (R, G, B) , so I need to generate 24 bits times 64 (for the column) before latching the data
  3. To scan the rows ( 32) and do the step 2 In Psedocode as follows
    ROW = 32
    COL = 64
    
    //top half
    T_ RED_PIN = P5
    T_GREEN_PIN = P13
    T_BLUE_PIN= P6
    
    //bottom half
    B_ RED_PIN = P12
    B_GREEN_PIN = P16
    B_BLUE_PIN= P23
    
    ADDRES_PIN= P20 ( am not sure what this does)
    
    CLK = P17
    LATCH = P21
    DATA = P4
    
    FOR r=1 to 32
         FOR c=1 to 64
           FOR red=0 to 8
              SET(T_RED_PIN,red)
              CLK
               FOR green= 0 to 8
                 SET (T_GREEN_PIN, green)
                 CLK
               FOR blue=0 to 8
                 SET (T_BLUE_PIN, blue)
                  CLK
    LATCH with OE ON

That is all I have. I m sure it might make you laugh. but I really need help on understanding the AdaFruit HAT and how to send data.

question from:https://stackoverflow.com/questions/65908759/send-data-to-adafruit-hat-boonet-and-led-matrix

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...