Canon Pixma MX340 Control Panel LCD Screen Data as Excel Background Fill
I'm poking around inside a Canon Pixma MX340 multi-function inkjet, and I've identified a burst of data as its main board updating what's shown on the control panel LCD screen. After exporting data captured by my logic analyzer to Microsoft Excel, it was easy to see the number of bytes in this transmission without laboriously counting it manually. Thanks, Excel!
After that success, I looked at my spreadsheet and thought I might be able to go further. This control panel uses a monochrome pixel LCD screen, and the number of bytes is roughly on par with what it would take to represent the frame buffer using one bit per pixel. Earlier I thought about writing a program to read those bytes and render them on screen, but I think I can accomplish something similar in Excel with less coding effort.
Excel has extensive charting tools and maybe there's a way to draw a bitmap, but I'm thinking much lower tech than that. Excel can conditionally format cells based on criteria. So if I could get one cell to represent one bit then conditionally format that cell, that would turn each cell into a pixel.
The first step is to parse the logic analyzer capture data (Example: "0x44") which Excel interpreted as text by default. I found Excel's HEX2DEC()
function, but it doesn't want to deal with the "0x" prefix. I had to strip it out myself with RIGHT()
function to pull out the rightmost two characters. After the string has been interpreted as a hexadecimal number, I could perform a bitwise AND operation with BITAND()
. I repeated this eight times, one for each bit. I manually typed in the values used for each operation: 128, 64, 32, etc. knowing full well there's very likely a more elegant way to do this. I decided manually typing in eight values is faster than researching an incrementally better way.
I copied this set of eight cells, each representing one bit in the byte, across all 1020 rows of my spreadsheet. And finally, I selected those eight columns and applied a conditional formatting rule: every cell whose value is greater than zero should be formatted as black text on black background.

That turned my eight columns into graph paper. I adjusted column width so each cell is close to a square, and started scrolling through to see the results. It looked like a reasonable bitmap, not random noise, but my brain didn't recognize anything until I scrolled down to this section. This shape (I think it represent ink levels?) is shown on the control panel screen. I'm definitely on the right track here.

The data transmission is sent in five 196 byte chunks, so I zoomed out in Excel and snipped these five screenshots in each of those sections. Ah, I see why I didn't immediately recognize the text: the way I did it in Excel gave me a rotated and flipped orientation. Time to pull them into a photo editor for some cropping, transforming, and aligning.

This is quite conclusive: the burst of bytes represent the LCD screen frame buffer. The raw bytes describe an image 196 pixels wide by (5 chunks * 8 pixels per byte = ) 40 pixels tall.

Looking at the actual LCD, I can see there's only one more addressable pixel under the lowest part of "paper", so lowest 6 pixels in the byte array are cropped. I can't tell if it is cropped in width as well, as there's far more room between that large "01" on the right and the right edge of the screen. Making it difficult to count accurately so that question is inconclusive for the moment. I'll come back to this open question after I make an effort to understand what else is being transmitted on these wires.
This teardown ran far longer than I originally thought it would. Click here to rewind back to where this adventure started.