View previous topic :: View next topic |
Author |
Message |
MegatroniC
Joined: 08 Dec 2009 Posts: 35
|
KS0108 problem with the initialization |
Posted: Wed Jun 27, 2012 7:12 am |
|
|
Hi there.
I have a problem with initialization.
I use driver HDM64GS12.
Sometimes after the start, missing pixels in the image, sometimes it's okay.
After initialization glcd_init (ON), I put a timeout of 200ms.
PIC18F4620 chip is to 8MHz
fuses:
Code: | #FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES PUT //Power Up Timer
#FUSES BORV27 //Brownout reset at 2.7V
#FUSES NOPBADEN //PORTB pins are configured as digital I/O on RESET
#FUSES NOLPT1OSC //Timer1 configured for higher power operation
#FUSES MCLR //Master Clear pin used for I/O
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES PROTECT //Code protected from reads
#FUSES CPD //Data EEPROM Code Protected
#FUSES NOWRTD //NO Data EEPROM write protected |
Do not use the reset signal for display, it is connected to 5V
What can you explain that?
thanks |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Wed Jun 27, 2012 8:36 am |
|
|
I'd put the delay _before_ you try to initialise the display.
Manufacturers data sheet for your unit, will specify how long is needed after power-on, before it is ready to work. It'll also specify what the unit considers to be 'power on'. It is quite common for these units to need 75mSec or more after the PIC wakes, before they are ready to start working.
Best Wishes |
|
|
MegatroniC
Joined: 08 Dec 2009 Posts: 35
|
|
Posted: Thu Jun 28, 2012 12:19 am |
|
|
Thanks for the reply.
in the datasheet says to wait more than 30ms after power on.
I put a delay before initialization - 100ms, but has no effect.
Here's the problem:
when it works well
when there is a problem
regards
edit:
display - VATRONIX TG12864D0-02WA0_A00 |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Thu Jun 28, 2012 6:10 am |
|
|
How 'solid' is the 5 volt supply ? Good for 1 amp or more?
Do you have bypass caps + filter caps near the PIC and the LCD ?
Is this a PCB or breadboard?
Are connections to LCD soldered or jumpers?
It _might_ still be a timing issue, try pwrup-delay500ms-initLCD-delay500ms-rest of program.
try 'things' ,see what happens, report back,
hth
jay |
|
|
MegatroniC
Joined: 08 Dec 2009 Posts: 35
|
|
Posted: Fri Jun 29, 2012 6:33 am |
|
|
temtronic wrote: | How 'solid' is the 5 volt supply ? Good for 1 amp or more? |
The scheme is fed through the stabilizer 5 volts.
I put the transformer that provides up to 2 amps, but has no effect.
temtronic wrote: |
It _might_ still be a timing issue, try pwrup-delay500ms-initLCD-delay500ms-rest of program.
|
It also does not help :(
temtronic wrote: |
Is this a PCB or breadboard?
Are connections to LCD soldered or jumpers?
|
Use a breadboard.
I try to put filter capacitors ...
The problem occurs most often in rapidly switching the power, and very rarely in the power when it was a long time off.
Greetings to all. |
|
|
|