• 0
m3atwad

PMOD OLED how to send char to display

Question

Hello,

I bought the Nexys 4 ddr and the pmod oled (Pmod OLEDrgb: 96 x 64 RGB OLED ) display.  I'm  trying to display ascii text on the PMOD using the microblaze.  I've  gotten this up and running to the point where I can display lines etc...  In looking at your resource center I still can't figure out how to print characters.  How does this process work? I've figured  out you need to define the characters in a "font" array and it looks like you use 5 bytes to create a 5x7 grid and the 1's determine what pixels are on there for allowing you to create the character.  

I'm confused as to what commands you  use to send this data to the OLED.  Do you use a write pixel command to individually turn on  every pixel?  Do you load one char in  the GDDR ram and it displays it?  Does  the  GDDR ram represent the display so as you write data into  GDDR (depending on where in  GDDR you put it) it gets displayed?  I'm  just generally confused a bout the process used  to send and place data like this on the screen.

 

Could someone elaborate  on this process and if possible  point me to more documentation (other  than the SSD1331 data sheet) that describes how these things work a little better?

 

Thanks!

Share this post


Link to post
Share on other sites

17 answers to this question

Recommended Posts

  • 0

@m3atwad,

I built a demo using the OLEDrgb some time ago, although I never used it to actually build characters.  Getting it up and running required that I spend some time looking through the embedded chipKit code to find some difficult setup details.

You can find this as part of the OpenArty project.  The OpenArty project is a Verilog only project (no microblaze, no grpahical Vivado magic, etc).  The RTL interface file can be found here, with some demo software used to interact with it here.

Dan

Share this post


Link to post
Share on other sites
  • 0

Ok thank you!  I will check those out.  I've actually got the  display configured and working.  I can draw a line on the screen via the commands, but I just can't seem to figure out how to make  an actual ascii character.  I've found the fonts for all the characters as well.  I just don't know how  to send them over to the GDDR memory.  Because I'm  using a serial link there  must be some kind of message (I assume) that carries the pixel color data. 

I feel like you do something  like send a message to the device and specify the pixel addres and the RGB colors which are a single 16 bit word.  I just can't  seem to figure out how to get  this information into the display and in what order to  send the bytes etc...

 

Thank you for your response.  I will go through the information you linked me to!

Share this post


Link to post
Share on other sites
  • 0

@m3atwad,

Have you found the data sheet for the part on the OLEDrgb?  Look at chapter nine, describing the commands.  You'll want to use the set column address and set row address commands to specify a region of the OLEDrgb's memory.  Once you've done that, you should be able to just write character pixel data to the oled.

Dan

 

 

Share this post


Link to post
Share on other sites
  • 0

Hi @m3atwad,

Our Pmod IP's work with Microblaze and Zynq processors. We have a completed and verified IP core for the PmodOLED hereHere is our tutorial on using the Pmod IP's.  Here is the Nexys 4DDR resource page that has the Nexys 4DDR schematic, reference manual, tutorials, xdc,ucf and example projects. Also welcome to the forums!

cheers,

Jon

Edited by jpeyron

Share this post


Link to post
Share on other sites
  • 0

Hey thanks guys!  I really like Digilent.  I'll be working on this this week so I'll let you know how it goes.  Thanks again for the support I really appreciate it!

Share this post


Link to post
Share on other sites
  • 0

Guys, 

I'm getting the hang of this. I've gotten the uBlaze writing to different parts of the scree, erasing etc...  These displays are pretty awesome.  One question I've come up with through further development is timing.  I'm running the uBlaze at 100Mhz and the SPI link to the display at ~2.5Mhz.  I've noticed that if I don't put some delays after certain commands with the usleep(); call I get some weird stuff on the display.  I've looked through the ssd1331 data sheet among the other linked materials, but I haven't seen much for timing information.  Is there timing info for each command?  I've found timing info for the SPI link (serial link) in the ssd1331 data sheet, but nothing regarding how long each command takes.  For example: clearing the entire screen, clearing a single pixel, moving cursor etc...  Do you guys know if this information exists?

Share this post


Link to post
Share on other sites
  • 0

@m3atwad,

There is a maximum speed on the SPI bus for the OLED port.  My notes say that SPI clock needs to be slower than 150ns.  I know I've hit it with graphics commands nearly non-stop with a SPI clock of about 208ns.  Other than that, and special delays on startup, there isn't much else.

On startup, though, there's some special timing's associated to getting the device to power up.  You can check the code I referenced earlier to find those.

Dan

Share this post


Link to post
Share on other sites
  • 0
On 8/25/2017 at 11:02 PM, D@n said:

@m3atwad,

I built a demo using the OLEDrgb some time ago, although I never used it to actually build characters.  Getting it up and running required that I spend some time looking through the embedded chipKit code to find some difficult setup details.

You can find this as part of the OpenArty project.  The OpenArty project is a Verilog only project (no microblaze, no grpahical Vivado magic, etc).  The RTL interface file can be found here, with some demo software used to interact with it here.

Dan

Hi Dan,

This looks great! Could I use your module in a hardware-only-project as well?

Do you maybe have an example?

I have a register that holds the latest hash of my hashing algorithm and would like to have the Pmod always display the latest value.

My board is a Nexys 4 DDR.

cheers!

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, D@n said:

@Riesenrad,

You can find all of my sources for the OLEDrgb as part of my OpenArty project.  This includes the code to bring it up and display an image, as well as the Verilog code to make a (wishbone) bus-accessed peripheral of it.

Dan

But the setup code is in C. My design is without softcore.

Could I just use the second piece of code that you linked to as well as a sequential logic part that does that setup process before starting my main module?

Share this post


Link to post
Share on other sites
  • 0

@Riesenrad,

I programmed the OLEDrgb in C because it was convenient.

There's no reason why you need to do the same--especially if you have different requirements (i.e.: no soft core),

Dan

Share this post


Link to post
Share on other sites
  • 0
1 minute ago, D@n said:

@Riesenrad,

I programmed the OLEDrgb in C because it was convenient.

There's no reason why you need to do the same--especially if you have different requirements (i.e.: no soft core),

Dan

Okay, thanks.

I’ll try just sending those commands with a kind of a simple state-machine right?

Share this post


Link to post
Share on other sites
  • 0

@Riesenrad

You could ...

My own code included a DMA reference to copy an image to the display.  You'll probably want to replace that with something of your own choosing as well,

Dan

Share this post


Link to post
Share on other sites
  • 0
10 minutes ago, D@n said:

@Riesenrad

You could ...

My own code included a DMA reference to copy an image to the display.  You'll probably want to replace that with something of your own choosing as well,

Dan

Do you mean the array with the codes?

Or which DMA reference?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now