Hello,
I might be posting in the wrong forum, because I am using some parallel port code that I found here to test out my display before connecting it to my final circuit using an 8051 based micro. I'm not sure if this is a hardware problem or not...
I also have a CFAG320240 that I have wired in exactly the same way, and it works fine using the CFAG320240C_WinTest sample code, so I am pretty sure the module is wired correctly.
I have modified the CFAG160160B_WinTest code to use this 128 x 128 pixel resolution screen (CFAG128128) instead of 160 x 160 pixels.
When I try to write a bitmap to the screen there is a problem. It seems that some columns are being switched. First the display is set to graphics mode and the cursor address is set to 0x0000. The character pitch(Hp) is set to 8, and Hn is set to 16. The duty cycle is set to 128. (If I set the duty cycle to 64 like the manual suggests, the screen is cut in half and the bits are duplicated in the top and bottom half of the screen!)
Then I start writing bytes to the display to show my bitmap. If I step through my code, I can see 8 pixels at a time turning on, starting at the top left of the screen. So there are 16 bytes per row.
However, here is what happens. Bytes 1 through 10 display as they should, turning on the pixels across the top row of the screen. Bytes 11 and 12 shows up where bytes 15 and 16 should be (on the last 16 pixels of the top row). Then bytes 13 through 16 show up where bytes 11-14 should be, but on the second row! Then the next line starts where it should on the second row, and the last 4 bytes of the second row show up on the third row..
The result is that my bitmap shows up with the last 16 columns swapped with the 32 columns before them. I can find no reason for this...
Can you help me? This is for a customer who needs it yesterday, of course!
I am attaching my original bitmap and a bitmap that shows what the screen is looking like.
Thank you very much,
Jeff
I might be posting in the wrong forum, because I am using some parallel port code that I found here to test out my display before connecting it to my final circuit using an 8051 based micro. I'm not sure if this is a hardware problem or not...
I also have a CFAG320240 that I have wired in exactly the same way, and it works fine using the CFAG320240C_WinTest sample code, so I am pretty sure the module is wired correctly.
I have modified the CFAG160160B_WinTest code to use this 128 x 128 pixel resolution screen (CFAG128128) instead of 160 x 160 pixels.
When I try to write a bitmap to the screen there is a problem. It seems that some columns are being switched. First the display is set to graphics mode and the cursor address is set to 0x0000. The character pitch(Hp) is set to 8, and Hn is set to 16. The duty cycle is set to 128. (If I set the duty cycle to 64 like the manual suggests, the screen is cut in half and the bits are duplicated in the top and bottom half of the screen!)
Then I start writing bytes to the display to show my bitmap. If I step through my code, I can see 8 pixels at a time turning on, starting at the top left of the screen. So there are 16 bytes per row.
However, here is what happens. Bytes 1 through 10 display as they should, turning on the pixels across the top row of the screen. Bytes 11 and 12 shows up where bytes 15 and 16 should be (on the last 16 pixels of the top row). Then bytes 13 through 16 show up where bytes 11-14 should be, but on the second row! Then the next line starts where it should on the second row, and the last 4 bytes of the second row show up on the third row..
The result is that my bitmap shows up with the last 16 columns swapped with the 32 columns before them. I can find no reason for this...
Can you help me? This is for a customer who needs it yesterday, of course!
I am attaching my original bitmap and a bitmap that shows what the screen is looking like.
Thank you very much,
Jeff
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
Attachments
-
2.1 KB Views: 277
-
2.1 KB Views: 278