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
- The Adafruit specifies which pin is used for which (. Based on this how can write a simple, maybe for loop to send data at least to one row (RGB data)
- Does the Adafruit HAT RGB use a true 24 bit color ?
- Does the HAT shift register is parallel or series ?
So far my plan of action ( hypothesis).
- Make those PINS in the datasheet( attached) OUTPUT and LOW
- 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
- 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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…