Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8026

SDK • Re: How to send 9-bit data words via PICO hardware_spi API

$
0
0
Hmmm... But hardware SPI will spit out 8/16 bits anyway. So for commands I would send two 8-bit words precomposed with DATA/COMMAND bit and the rest of COMMAND_VALUE bits will be all zeroes. And then CS goes high. Without CS, I would send nine 8-bit words, so eight commands - first functional, rest will be NOPs.

If contents of display are generated onboard Pico, then such a scheme needs to be applied for data. If using some pictures from outside, you can bake them once with DATA/COMMAND bits. If such data bit number won't divide by 8, you can just repeat them from the start of the picture and CS high when full picture plus one SPI byte more or without CS, you can go until sum of data bits and control bits will can divide by 8. Pattern will repeat in 9 bytes.

PS. Why aren't displays designed the way IMU chips are in terms of interfacing with the host? There is no DATA/COMMAND pin/wire mumbo jumbo.

Statistics: Posted by MatSOBDev2 — Sun Nov 17, 2024 1:58 pm



Viewing all articles
Browse latest Browse all 8026

Trending Articles