Author Topic: SSD1306 I2C Oled on Verilog  (Read 2298 times)

0 Members and 1 Guest are viewing this topic.

Offline pieroc91Topic starter

  • Contributor
  • Posts: 46
  • Country: ar
SSD1306 I2C Oled on Verilog
« on: October 31, 2018, 01:43:33 pm »
Hi everybody.

I'm doing a project on a Altera Cyclone IV FPGA based board, till i solve another projects i was trying to add a small oled ssd1306 based display but i couldn't find any pre-made library, or code, or anything...

tryed to code it myself but there's no luck, does anybody tried to do it?

Also as the main project could be quite memory demanding i was thinking about driving the display with an arduino and the FPGA only sending the necesary information in order to optimize memory usage.

will be worth the effort of developing the ssd1306 on verilog or just hook the arduino?

Thanks!
 

Offline mrsteveman1

  • Newbie
  • Posts: 3
  • Country: us
Re: SSD1306 I2C Oled on Verilog
« Reply #1 on: December 23, 2018, 09:21:12 pm »
I have an SSD1306 I2C module written in Verilog, but I suspect the design is the worst possible way to do it :)

It does work though, I can post the code on Github after Christmas.

It was originally written and debugged using Lattice Diamond for the MachXO2 breakout (7000HE version), but I've synthesized it for iCE40 HX8K as well as Intel/Altera Max10. It almost fits in an iCE40 HX1K like the iCEstick, but the framebuffer mapping logic is huge and inefficient.

It waits 200ms after reset, sends the display initialization sequence, and then it just refreshes the entire screen over and over from a sequential 8192-bit framebuffer ram made up of 128-bit rows, mapped to the column+page ordering expected by the SSD1306. There are other drawing modes the display can be set to that might make things simpler and more efficient, but I haven't tried them yet.

There's no logic for drawing to the framebuffer yet. For development I just had it load a manually generated binary file into the framebuffer using $readmemb() so I could see if the pattern was being drawn correctly or not.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf