Thanks Darrel,
now I'm wiser, again thanks.
With the delays......
To shift out one byte (Data or Command) after LCDInit it needs 4 Steps.
One Step require a time nearly 910µs - 1ms.
That makes nearly 4ms. => No extra Delay necessary. Right?
The First 4 commands in the LCD_Init part needs only 2 Steps, because only the 4 upper bits shifted out.
There, I'm agree with you that the delay should be longer.
Could I place them here: ?
Code:
LCD_Init:
ShiftOut_Steps = 1
Char = $33 : gosub LCDsendCOM : @ DelayUS 5000
gosub LCDsendCOM : @ DelayUS 600
gosub LCDsendCOM : @ DelayUS 600
Char = $22 : gosub LCDsendCOM : @ DelayUS 600 ; Start 4-bit mode
.........
.........
.........
Further I tested again with other frequencies.
I use 8 Mhz and a 20 Mhz quarz.
Also there are, no problems. It runs stable.
What I find out is that it is absolute necessary, to add an capacitor between +V and GND of the 74HC595.
I use an 100nF.
Otherwise you get sometimes error in displaying the right things.
The capacitor for the Latch Pulse, I would change back to 2.2nF. And the capacitor for the 1 or 0 Pulse should be left at 4.7nF.
Here are some picture make with my mini DSO.
Clock Pulse

Pulse 1 or 0 with 2.2nF

Pulse 1 or 0 with 4.7nF

Latch 2.2nF & Latch 4.7nF
Bookmarks