ST7565 Paging Issue

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Osker
 
Posts: 5
Joined: Mon Jan 14, 2013 1:51 pm

ST7565 Paging Issue

Post by Osker »

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

User avatar
adafruit_support_bill
 
Posts: 88089
Joined: Sat Feb 07, 2009 10:11 am

Re: ST7565 Paging Issue

Post by adafruit_support_bill »

As far as I know it is a standard ST7565. Does the display work with our libraries? https://github.com/adafruit/ST7565-LCD

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

Re: ST7565 Paging Issue

Post by Osker »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ST7565 Paging Issue

Post by adafruit_support_rick »

Unfortunately, we can't support other chips, languages, or programming platforms.

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

Re: ST7565 Paging Issue

Post by Osker »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ST7565 Paging Issue

Post by adafruit_support_rick »

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.

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

Re: ST7565 Paging Issue

Post by Osker »

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?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ST7565 Paging Issue

Post by adafruit_support_rick »

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.

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

Re: ST7565 Paging Issue

Post by Osker »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ST7565 Paging Issue

Post by adafruit_support_rick »

Thanks!

I'll pass your suggestion along

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”