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

0 Members and 1 Guest are viewing this topic.

Offline daubmaso

  • Contributor
  • Posts: 16
  • Country: ca
Driving a dot matrix LCD with a 16 bit MCU
« on: June 14, 2018, 02:19:21 am »
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
 

Offline SiliconWizard

  • Frequent Contributor
  • **
  • Posts: 498
  • Country: fr
Re: Driving a dot matrix LCD with a 16 bit MCU
« Reply #1 on: June 14, 2018, 02:24:58 am »
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 daubmaso

  • Contributor
  • Posts: 16
  • Country: ca
Re: Driving a dot matrix LCD with a 16 bit MCU
« Reply #2 on: June 14, 2018, 03:09:22 am »
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?
 

Offline SiliconWizard

  • Frequent Contributor
  • **
  • Posts: 498
  • Country: fr
Re: Driving a dot matrix LCD with a 16 bit MCU
« Reply #3 on: June 14, 2018, 05:49:52 am »
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 daubmaso

  • Contributor
  • Posts: 16
  • Country: ca
Re: Driving a dot matrix LCD with a 16 bit MCU
« Reply #4 on: June 14, 2018, 06:07:13 am »
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