• AVR Freaks

AnsweredHot!MikroE Click Board OLED C does not function

Page: 12 > Showing page 1 of 2
Author
dmleone
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2020/06/10 10:02:56
  • Location: 0
  • Status: offline
2020/06/18 03:48:39 (permalink)
0

MikroE Click Board OLED C does not function

I added the OLED C click board using MCC and it does nothing. Is there a known issue with the OLED C click board generated files. I am using the PIC-IoT WG eval board. 
#1
dmleone
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2020/06/10 10:02:56
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/06/18 05:55:04 (permalink)
0
Just giving some more information as I am not really sure how to assist because it is a rough thing. I expect the MCC to output files that at least generate files to have the product do their example.
 
I have looked in the oled.c file and it seems like everything is fine with the way it engages the pins. unfortunately i do not have a datalogger device to monitor the SPI communications but i am willing to venture that is my issue. SPI comms are probably not happening
#2
RISC
Super Member
  • Total Posts : 5776
  • Reward points : 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/06/18 06:17:52 (permalink)
0
Hi,
There are many MCC examples including examples using Mikroelektronika clicks in the cloud version of MPLABX :
https://mplabxpress.microchip.com/mplabcloud/example
In the left upper corner searchbox just type OLED_C and you'll find one example for the PIC16F18855 .
You can export this project and reopen it in MPLAB X as reference.
Regards
 
#3
katela
Super Member
  • Total Posts : 1861
  • Reward points : 0
  • Joined: 2013/06/11 05:25:18
  • Location: South Africa
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/06/18 06:26:10 (permalink) ☼ Best Answerby dmleone 2020/06/18 06:27:21
0
I assume you generated the code based on their example by clicking the Generate Example in MCC.
Di you set correctly your SPI pins in Pin manager to correspond to your PIC-IoT WG SPI pins?
Which version of MCC and compiler you are using?
I don't see the MikroElektronika Click Library on MCC product page anymore, I don't know whether it's no longer supported with current versions of MCC libraries especially the Foundations services libraries which it relies on.
If your hardware is correct and you set correctly your SPI pins, you might try to use the older software versions (the minimum version) the last MikroElektronika Click Library release notes recommended .
 

Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
#4
dmleone
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2020/06/10 10:02:56
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/06/18 06:29:11 (permalink)
0
It did not take into account the MikroE board was a secondary SPI output. After i set up the SPI2 it worked well. I remember having to battle something previously with this click board and it had to do wit hthe generated files not generating correctly for the Curiosity. But i could not remember what it was. So it looks like they fixed that other issue and it was just a SPI setup issue this time around
#5
MarcelK
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2020/07/02 06:04:45
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/09 01:20:28 (permalink)
0
Dear all, 
 
I have the same problem as above, but I fail to replicate the solution. I just started with PIC microcontrollers thanks to an amazing youtube channel called “studentcompanion”. This is my first attempt and already help required. ;)
 
In hopes of an easy start, I bought the Curiosity HPC DM164136 with a PIC18F47Q10 microcontroller. I plugged the OLED-C from MikroE into the mikroBUS 1, configured all pins using MCC with the HFINTOSC of 4MHz and started the example code. I only get colored pixels and nothing else. No idea what my problem is, I have already worked on it for hours. I guess, I need professional help. 
 
Many thanks in advance, 
 
Marcel
 
PS: I attached screenshots in the hope that this is what a professional requires to see where my problem comes from. Please let me know if more information are required.

Attached Image(s)

#6
du00000001
Just Some Member
  • Total Posts : 3946
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/11 13:15:22 (permalink)
0
Did you check the SPI lines for activity (with a scope) ?
And maybe another SPI port for activity that is not expected to be there ?

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#7
MarcelK
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2020/07/02 06:04:45
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/12 01:02:50 (permalink)
5 (1)
Many thanks for your recommendation. I currently do not have access to a scope as we are currently again in lockdown. Is there any other way to check?
#8
du00000001
Just Some Member
  • Total Posts : 3946
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/12 02:26:44 (permalink)
0
Going back as far as "I only get colored pixels ...", it might help if you provide a photo of this.
Additional question: these pixels are static or dynamic?

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#9
MarcelK
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2020/07/02 06:04:45
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/12 05:20:56 (permalink)
0
Smart question. The coloured pixels are completely static. I attached a photo. 

Attached Image(s)

#10
ric
Super Member
  • Total Posts : 28385
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/12 05:25:52 (permalink)
0
Let's see if I can embed a larger copy of your file.


I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#11
du00000001
Just Some Member
  • Total Posts : 3946
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/12 06:47:32 (permalink)
0
OK - IIRC this might be what's to be expected when the display is powered up but not controlled.
 
"An image tells more than a 1000 words ..." (2 images to be precise) - your configuration is wrong:
SDI should be on RB3, SDO on RB2. You've configured these the other way round  sad
Simple error, significant consequences ...

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#12
MarcelK
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2020/07/02 06:04:45
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/12 21:07:00 (permalink)
0
Many thanks for your proposal, but it does still not work. Now the display is black, no coloured pixels anymore. :( Something seems to be still wrong. 
#13
du00000001
Just Some Member
  • Total Posts : 3946
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/13 03:03:31 (permalink)
4 (1)
"Now the display is black" might indicate that the initialization (including clearing the screen) might have succeeded.
You're trying to have "something" displayed?

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#14
MarcelK
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2020/07/02 06:04:45
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/13 05:21:09 (permalink)
0
I tried to start the OLEDC example demo. I attached my main.c code for your reference. It should run a demo on the display, but nothing happens...
#15
du00000001
Just Some Member
  • Total Posts : 3946
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/13 12:12:41 (permalink)
1 (1)
Obviously the main.c didn't make it.
Better zip the whole project, add ".txt" to the filename and upload this. It's way more convenient for analysis...

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#16
MarcelK
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2020/07/02 06:04:45
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/13 18:44:25 (permalink)
0
Yes, very good idea. I compressed the file as suggested and attached it. It worked without renaming into .txt. I only deleted the build folder because it was otherwise too big. 
Many, many thanks for your support. Highly appreciated. 
#17
dan1138
Super Member
  • Total Posts : 3845
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/15 12:59:36 (permalink)
5 (2)
I suspect one of your problems may be this code:
    while (1)
    {
        oledC_example;
    }

Would work better like this:
    while (1)
    {
        oledC_example();
    }



Attached is the MPLABX v5.40 project that I built from the ZIP from from your post.
#18
MarcelK
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2020/07/02 06:04:45
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/15 23:23:57 (permalink)
0
Dear Dan, you rock! It works. Stupid error, thanks that you watched it. Finally, the display shows the examples. Still quite slow and flickering. Not sure why, but I will try to fix it. Many thanks!!!
#19
dan1138
Super Member
  • Total Posts : 3845
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: MikroE Click Board OLED C does not function 2020/08/16 00:42:11 (permalink)
0
MarcelK
... Still quite slow and flickering. Not sure why, but I will try to fix it.

You have the system oscillator running at 4MHz.
 
The PIC18F47Q10 can run at 64MHz so you can use the System Module tab in the MCC tool to change this.
 
Attached is the project with that change.
#20
Page: 12 > Showing page 1 of 2
Jump to:
© 2020 APG vNext Commercial Version 4.5