I want to use STM32 to drive a LCM with a KS0108 controller. Sadly, it has a 6800 interface. Fortunately, ST gives a document: TFT LCD interfacing with the high-density STM32F10xxx FSMC . In p. 12 it gives two methods:
But the http://www.techtoys.com.hk/Displays/JHD12864J/ks0108.pdf, states when write to LCD, the data is latched at the falling edge of "E":
Then, assuming we use the method 1 above, the pseudo-code should like:
gpio_E = HIGH; lcd_addr = lcd_data; gpio_E = LOW;
After the second clause, the /CS should goes to high, and the write phase should be end. Then what's the state of the data bus, will it hold the data last output??? Or it will go to high impedance after /CS high? How can we make sure the LCM to latch the correct data?
For method 2, the situation should be similar. In ST's reference manual, it gives the timing diagram when writing:
When the writing phase ends, how long will we expect the data still exist on the data bus?