Nick,I'm a bit confused as to how the code is really working on the read side.The data lines should be read 320ns after E is raised but *before* E is loweredbecause the data is only guaranteed to be valid on the data bus 10ns after E is lowered.

If I look at readData() it raises and lowers E twice which will do the "dummy" read and thenthe real "read",but it isn't valid to read the data lines on the data bus *after* you lower E sincethe glcd is supposed to tri-state the data bus when E is low.So the validity of the data lines is rapidly collapsing between when theloop ends and when the data lines are sampled lower in the routineSince just a single AVR instruction is going to take more than 10ns I'm not surehow the code can read the data from the glcd.

Were you getting valid data on your glcd reads? or just always getting 0 or FF?i.e. does line() work properly by overstriking the existing pixels?Am I missing something?

Were you getting valid data on your glcd reads? or just always getting 0 or FF?i.e. does line() work properly by overstriking the existing pixels?

Yes I was.Yes it does.

Interesting... I'm kind of surprised.

hmm. I wonder if it is glcd specific and some glcd modules disable the bus in s/w vs hardware(which might make the validity stretch beyond the E dropping a while longer)or maybe they use R/W to determine when to drive the bus and not actually gate it with E.The samsung ks0107/8 spec and all of the glcd specs I have showthe read data only being valid while E is high.They may not have really implemented it that way but its probably best/safest to read the data when E is high - That's what I do in the glcd library.

He made ??his project and it works perfectly.I have a question with arduino rookie.I see in the library instruction to display on the LCD voltage value is refreshed every 5 seconds. It is a decimal variable (eg 230.33 volts)I've tried with:lcd.letter (voltage);But I get an X.

Hello.This is the only post on internet that talk abour glcd with st7920 controller connect in i2c to arduino.I have this display http://mikroshop.ch/pdf/QC12864B.pdf.there isn't CS1 and CS2 !there is a chance a use this display with i2c expander mcp23017.