EGUI on 9S08QE128 Problems and Hints

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

EGUI on 9S08QE128 Problems and Hints

1,619 Views
dporada
Contributor III

I have been working on a project using a 9S08QE128 and EGUI.  I had to change from a small memory model to a banked on and my program crashed and burned.  With the help of a FAE friend, we found some of the problems, but I still could use some help.  Remember that these are un-official fixes.

 

Apparently the D4D routines were not written with the banked memory model in mind.  Some of the routines are written in assembler and use a rts to return from the routine.  Unfortunately the routine may be placed in memory that could require a rtc to return.  Here is the current hack that I am using to help this problem.

 

Change from: rts

 

To:#ifndef __BANKED__ 

      rts                                /* return from subroutine */
      #else
      rtc
     #endif
In the "I'm not sure why it worked before" category, when you step through the d4dlcd_SSD1289.c code, the processor first tries to execute the init_data instead of loading it into the LCD.  We changed "const unsigned int" to "static const unsigned int" to get around this problem.

Here's what I have not been able to solve.

I have some labels that change text on the screen.  When they are located in the center of the screen, everything is fine.  If the labels are on the right side of the screen, some of the characters of text do not display correctly.  Sometimes they change to a black block, sometimes a scrambled character.  Changing the text box up or down in size a few pixels sometimes fixes this.  Sometimes it can only be fixed by adding some spaces to the text.

Does anybody know how to fix this problem?

Thanks,

Don
Labels (1)
0 Kudos
Reply
18 Replies

1,192 Views
Gargy
NXP Employee
NXP Employee

Hi,

 regarding yuor issue with labels: Place here part of code that you are using for label declaration, label set new text and also used font(complete font structure) to rty replicate your issue.

 

Gargy

0 Kudos
Reply

1,192 Views
dporada
Contributor III

I have attached d4d_screen_ID_setup that is the complete screen.  There are 8 fields that chan be changed by the user that should be the same.  The label Text_ID6 displays incorrectly.

 

Thank you for your help.

 

Domn

 

 

0 Kudos
Reply

1,192 Views
Gargy
NXP Employee
NXP Employee

Hi,

 do you have secure that all strings are terminated by zero?? Because you setup for all time only first character of text.

 

just check

 

Gargy

0 Kudos
Reply

1,192 Views
dporada
Contributor III

I think I have changed the file to do as you suggested, but I have the same results.

 

Don

0 Kudos
Reply

1,192 Views
Gargy
NXP Employee
NXP Employee

Hi, at the moment I don't have any idea. If you have the TOWER system with TWR-LCD and if you can replicate the same problem on this system and create complete project that you can share on forum every thing should be more easy.

 

Or at least somescren shot to imagine what happen on screen.

 

The code looks fine.

 

Gargy

0 Kudos
Reply

1,192 Views
dporada
Contributor III

Take a look at this.

 

Don

0 Kudos
Reply

1,192 Views
Gargy
NXP Employee
NXP Employee

Hi this looks like that you have corrupted fonts in your project.

 

Can you share the fonts files? c + h?

 

Gargy

0 Kudos
Reply

1,192 Views
dporada
Contributor III

Gargy,

 

Here's the font files.

 

Don

0 Kudos
Reply

1,192 Views
dporada
Contributor III

Well, I fixed the problem.  It wasn't a software problem.  I turned on the slew rate control for my data port and the problem goes away.  There must be some crosstalk between the control lines and the data.

 

Now I have a new problem with the D4D_GRAPH.  I want to display 240 data points on the X axis.  I don't know how to make the graph the correct size.  The cx used when the graph is declared appears to be the overall size of the graph including the text.  Since I am using the callback function to put my own labels on the axes, the size of the labels can vary.

 

Is there a way to have the x axes scale itself so that it will fill the screen but only show 240 data points?

0 Kudos
Reply

1,192 Views
Gargy
NXP Employee
NXP Employee

Hi, in your own text for labels, eGUI before drawing call dummy callback function "NeedLabel" to find out the worest case and then compute the real size of graph.

 

And for rescaling data points to real size of graph you can use one of these functions:

D4D_BOOL D4D_GraphSetScaleX(D4D_OBJECT_PTR pObj, Byte mul, Byte div);D4D_BOOL D4D_GraphSetDataWidth(D4D_OBJECT_PTR pObj, D4D_INDEX samples);

 Gargy

0 Kudos
Reply

1,192 Views
dporada
Contributor III

Gargy,

 

After some fooling around, I got the scaling to work correctly.  This has reveiled a new problem.  When the screen switches to the graph, it displayes correctly.  When I redraw the graph, it is also correct.  When I switch to another screen, and then go back to the graph, the graph does not draw the first data point at the left side of the graph.  Usally, the last point of data is somewhere in the middle of the graph and when it is time to update the graph, the graph draws from the last data point in the middle of the graph filling to the right side of the graph and then wrapping around from the left and ending again in the middle of the graph.

 

If I try using the D4D_GraphClearAll function when I start the main function of the graph screen, the screen still draws incorrectly a few times and eventually does the ClearAll function, then all is well and the graph draws correctly.

 

Any suggestions?

 

Don

0 Kudos
Reply

1,192 Views
Gargy
NXP Employee
NXP Employee

Hi,

 the start point of drawing data depends on the length of data buffer and last added value (order). As I remember. And the Clear data function I will add to project queue to check the right functionality.

 

GArgy

0 Kudos
Reply

1,192 Views
dporada
Contributor III

Gargy,

 

Let me try to explain the problem with some more detail.

 

When I return to the graph, the drawing routine is the same as the first time the screen is shown.  The graph is always drawn using D4D_GraphAddTraceData in a loop that is the same as the number of data points.  It will redraw new data time after time until I leave the graph screen.  

 

When I return to the graph screen, the screen draws the axis labels, the grid, erases the grid and redraws it, and then starting from the left starts graphing the data from the middle of the array.  After it reaches the end of the array, it starts graphing from the beginning.  When it reaches the right side, it erases and starts over.  After doing this around 3 times, it stops when it reaches the end of the data array which is in the middle of the graph.   When the graph is given the flag to redraw, the data is added to the place where the graph stopped and continues to the right side of the graph.  When the graph is full, it erases and draws until it draws the last data point back in the middle of the graph. 

 

Is there way to reset the index to force the graph to start from the beginning?

 

Is there a way to stop the graph from re-drawing multiple times when I return to it?

 

Don

 

0 Kudos
Reply

1,192 Views
Gargy
NXP Employee
NXP Employee

I add your request to the eGUI project queue, and the multiple redrawing is done as I think by count of data buffer that you specified during declaration of this object.

 

0 Kudos
Reply

1,192 Views
dporada
Contributor III

What exactly does "add your request to the eGUI project queue" mean?

0 Kudos
Reply

1,192 Views
Gargy
NXP Employee
NXP Employee

Hi,

 this mean that all eGUI developers are really busy by other tasks and I just put the information of possible bug into eGUI work queue and when anybody has some time, then the problem will be analyse.

 

 

0 Kudos
Reply

1,192 Views
dporada
Contributor III

Gargy,

 

Any temporary work around for this problem?

 

Don

0 Kudos
Reply

1,192 Views
Gargy
NXP Employee
NXP Employee

Hi,

 we are very busy in these days on very importance project, sorry.

 

Just try to find the bug your self :smileysad:, I will be more than happy if anybody reports any solved bug with solution.

 

Gargy

0 Kudos
Reply