DON PORADA

EGUI on 9S08QE128 Problems and Hints

Discussion created by DON PORADA on Sep 12, 2011
Latest reply on Oct 20, 2011 by Petr Gargulak

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

Outcomes