Pixel_Sum
Access: Read
Address: 0x07
Reset Value: 0x00
Bit
7
6
5
4
3
2
1
0
Field
PS7
PS6
PS5
PS4
PS3
PS2
PS1
PS0
Data Type: Upper 8 bits of a 15-bit unsigned integer.
USAGE: This register is used to find the average pixel value. It reports the upper 8 bits of a 15-bit unsigned integer, which sums all 324 pixels in the
current frame. It may be described as the full sum divided by 128. The formula to calculate the average pixel value is as below:
Average Pixel = Register Value x 128 / 324
= Pixel_Sum x 0.395
The maximum register value is 159 (63 x 324 / 128 truncated to an integer). The minimum is 0. The pixel sum value may vary from frame to frame.
Pixel Data
Access: Read/Write
Address: 0x08
Reset Value: 0x00
Bit
7
6
5
4
3
2
1
0
Field
SOF
Data_Valid
PD5
PD4
PD3
PD2
PD1
PD0
Data Type: Two status bits, six bit pixel data.
USAGE: Digital Pixel data. Minimum value = 0, maximum value = 63. Any writes to this register resets the pixel hardware so that the next read from
the Pixel Data register will read pixel #1 and the StartOfFrame bit will be set. Subsequent reads will auto increment the pixel number.
To dump a complete image, set the LED to forced awake mode, write anything to this register, then read 324 times where the DataValid bit is
set. On the 325th read, the StartOfFrame bit will be set indicating that we have completed one frame of pixels and are starting back at pixel 1.
It takes at least 324 frames to complete an image as we can only read 1 pixel per frame.
The pixel hardware is armed with any read or write to the Pixel Data register and will output pixel data from the next available frame. So, if you
were to write the Pixel Data register, wait 5 seconds then read the Pixel Data register; the reported pixel data was from 5 seconds ago.
Field Name
SOF
Data_Valid
PD5 – PD0
Description
Start of Frame
0 = Not start of frame
1 = Current pixel is number 1, start of frame
There is valid data in the frame grabber
Six bit pixel data
23