Questions? Call us: +1 760-918-6722

Black Screen

At the present time I cannot display pictures on the INT035TFT. Now I am trying to display the picture of Primitive Layer of Microchip Graphic Demo by using SSD1963.h and updated SSD1963.c. INT035TFT shows random pixel or pictures like the attached picture and becomes to black screen.
I did bellow.
1. I copied Primitive Layer folder of C:\Microchip Solutions v2012-08-22\Graphics to C:\Microchip Solutions v2012-08-22\Graphics folder and named it Primitive Layer_1963a.
2. I copied SSD1963.h and updated SSD1963.c in the Primitive Layer_1963a.
3. I removed SSD1926.h and SSD1926.c from project and added SSD1963.h and updated SSD1963.c by using project dialog window.
4. I changed HardwareProfile.h of Microchip Graphic Demo to HardwarProfile.h of INT035DEMO and I did not change any codes, because CS,RS,RESET,RD,WR of INT035DEM board port pin assingnment are as same as my test board.
5. I added the bellow codes in main() for start up delay.
6. I compiled and programed successfully, but INT035TFT shows random pixels for 1 sec or so( at 500 msec delay) and becomes black screen.
7. After this I tried to change functions from InitializeBoard(); to "InitializeDevice();
GOLInit();" as the main() of INT035DEMO. But I could not compiled GOLInit():
8. I tried bellow.
a. I added the pass to GOL.h of C:\Microchip Solutions v2012-08-22\Microchip\Include\Graphics as Include search path.
b. I added the pass to GOL.c of C:\Microchip Solutions v2012-08-22\Microchip\Graphics\Driver as Library search path.
c. I added GOL.h and GOL.c to mcw dialog window of this project.
d. I added Include pass and Library pass in "Set Language Tool Location "dialog.
e. I added # include "GOL.h" in main().
I can not understand why compiler error happens. The error message is bellow.
MainDemo.o: In function `main':
C:\Microchip Solutions v2012-08-22\Graphics\Primitive Layer_1963a/MainDemo.c:173: undefined reference to `GOLInit'
collect2: ld returned 1 exit status
Link step failed.

I have attached the pictures bellow which is captured when +3.3V DC power turn on and off repeatively and become disappear after 2 - 3 sec. The pictures seems the pictures of Primitive Layer which is expanded and overlapped against random pixels. I increased the delay time of start up from 500msec to 2000msec because it is easy to take a photo.
Now I think something is wrong concerning initialization of codes.

Any advice make me pleased.

//------------------------------------------------------------------
int main(void)
{
SHORT width, height, temp, x1, y1, x2, y2;
SHORT counter;
const SHORT polyPoints[] = {
(GetMaxX()+1)/2, (GetMaxY()+1)/4,
(GetMaxX()+1)*3/4, (GetMaxY()+1)/2,
(GetMaxX()+1)/2, (GetMaxY()+1)*3/4,
(GetMaxX()+1)/4, (GetMaxY()+1)/2,
(GetMaxX()+1)/2, (GetMaxY()+1)/4,
};
DelayMs(1000); //Wait 500 ms at startup //added
//Pull the reset line high
DisplayResetDisable(); //Sets RST high //added
DisplayResetConfig(); //Sets the pin to output //added
// InitializeDevice();
// GOLInit(); //Microchp functin of GOL.h and GOL.c for initialization
initialize hardware components and peripherals
InitializeBoard();
while(1)
{
.....
.....

Replies

dtechsupport's picture
dtechsupport
January 7, 2013

The reason the GOLInit() function is not linking is that you do not have the USE_GOL macro defined in your GraphicsConfig.h. However, you should NOT have this defined, as you are using the primitive layer of the graphics library, not the GOL. I would remove any reference or use of the GOL if you want to run the primitives layer correctly. To get this to run properly, you should use either the demo code I sent, or the primitives layer demo, but do not interchange them.
It sounds like your setup is mostly working, in that the device auto-initializes, goes blank (as it should, the ResetDevice() function writes all black to the screen). You said that "+3.3V DC power turn on and off repeatively and become disappear after 2 - 3 sec", why are you turning the power on and off? Your code should do the following:
1.) Power up the INT and PIC.
2.) Hold reset line high
3.) Wait 500ms
4.) Call ResetDevice() (this is probably called in your InitializeDevice() function). This will initialize communications to the INT board as well as write all blank pixels to the screen.
5.) Write pixels to the screen using the primitives functions (as the primitives demo does).
You should also ensure that the reset line is never being pulled low by your code, I would put a logic analyzer on the reset pin to ensure this is the case.
The images you are showing indicate to me that the data being written to the INT board is incorrect, noisy or corrupted. This is either due to incorrect communications (PMP) software settings, or pin connections being incorrect. If the INT board auto-initializes (random data) and then goes all black, the INT board itself is not damaged or initializing incorrectly.
I would suggest using only the primitives demo with the SSD1963 driver, but do not interchange other parts of the code.

Guest's picture
Guest
January 7, 2013

Thank you very much indeed. I hope to get the primitives demo with the SSD1963 driver. I do not interchange other parts of the code.
Concerning GOL I have one question. You say that I am using the primitive layer of the graphics library and in order to display pictures of Primitive Microchip Demo it is not necessary to use GOL. In what case should I use GOL ?

> why are you turning the power on and off?
I program hex code to PIC by using Pickit 3. After my hex code of primitive Layer Microchip Demo of SSD1963 are programed, Pickit 3 causes Reset but Forever INT shows nothing , namely black screen . After this, I remove Pickit 3 and I disconnects the DC +5v connector of the test board and connect the connector repeatedly. So I can see the pictures of INT. In many cases the pictures are random pixels but some time, around 10% - 20%, I can see the pictures of Primitive Layer Demo that are expanded and overlapped against random pixels and were attached at the last time. These picture become disappear after some sec. Some sec has the relation of DelayMs(value). If the value is 500, the time that I can see above picture is 1 sec or so. If the value is 2000, the time is 3-4 sec or so.
In test board there is a series regulator which converts DC 5v to 3.3v and supplies power to PIC and INT.

//---------------------------------------------------
int main(void)
{
SHORT width, height, temp, x1, y1, x2, y2;
SHORT counter;
const SHORT polyPoints[] = {
(GetMaxX()+1)/2, (GetMaxY()+1)/4,
(GetMaxX()+1)*3/4, (GetMaxY()+1)/2,
(GetMaxX()+1)/2, (GetMaxY()+1)*3/4,
(GetMaxX()+1)/4, (GetMaxY()+1)/2,
(GetMaxX()+1)/2, (GetMaxY()+1)/4,
};
DelayMs(1000); //Wait 500 ms at startup //added
//Pull the reset line high
DisplayResetDisable(); //Sets RST high //added
DisplayResetConfig(); //Sets the pin to output //added
// InitializeDevice();
// GOLInit(); //Microchp functin of GOL.h and GOL.c for initialization
initialize hardware components and peripherals
InitializeBoard();
while(1)
{
.....
.....

dtechsupport's picture
dtechsupport
January 8, 2013

The GOL is the Graphics Object Layer, which handles drawing and I/O for various graphics objects that Microchip supplies, like buttons, sliders, checkboxes, etc. The Primitives layer is for drawing lines, circles, individual pixels, etc. I would highly advise reading the Graphics Library Help file that comes with the Microchip MLA.
I would HIGHLY recommend against rapidly and repeatedly disconnecting and connecting the power to the INT board, as this could potentially damage components.
The proper approach to this is to use the debugger to step through your code and determine what is happening and what is causing the lack of pixels on the display; simply turning power on and off will not yield any usable results. Again, it appears that the INT board is initializing properly and your MCU is writing all black to the screen, so you need to determine why nothing more is happening after that. The debugging capabilities of the MPLAB IDE will help you figure this out quickly.

Guest's picture
Guest
January 9, 2013

Thank you very much. I understand what GOL is and repeatedly and rapidly disconnecting and connecting is bad for INT.
I have no experience of using debugging of MPLAB IDE. My MPLAB is MPLAB v.8.87. I try to study debugging. If possible, please show me the introduction documents of debugging and First what I should examine by using debugging function.

dtechsupport's picture
dtechsupport
January 9, 2013

Unfortunately I cannot describe all of the intricacies and depth of writing and debugging software, so I would refer you to the MPLABX User's Guide, which you can find here: http://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en556757.