sparkfun / Qwiic_Twist

A digital RGB encoder controllable and readable over I2C.
https://www.sparkfun.com
Other
3 stars 2 forks source link

Register map mistake #4

Closed EmbeddedMan closed 5 years ago

EmbeddedMan commented 5 years ago

From the SparkFun product page, there is a "register map" (for some reason simply a graphic image, making it super-tiny and hard to read on my high res screen) here : https://cdn.sparkfun.com/r/600-600/assets/5/3/d/5/6/RegisterMap.jpg

It shows that register 5 is the encoderCount_MSB and 6 is the encoderCount_LSB. However, in version 1.0 of the firmware, it appears that these bytes are backwards. I had to treat register 6 as the MSB and 5 as the LSB for my code to work properly.

I haven't tested any of the other 16-bit register values, but they should be checked as well to make sure they're in the right order, and the 'register map' should be updated. Also, how about that register mab be an HTML table rather than a JEPG? Even a PDF would be zoomable.

nseidle commented 5 years ago

Thanks EmbeddedMan! Register map is available both JPG and PDF (now updated with LE) on the hookup guide. I added PDF and fixed JPG size on product page as well.

Looks like my GCC structs are LE by default (oh the endianness fights!). Sorry for the confusion. I'll update the map, images, and PDFs.

Note: The firmware version register is still BE.