Pages: 1 [2]   Go Down
Author Topic: T6963C error  (Read 1222 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Everyone

Oliver (olikraus)  It's nice that You wrote here the post, I thought about contacting with You, I made progress in locating the problem in U8glib and I find the workaround for this problem(it can also be considered as a solution of the problem).

The problem is related with "how many dot use for one char" exactly T6963C controller must be informed about "font system" what the program will use.

Please look on the description of the inputs for T6963C controller


Input 19 FS1:
 - signal HIGH - 6x8
 - signal LOW - 8x8

In libraries T6963c the initialization must look like in this way:
Code:
T6963(int pixHoriz,int pixVert,int fontWidth, int sizeMem); //Class
  //pixHoriz = Horizontal resolution
  //pixVert = Vertical Resolution
  //fontWidth = pixel width of font, determines number of columns, use hardware setting for LCD, no outputs linked to this variable.
  //sizeMem = size of memory attached to LCD in kb s/b 4,8,16,32,64 type number.

And here some example of declaration:
Code:
T6963 LCD(240,64,6,32);// 240x64 Pixel and 6x8 Font
Code:
T6963 LCD(240,64,8,32);// 240x64 Pixel and 8x8 Font

Based on my tests, I came to the conclusion that libraries u8glib working on the system 8x8 and my LCD was set on the system 6x8 and this is reason of the duplicating the lcd screen.


To resolve my problem I change screen setting to system 8x8 (by sending LOW signal to FS1 input) and the U8glib works almost perfectly,


Almost, because the font is big and take a lot of space, next thing is to use the smaller font then default (U8glib libraries have very nice support for fonts http://code.google.com/p/u8glib/wiki/fontsize)
In all example from U8glib we can find the command which defines the font size and type, we can change it  smiley  (I used a smaller, 7pixel ), here is definition of font:
Code:
u8g.setFont(u8g_font_fixed_v0);

And now the screen looks better:


I'm thinking that, this is not a permanent solution of the problem and surely we can solved this by made some changes in the code, I will be try to solve this, but U8glib libraries is big (that good because it have a lot of nice staff) and it will take some times.  smiley-wink
« Last Edit: December 15, 2013, 10:28:31 am by rat- » Logged

Germany
Online Online
Edison Member
*
Karma: 100
Posts: 1234
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Amazing work. Thanks a lot.
As a conclution, U8glib will work correctly if FS1 is set to GND, correct?
In fact, U8glib has been written by assuming that FS1 is set to GND. From my perspective i do not see a need to support the 6x8 mode for the T6963 controller. All graphics output can be done in 8x8 mode, correct?

All in all good pictures and nice summery so far. I will try to send the beer via paypal  smiley-wink
Please send me a PM with your e-mail for this...

Oliver
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

As a conclution, U8glib will work correctly if FS1 is set to GND, correct?

Yes, libraries u8glib works perfectly with T6963C when FS1 is set to GND, and I have to say that, my earlier problem was made by my fault, because today I find note in u8g_dev_t6963_240x64.c line 43-46
Code:
  Notes:
    The font selection pins should generate the 8x8 font.
    For the MGLS240128TZ only FS1 is available on pin 18.
    FS1 must be low to generate the 8x8 font.

From my perspective i do not see a need to support the 6x8 mode for the T6963 controller. All graphics output can be done in 8x8 mode, correct?
I agree with this.
Here some images, how cool works the U8glib libraries:



U8glib libraries works very good with T6963c and now I thinking  that, there is no need to doing ​any changes in code, a lot of LCD screen based on T6963c controller are built so that the default FS1 is connected to GND (8x8), anyway good job with that libraries  smiley-money !!

My fault, no beer for me  smiley-roll
Logged

Germany
Online Online
Edison Member
*
Karma: 100
Posts: 1234
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
  Notes:
    The font selection pins should generate the 8x8 font.
    For the MGLS240128TZ only FS1 is available on pin 18.
    FS1 must be low to generate the 8x8 font.

This is also described at the end of this page (before the comments):
http://code.google.com/p/u8glib/wiki/device

All in all i see this as a valuable contribution to u8glib. Let me pay the beer...

Oliver
Logged

Online Online
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

my Project: Digital Powersupply with 128x128 GLCD.
My System: DualCore 2x2000Mhz, Windows XP Prof. SP3 and Ubuntu 13.10(prefered)
Arduino Nano w. Atmega 328 and Arduino 1.05 IDE (earlier 0022)

after changing from arduino 0022 to 0105 i have also some troubles with the glcd_lib ...
i made the changes from WProgram.h to Arduino.h, that works.

The error message is:

/usr/share/arduino/sketchbook/libraries/T6963_Lib/GLCD_Clock.c:18:1: error: expected identifier or ‘(’ before numeric constant
 0x00,0x00,0x00,0x00,0x07,0x3F,0x20,0x00,0x00,0x00,0x00,

The funny thing is, i don't use GLCD_Clock !!!
#include "T6963.h"
#include <Times_New_Roman__14.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <digitalWriteFast.h>


I had a look at the GLCD_Lib.h and .cpp, but there is nowhere a text named with that GLCD_Clock at all.
Even if i delete those GLCD_Clock files, the error-message is the same!
Does anyone has an idea?

I have also tried to use u8g, it's a really great Lib, BUT..... on my Hardware WAY TO SLOW !
I don't know, if that is normal, but i don't think so...
It takes abeout 10secons (!!) to build one screen!

So i decided to stay with the GLCD Lib...

i hope someone can help me?

Regards,
Wolfram.
 ^
« Last Edit: April 19, 2014, 10:57:07 am by mega-hz » Logged

Germany
Online Online
Edison Member
*
Karma: 100
Posts: 1234
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

U8glib does not directly support a 128x128 display. How did you made it work with your display?
U8glib should be also faster. But without code and actual wiring it is difficult to say anything.

Unfortunately i can not say anything to your other lib.

Oliver
Logged

Online Online
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i copied and changed some parts for the 128x128:
in ug8lib.h:
Code:
class U8GLIB_T6963_240X128 : public U8GLIB
{
  public:
    U8GLIB_T6963_240X128(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
        uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE)
      : U8GLIB(&u8g_dev_t6963_240x128_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
      { }
};
class U8GLIB_T6963_128X128 : public U8GLIB
{
  public:
    U8GLIB_T6963_128X128(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
        uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE)
      : U8GLIB(&u8g_dev_t6963_128x128_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
      { }
};


class U8GLIB_T6963_240X64 : public U8GLIB
{
  public:
    U8GLIB_T6963_240X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
        uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE)
      : U8GLIB(&u8g_dev_t6963_240x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
      { }
};

class U8GLIB_T6963_128X64 : public U8GLIB
{
  public:
    U8GLIB_T6963_128X64(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
        uint8_t cs, uint8_t a0, uint8_t wr, uint8_t rd, uint8_t reset = U8G_PIN_NONE)
      : U8GLIB(&u8g_dev_t6963_128x64_8bit, d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd, reset)
      { }
};

and in ug8.h:

Code:
/* T6963, all t6963 devices have double page (2x) */
extern u8g_dev_t u8g_dev_t6963_240x128_8bit;
extern u8g_dev_t u8g_dev_t6963_128x128_8bit;
extern u8g_dev_t u8g_dev_t6963_240x64_8bit;
extern u8g_dev_t u8g_dev_t6963_128x64_8bit;

in the source code is:
Code:
U8GLIB_T6963_128X128 u8g(2, 3, 4, 5, 6, 7, 8, 9, 16, 17, 14, 15, 14);
// 8Bit Com: D0..D7: 2,3,4,5,6,7,8,9,16,17,14,15,14,      a0=14,a1=15...sind.analog pins

attached the datasheet of the lcd and the arduino1.05 listing ...

Reset and FS are hardwired.

Regards,
Wolfram.




* PVG121202BWE06 SPEC.pdf (779.5 KB - downloaded 2 times.)
* dng3003_u8g.ino (23.35 KB - downloaded 2 times.)
« Last Edit: April 19, 2014, 11:01:01 am by mega-hz » Logged

Germany
Online Online
Edison Member
*
Karma: 100
Posts: 1234
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Servus

The delay is mainly caused by the calculation within the U8glib "picture loop". Move anything which is not related or required for drawing outside the loop:

Currently it looks like this in your code:
Code:
  u8g.firstPage(); 
    do {
    main_screen();
    draw();
  volt = map(analogRead(7),0,1023,0,3366);
  amp = map(analogRead(6),513,1023,0,5000);
  watt = ((volt) * (amp));
  tasten();
  temperatur();
  }
  while( u8g.nextPage() );
Instead, do this:
Code:
  volt = map(analogRead(7),0,1023,0,3366);
  amp = map(analogRead(6),513,1023,0,5000);
  watt = ((volt) * (amp));
  tasten();
  u8g.firstPage(); 
    do {
    main_screen();
    draw();
  temperatur();
  }
  while( u8g.nextPage() );

More optimization is possible within "temperatur()".

Oliver
Logged

Online Online
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

i tried that, but it is still extremly slow...
I just made a test with only the lcd, everything else is not running, i get a speed of 5 seconds !
Thats much too slow...


Did you have a look at the datasheet? maybe something has to change in the u8glib?

By the way:
is it possible to use the LCD-Text-Mode with ug8lib or does it always use the graphic-mode?

Happy Eastern,
Wolfram

* dng3003_u8g_lcd_only.ino (25.28 KB - downloaded 0 times.)
Logged

Germany
Online Online
Edison Member
*
Karma: 100
Posts: 1234
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I just made a test with only the lcd, everything else is not running, i get a speed of 5 seconds !
Did you tried to run the GraphicsTest.ino from the U8glib examples. It includes some animations. Is it as slow as your code?

Quote
is it possible to use the LCD-Text-Mode with ug8lib or does it always use the graphic-mode?
Text-Mode is not supported for the T6963. U8glib is optimized for monochrome graphics LCDs/OLEDs with SPI interface. I added support for T6963 to U8glib because all other libs did not work any more for Arduino 1.xx. Have you been able to update one of the existing libs?

Oliver
« Last Edit: Today at 06:26:55 am by olikraus » Logged

Online Online
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
i tried the graphic-demo and fps, i also made 3 avi's of the display.
FPS :
3.2 draw
1.6 clearscreen
1.9 draw @
1.0 draw Pixel.
I don't know if the speed of the graphic demo and fps are ok or slow too, you may know that better..

See also the avi with my sketch DNG-3003...!
http://www.mega-hz.de/forum_bilder/DSCN9932.AVI
http://www.mega-hz.de/forum_bilder/DSCN9933.AVI
http://www.mega-hz.de/forum_bilder/DSCN9935.AVI


I could manage to update the t6963lib to work with arduino 1.04, was only the swap of WProgram.h to Arduino.h,
but this works only under WinXP, the 1.04 or 1.05 Linux Version of the Arduino IDE makes a funny error...
i think, it is something with the avr-compiler under ubunto, what makes some error.

regards,
Wolfram
Logged

Germany
Online Online
Edison Member
*
Karma: 100
Posts: 1234
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately i can not play AVI files on my Ubuntu machine, but FPS seems to be normal for that type of display.

Thanks a lot for reporting,
Oliver
Logged

Pages: 1 [2]   Go Up
Jump to: