Bit of help interpreting SPI?

Hi all, I'm trying to work with the LTC6803-4 here, and I've found a bit of code online that I'm trying to get my head around. Serial has always been my weak point, but I'll understand it eventually :smiley:

Basically what I'm asking, is how to read the registers and determine what values to write to them. In the example code, the config register is being written with:

0xE5,0x00,0x00,0x00,0x71,0xAB

And it is:

So, I tried putting say the last hex byte into my calculator, and I get 10101011.

However, I can't make out from the datasheet how the last byte actually controls the OV limit, which is apparently set to 4.1V according to the sample code.

Here are the memory bit descriptions, specifically Vuv and Vov:

https://dl.dropboxusercontent.com/u/203420/Scooter/mbit.png

Anyone understand how this is done?

The decimal form of 0xAB is 171, then 171-32 * 16 * 1.5 gives me 3336 .. not exactly 4.1V, or do I flip the binary around, in which case I get 213-32 * 16 * 1.5, which gives me 4752 .. closer, but still not what I want.

Dan

I'm not sure what the -32 in the sheet is, but:

10101011 = 171 decimal

171 * 16 * 1.5mv = 4104mV

With the -32 in there, if that is supposed to be 171-32, then that would equate to 3336mV...?

Any chance of the entire data sheet, not just some little snippets?

Hmm, definitely seems to work if you forget about the -32 indeed.

For example, the Vuv byte is 0x71, which is 113, so 113 * 16 * 1.5 = 2.712, which is what the sample code specifies.

And sure, http://cds.linear.com/docs/en/datasheet/680324fa.pdf

About page 23.