CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

GLCD 128x64 flickers

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
javi.ar



Joined: 17 Feb 2006
Posts: 59
Location: Argentina

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

GLCD 128x64 flickers
PostPosted: Sat Jul 05, 2008 4:33 pm     Reply with quote

Hi I have a glcd 128x64 with this fuses
Code:

#include <18F4525.h>
#device ICD=TRUE
#device adc=8

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES WDT128                   //Watch Dog Timer uses 1:128 Postscale
#FUSES H4                       //High speed osc with HW enabled 4X PLL
#FUSES NOPROTECT                //Code not protected from reading
#FUSES IESO                     //Internal External Switch Over mode enabled
#FUSES BROWNOUT                 //Reset when brownout detected
#FUSES BORV21                   //Brownout reset at 2.1V
#FUSES PUT                      //No Power Up Timer
#FUSES NOCPD                    //No EE protection
#FUSES STVREN                   //Stack full/underflow will cause reset
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES LVP                      //Low Voltage Programming on B3(PIC16) or B5(PIC18)
#FUSES NOWRT                    //Program memory not write protected
#FUSES NOWRTD                   //Data EEPROM not write protected
#FUSES NOEBTR                   //Memory not protected from table reads
#FUSES NOCPB                    //No Boot Block code protection
#FUSES NOEBTRB                  //Boot block not protected from table reads
#FUSES NOWRTC                   //configuration not registers write protected
#FUSES NOWRTB                   //Boot block not write protected
#FUSES NOFCMEN                  //Fail-safe clock monitor enabled
#FUSES NOXINST                  //Extended set extension and Indexed Addressing mode enabled
#FUSES NOPBADEN                 //PORTB pins are configured as analog input channels on RESET
#FUSES LPT1OSC                  //Timer1 configured for low-power operation
#FUSES NOMCLR                   //Master Clear pin enabled

#use delay(clock=40000000)
#use rs232(baud=19200,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,errors)


and the output on the screen flickers .
But with this changes

Code:

#FUSES HS
#use delay(clock=10000000)


stops flickering but I cannot get RS232 communication
CCS VER 4.068

I am using original HDM64GS12.c file. with the FAST_GLCD option defined.

The question is why is this behaviour? Thanks a lot
Ttelmah
Guest







PostPosted: Sun Jul 06, 2008 3:00 pm     Reply with quote

The serial should work in both cases. What is your crystal?.
Have you removed the 'H4' fuse?.
If not, the system will still be running at 40Mhz, but the UART timings will be set based upon a 10Mhz rate, which would explain the failure.
My guess, would be that the 'flicker' is actually being caused by your code, not the LCD driver. I'd suspect you have some delay_us, or delay_ms calls in your own code, leading to the flickering. If the H4 fuse is still present, these are being executed 4* faster, and the flickering disappears.
The LCD code itself, does not use the delay timings (the only timings used are _cycle_ based delays, which do not use the 'clock' value.

Best Wishes
crystal_lattice



Joined: 13 Jun 2006
Posts: 164

View user's profile Send private message

PostPosted: Tue Jul 08, 2008 7:17 am     Reply with quote

The delay_cycles COULD be a problem, if the driver has used a 'pre' calculated delay based on the timing of a cycle, you could encounter problems when changing the crystal.

I've encountered some strange problems with a LCD when changing to faster speed and not adjusting the delay_cycles routines accordingly. Worth looking into...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group