View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jun 05, 2008 10:56 am |
|
|
There's a bug in this function in sed1335.c in vs. 4.073. I just found it.
The expression shown in bold is wrong. It's adding 1 to the address
before it's cast to an int8 pointer. That's wrong. It should be cast to
an int8* before the 1 is added to it. This bug probably doesn't affect
you though. I don't think you call this routine.
Quote: | int16 getCursorAddress()
{
int16 addr;
glcd_sendCMD(GLCD_CMD_GET_CSR_ADDR);
TGLCD_DATA
*(int8*)(&addr ) = glcd_readByte(); // Read low part
*(int8*)(&addr + 1) = glcd_readByte(); // Read high part
return addr;
} |
It should be changed to this.
Code: | *((int8*)&addr + 1) = glcd_readByte(); |
-------
Actually, I rediscovered it. I had found it before, in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=32684&start=25
I don't know if it was reported back then, but I'm going to report it now. |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
|
Posted: Thu Jun 05, 2008 4:56 pm |
|
|
I looked to driver code SED1335.c. However, i did not find anything about calling this routine. So, the bug doesn't affect me.... _________________ MurtiS |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
|
Posted: Fri Jun 06, 2008 12:16 am |
|
|
I tried you said, But, no change on the GLCD screen. I will try to find any error, but i do not know how i can. _________________ MurtiS |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Jun 06, 2008 1:15 pm |
|
|
The problem could be one of these:
1. A bug in the SED1335.c driver.
2. A bug in the Graphics.c driver.
3. A bug in your compiler version.
4. A bug in your code that calls the drivers.
5. The SED1335 and RA8835 may not be completely compatible, either
in terms of software and/or hardware timing.
6. You may have connected the Winstar LCD incorrectly to your PIC.
7. Your individual unit of the Winstar LCD may have a problem in it.
8. A particular batch of the Winstar LCDs may have bugs.
9. Your individual PIC may be flaky.
10. Your board may have power supply problems such as droop or noise. |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
|
Posted: Sat Jun 07, 2008 8:10 am |
|
|
PCM programmer wrote: | The problem could be one of these:
1. A bug in the SED1335.c driver.
2. A bug in the Graphics.c driver.
3. A bug in your compiler version.
4. A bug in your code that calls the drivers.
5. The SED1335 and RA8835 may not be completely compatible, either
in terms of software and/or hardware timing.
6. You may have connected the Winstar LCD incorrectly to your PIC.
7. Your individual unit of the Winstar LCD may have a problem in it.
8. A particular batch of the Winstar LCDs may have bugs.
9. Your individual PIC may be flaky.
10. Your board may have power supply problems such as droop or noise. |
to 1: Perhaps. I am searching whether there are any bugs or not
to 2: Perhaps. I am searching whether there are any bugs or not
to 3: I searched for bug. But, i did not find anything
to 4: There is no bug in my code that calls the drivers
to 5: The SED1335 and RA8835 completely compatible in according to Hardware. Perhaps, there can't be compability as sofware.
to 6: There is no problem. Because i have more than one. I tried the other ones.
to 7: There is no problem. Because i have more than one. I tried the other ones.
to 8: I do not know.
to 9: There is no problem. Because i have more than one. I tried the other ones.
to 10: these got controlled.
However, i will inform you when something can be good things. If you have some idea, i want to know your idea or some development _________________ MurtiS |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
I think.... |
Posted: Wed Jun 11, 2008 5:09 am |
|
|
I think that there are any problems such as droop or noise or timing speed_? _________________ MurtiS |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
|
Posted: Thu Jun 12, 2008 11:57 pm |
|
|
There is no noise or timing speed... I could not find any error or bug, for now.... _________________ MurtiS |
|
|
Lykos1986
Joined: 26 Nov 2005 Posts: 68
|
|
Posted: Fri Jun 20, 2008 2:19 am |
|
|
Have you found any solution to your problem? I have exactly the same problem, but I am using a regular SED1335 driver! |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
|
Posted: Fri Jun 20, 2008 4:33 am |
|
|
Lykos1986 wrote: | Have you found any solution to your problem? I have exactly the same problem, but I am using a regular SED1335 driver! |
I have not yet any solution. But, i try to find the problem... If you have a solution or any idea, can you share with me_?
Thanks _________________ MurtiS |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
|
Posted: Fri Jun 20, 2008 6:44 pm |
|
|
Absolutely, SED1335 is not fully compatible with RA8835 controller in according to software. If you see the regular driver code for SED1335, we can see the reading problem. So, interesting character or some dot goes on the GLCD Screen. But, there is no idea which line has error.... _________________ MurtiS |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
|
Posted: Mon Jun 23, 2008 2:37 am |
|
|
Do you have any idea_? The problem is going on. _________________ MurtiS |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
|
Posted: Sat Jun 28, 2008 4:40 pm |
|
|
If you call the this header that is below:
Code: | void glcd_pixel(int16 x, int16 y, int1 color)
{
int8 data;
int16 addr;
// Calculate the byte address containing the pixel
addr = GLCD_GRAPHICS_ADDR + (GLCD_WIDTH/8 * y + x/8);
// Read the byte of data at the address
data = getData(addr);
// Turn the pixel on or off
if(color == ON)
bit_set(data, 7 - x%8);
else
bit_clear(data, 7 - x%8);
// Write the new data byte to display memory
setData(addr, data);
} |
error is on the line
Code: | data = getData(addr); |
while the reading byte must be 0b00000000, the reading byte is 0b01000000. I tried to find how the reading byte is changing but this is very hard _________________ MurtiS |
|
|
thiru_electrifiers
Joined: 05 Jul 2008 Posts: 3
|
is this thread still alive ? |
Posted: Mon Jul 14, 2008 7:39 am |
|
|
hi,
i too face the same problem..
the display read command always returns a corrupted data... |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
|
Posted: Thu Jul 17, 2008 8:37 am |
|
|
I have no time for trying another solution now. If we have a solution for this, i will send here... _________________ MurtiS |
|
|
murtis
Joined: 12 Aug 2007 Posts: 41
|
solution1: |
Posted: Tue Jul 29, 2008 8:45 am |
|
|
Error is on the line below:
Code: | data = getData(addr); |
We can solve this problem, but we need the 9Kb on the memory. If we can use the memory of the microcontroller in according to memory of the GLCD, this problem will be solved this problem by this way.
I do not know solution for now _________________ MurtiS |
|
|
|