Jump to content
  • 0

Set a pixel on Pmod OLED screen


IuliaM

Question

Hi!

I bought a Nexys 4 board and a Pmod OLED 128x32 screen, on which I am going to implement the Snake game, by programming the FPGA in VHDL. The problem that I encountered, is that I don't know how to set a pixel on the screen. I can only assume that I have to make some changes in the memory that maps the screen, something related to the example that I have found on the Pmod OLED's reference page, under the Example projects section. The given example takes a group of pixels and sends a character (its ASCII code), using the alphabet_screen variable, which is a memory. My question is, how should I write/ create the memory, in order for me to set only one pixel, not a group of them?

Also, there is a charLib IP that is being used -- how can I export this from the example project, into my Snake project?

 

Thank you!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Hello,

First of all you should understand how the OLED device works. The SSD1306 datasheet provides details about SPI commands for this device.

You can also take a look on Arduino Library and MPIDE example. There you will notice that SPI commands are sent to the device (see OLEDDriver.cpp). 

So you should be able to do something similar from your VHDL code. The example posted on resource page 

Nexys 3 VHDL Example - ISE 14.2 provide in the SpiCtrl.vhd the SPI controller that implements SPI communication. See how it is used in the other VHDL files.

Tell me if you need more guidance.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...