Author Topic: Driving a dot matrix LCD with a 16 bit MCU  (Read 1054 times)

0 Members and 1 Guest are viewing this topic.

Offline daubmasoTopic starter

  • Contributor
  • Posts: 18
  • Country: ca
Driving a dot matrix LCD with a 16 bit MCU
« on: June 13, 2018, 04:19:21 pm »
Hi, I am having a bit of trouble understanding how the commands would function on an LCD display I have my eye on. ie., what would the command sequence I load through the shift register to display a particular image be?
For the sake of information I will be driving it with a PIC24f08KL302, or a dsPIC33EP128MC202. There's nothing special about them, just what I found on Digikey for cheap a while ago. (I also wanted to try out 16 bit MCU's)
It's a 128x32p black and white LCD with an SPI interface.

Product page:
https://www.digikey.ca/product-detail/en/newhaven-display-intl/NHD-C12832A1Z-FSW-FBW-3V3/NHD-C12832A1Z-FSW-FBW-3V3-ND/2059236
Datasheet:
http://www.newhavendisplay.com/specs/NHD-C12832A1Z-FSW-FBW-3V3.pdf

Thanks in advance
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14464
  • Country: fr
Re: Driving a dot matrix LCD with a 16 bit MCU
« Reply #1 on: June 13, 2018, 04:24:58 pm »
You basically have to write to the internal display memory through "display data write" commands.
The display controller is documented here:  http://www.newhavendisplay.com/app_notes/ST7565R.pdf
 

Offline daubmasoTopic starter

  • Contributor
  • Posts: 18
  • Country: ca
Re: Driving a dot matrix LCD with a 16 bit MCU
« Reply #2 on: June 13, 2018, 05:09:22 pm »
Okay, so from my understanding after reading this is that each page in the display ram corresponds to 8 rows in a certain position. When I go to write to the current page the column is then incremented over by one and the next write command corresponds to the same rows but the column over. Then after the last column I would reset the column position to 0 and start writing to the next page. Is that right or did I misread?
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14464
  • Country: fr
Re: Driving a dot matrix LCD with a 16 bit MCU
« Reply #3 on: June 13, 2018, 07:49:52 pm »
I think this should be it. Seems a bit unusual, kinda rotated by 90° compared to a lot of display drivers.

I'm not sure whether you have to reset the column and increment the page after each page, but I think so. The spec doesn't mention the column wrapping around (it says it "tops" at 83h which is the last column, but doesn't say it wraps to 0...). As for the page, it doesn't state that the page is incremented automatically either.
 

Offline daubmasoTopic starter

  • Contributor
  • Posts: 18
  • Country: ca
Re: Driving a dot matrix LCD with a 16 bit MCU
« Reply #4 on: June 13, 2018, 08:07:13 pm »
Well I guess I'll just have to play around with it and see.

Thanks for your help!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf