• 0
Sign in to follow this  
LariSan

Oled With Ck1 Cmod

Question

HI, 
I am trying to figure out if the OLED Pmod can work with the chipKIT Cmod. 

 

Code was taken directly off the Pmod OLED web page. 

 


In one version of the demo code -- the Cmod is not mentioned. 
 
 16203381629_82c3746978.jpgoledlibrary1 by laraswanland, on Flickr
 
 
IN a near identical version (on the same page), the Cmod IS mentioned. 
 
 15769591743_aa3d22dee6.jpgoledlibrary2 by laraswanland, on Flickr
 
Both demos have OLEDdemo as the sketch. 
Neither of them work when I have the Pmod OLED plugged into J1 of the Cmod. 
 
Can someone take a look at which library is correct?
and if the Pmod OLED can work with the Cmod?

Edited by Josh
Added Tags

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi LariSan,

 

The second newer library, oledlibrary2, is the correct library in order to use the PmodOLED with the chipKIT Cmod since it has the appropriate SPI pin declarations in its driver file. 

 

Are you sure that the PmodOLED is plugged into the chipKIT Cmod correctly? The two Pmod headers have a reverse orientation from one another, so it's easy to get something accidently plugged in backwards; I know I've done that.

 

Let me know if you have any more questions.

 

Thanks,

JColvin

Share this post


Link to post
Share on other sites
  • 0

Okay, I answered one of the questions on my own.
The PmodOLED CAN work with the ChipKIT Cmod.
 

 

Now the question is WHICH library can be removed from the project listing?

 

 

http://youtu.be/SF1rtHnp1cA?list=UUii093da8j5sJgyqnJ3IOLw

Share this post


Link to post
Share on other sites
  • 0

The older first library (oledlibrary1) can be removed from the project listing. The only difference between it and the newer library is that the newer one supports the chipKIT Cmod.

Share this post


Link to post
Share on other sites
  • 0

Hi guys,

 

When I open the library files OLED.h, the first comments say the following:

 

IOShieldOled.h    --    Interface Declarations for IOShieldOled.cpp

 

It appears that OLED and IOShieldOled are duplicate libraries... Wouldn't it be more robust to update these libraries such that there is only ONE library for oled control, say OLED, and if other libraries (like IOShield) "use" this library, they can #include the library? I think this avoids trying to keep up two libraries that are virtually identical...

 

Just some thoughts...

Share this post


Link to post
Share on other sites
  • 0

Hi bellizima,

 

Yes, the OLED and the IOShieldOled libraries are very similar since the screen itself is the same part on both the Basic IOShield and as the Pmod. The only difference that I am aware of is that they use some different pin numbers to transfer signals from the host board.

 

I think it might be helpful to have the two libraries combined as you suggest, but with the separate pin values (some mandated by nature of the Basic IO Shield since a lot of pins are tied to various components on the shield), and that possibility that some users might want to run two screens independent of one another, a single library may have it's own set of problems.

 

But, as you point out, there are definitely potential issues with having to maintain two separate libraries. I'll look into it and see what the best approach might be.

 

Thanks for the feedback!

 

JColvin

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
Sign in to follow this