ST7565 Paging Issue

by Osker on Fri Feb 15, 2013 1:38 pm

I have ST7565 Negative GLCD and have run into what I perceive as a unique problem when setting the page address. Per the datasheet, pages are addressed by sending a specific page command. For example, the page commands are: Page_0 is 0xB0, Page_1 is 0xB1, Page_2 is 0xB2, ... Page_7 is 0xB7. However, my attempts at addressing specific pages suggests that the pages are being shifted. In my case, 0xB0 maps to Page_3, 0xB1 maps to page_2, 0xB2 maps to page_1, etc. I am confident that my coding is correct because after several of hours trying to find an error in my approach I ordered a different ST7565 based GLCD from another vendor and the same code maps correctly to the respective pages.

Is there something unique about the Adafruit ST7565 that I am missing? Perhaps a hardware setting?

Regards,

Osker
Osker
 
Posts: 5
Joined: Mon Jan 14, 2013 12:51 pm

Re: ST7565 Paging Issue

by adafruit_support_bill on Sat Feb 16, 2013 9:33 am

As far as I know it is a standard ST7565. Does the display work with our libraries? https://github.com/adafruit/ST7565-LCD
User avatar
adafruit_support_bill
 
Posts: 25535
Joined: Sat Feb 07, 2009 9:11 am

Re: ST7565 Paging Issue

by Osker on Sun Feb 17, 2013 10:08 am

I use Pic Basic Pro for coding. I am not sufficiently versed in C to be comfortable that I would correctly convert any library posted on your website. I will be glad to send you my code and a compiled version for you to check out. At this point, I am simply becoming familiar with basic process of addressing specific pixels. My code does nothing more than setup the GLCD, write 0xFF to all pixels, by page, next writes 0x0 to all pixels, by page, and then turns on 20 pixels to create a horizontal line at a specific location. There is a two second delay between writing to each page, so it is quite visible that the pages are not being written two in the correct sequence. I am using a PIC 16F690 but should be able to adjust the code to work with a PIC of your choice. My code is well documented, so if you read Basic, it should be easy to follow.
Osker
 
Posts: 5
Joined: Mon Jan 14, 2013 12:51 pm

Re: ST7565 Paging Issue

by adafruit_support_rick on Sun Feb 17, 2013 4:51 pm

Unfortunately, we can't support other chips, languages, or programming platforms.
User avatar
adafruit_support_rick
 
Posts: 8583
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: ST7565 Paging Issue

by Osker on Mon Feb 18, 2013 8:43 am

Not a problem. Since my code works perfectly with a different ST7565 based GLCD, I am confident that coding is not the issue. Since no one else has posted similar problems, and the same code works with a different ST7565 GLCD, I think the most probable problem is a faulty GLCD, which I would like to return it for a replacement.
Osker
 
Posts: 5
Joined: Mon Jan 14, 2013 12:51 pm

Re: ST7565 Paging Issue

by adafruit_support_rick on Mon Feb 18, 2013 9:48 am

Can you test it out on a arduino, using our example code? That should tell us if it's a defective display or if there is some sort of incompatibility with your system.
User avatar
adafruit_support_rick
 
Posts: 8583
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: ST7565 Paging Issue

by Osker on Mon Feb 18, 2013 7:29 pm

I would, but I do not have an Arduino. There is really not much of a "system" here. Both the PIC and the GLCD are plugged into a breadboard. The only other components on the breadboard are a 3.3V regulator and caps. Both the PIC and the GLCD are running off the same 3.3 V bus. The PIC connects to the GLCD via jumper wires. Any other suggestions?
Osker
 
Posts: 5
Joined: Mon Jan 14, 2013 12:51 pm

Re: ST7565 Paging Issue

by adafruit_support_rick on Mon Feb 18, 2013 8:43 pm

Well, I found this in the Adafruit ST7565 library:
Code: Select all
// a handy reference to where the pages are on the screen
const uint8_t pagemap[] = { 3, 2, 1, 0, 7, 6, 5, 4 };

This certainly seems to correspond to the page mapping you describe in your first post: page 0 = 0xB3, page 1 = 0xB2, page 2 = 0xB1, etc.

The datasheet for this display is available here. I suspect that the display maps the ST7565 pages from bottom to top. If the Display start line address comes up as page 4 when the chip is reset, then I think these factors may explain the discrepancy you see.
User avatar
adafruit_support_rick
 
Posts: 8583
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: ST7565 Paging Issue

by Osker on Thu Feb 21, 2013 10:27 am

Great! Thanks for checking into this further. Based on the sample code you found, it appears that the page mapping problem I am experiencing is consistent across these GLCDs. While your hypothesis about the possible cause, is better than anything I could proffer, per page 12 of the datasheet, the page address defaults to page 0 on reset, not page 4. If this problem could be corrected by sending the appropriate reset sequence, Adafruit's sample library would include such an initialization routine, versus, containing a routine to remap the pages. Now that I know that the problem is hardware, I can deal with the issue by assigning the correct page address to page variables, versus, using the page address commands discussed on page 16 of the datasheet.

Surely, I am not the only person who has or will buy one of these displays from Adafruit and will rely on the datasheet for technical information regarding its use, versus relying on sample code. I suggest that Adafruit make future buyers aware of this "Feature" and of the possible work around. Not only will this prevent others from spending needless time trying to figure out why their code does not produce the expected results, it will allow them to make an informed purchase decision. Had I known this in advance, I would not have purchased this GLCD. For $3.00 more, I purchased a GLCD from another vendor that worked flawlessly.

I sincerely appreciate your efforts to assist me with this problem. Great technical service and excellent follow through.
Osker
 
Posts: 5
Joined: Mon Jan 14, 2013 12:51 pm

Re: ST7565 Paging Issue

by adafruit_support_rick on Thu Feb 21, 2013 10:48 am

Thanks!

I'll pass your suggestion along
User avatar
adafruit_support_rick
 
Posts: 8583
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY