How do you increase the baud rate in the CfagWintest?

CPIntern

New member
Hi again, I have the Cfag12864B-TMI-V running in the parallel port with the CfagWintest. I was just wondering if you could increase the baud rate to reduce the time the LCD takes to display an image. The one with the most pixels such as the initialization, logo, and image commands from the Wintest take about 4 seconds. Can you reduce that writing speed by half? If so, how?

I appreciate any help you can give me.

Thanks
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
There is no such thing as baud rate for a parallel port. I believe the Wintest series of demo programs are written with lots of delays in the code. The only thing you could do is write your own code, or download the source code for the Wintest that you are using, shorten the delays, and recompile it.
 

CPIntern

New member
great! Thanks again cosmicvoid. Where would the delays be located in the source code? Just to get an idea, I'm trying to learn C++ so thanks for the patience.
 
The delays are used as a simple way to make sure the pulse widths of the control signals are wide enough to meet the timing spec. There is no simple way, in Windoze, to make microsecond long pulses. It takes a lot of messy code, using the high speed performance counter functions. Otherwise, the timing granularity is only at the millisecond level, which is about a 1000 times longer than the display requires.

Here is some extracted code from the Wintest source file:
Code:
  //Reset is an R-C in the hardware.
  //R/W is set permanently low in the hardware (write-only)

  //These things prety much initialize themselves

  //Idle E
  CLR_E;

  //Talk to the control register.
  CLR_RS;

  //Talk to both controllers
  CLR_CS1;
  CLR_CS2;

  //Display on
  DATA(0x3F);
  SET_E;
  CLR_E;
  Sleep(10);

  //Set Start Line 0
  DATA(0xC0);
  SET_E;
  CLR_E;
  Sleep(10);

  int
    row;
  for(row=0;row<=7;row++)
    {
    //Set X address
    DATA(0xB8|row);
    SET_E;
    CLR_E;
    Sleep(1);

    //Set Y address 0
    DATA(0x40);
    SET_E;
    CLR_E;
    Sleep(1);

    //Aim at the data register.
    SET_RS;

    //Talk to controller 1 only
    SET_CS1;

    int
      col;
    for(col=0;col<=63;col++)
      {
      FDATA(cfag12864b[row][col]);
		  SET_E;
      Sleep(1);
		  CLR_E;
      Sleep(1);
      }

    //Talk to the controller 2
    CLR_CS1;
    SET_CS2;

    for(col=64;col<=127;col++)
      {
      FDATA(cfag12864b[row][col]);
		  SET_E;
      Sleep(1);
		  CLR_E;
      Sleep(1);
      }
Where ever you see the "Sleep(1)" and "Sleep(10)" statements, those are 1 and 10 millisecond delays, which is waaaay longer than necessary. The best way to make things go faster is to test the controller's busy flag, to see when its ready for the next command. But with a PC's parallel port, it is not trivial to change the data bus direction to read the data from the controller. So delays are used. The delays might only need to be 10's of microseconds, but as mentioned above, there is no easy way to do this in Windoze.
 
Top