Reading from HD44780-based LCDs

You don't want to 'pulse' the enable pin, you just want to drive it high.

Well, shiver me timbers...

state lcd_readState(LCD *l){
        digitalWrite(l->rw_pin, HIGH);
        digitalWrite(l->rs_pin, LOW);
        digitalWrite(l->enable_pin, HIGH);
        pinMode(l->datapin[l->bitmode - 1], INPUT);
        state s = ((digitalRead(l->datapin[l->bitmode - 1]) == LOW)? READY : BUSY);
        pinMode(l->datapin[l->bitmode - 1], OUTPUT);
        return s;
}

This is the implementation I used before I made the lcd_getRaw() function. I don't recall why, but I drove like the enable pin to high before the reading is performed. Perhaps I did it by mistake, perhaps not, I didn't comment it, sadly. All I can say is, it looks like only half the implementation there was done correctly. I never set the enable pin back to low.

I'm still rewriting all this mess though. The prototype is already at my subversion repository on Google Code, if anybody wants to take a look at it and comment on it.

Thanks for all the help so far,
Orlando.