Mike - K8LH
Well-Known Member
Hi gang,
If at all possible I'd like to avoid a discussion about the merits or shortcomings of popular tutorial software. Instead I'd like to suggest studying the LCD libraries in some high level languages like BoostC and Swordfish BASIC to see what they use for a "bullet proof" initialization procedure for 4-bit interface mode and then decide for yourself.
Here's a quick pseudo code summary;
If at all possible I'd like to avoid a discussion about the merits or shortcomings of popular tutorial software. Instead I'd like to suggest studying the LCD libraries in some high level languages like BoostC and Swordfish BASIC to see what they use for a "bullet proof" initialization procedure for 4-bit interface mode and then decide for yourself.
Here's a quick pseudo code summary;
Code:
Swordfish BASIC LCD 4-bit initialization procedure
1) delay 100-msecs
2) write 4-bit nibble '0011' to LCD
3) delay 5-msecs
4) write 4-bit nibble '0011' to LCD
5) delay 160-usecs
6) write 4-bit nibble '0011' to LCD
7) delay 160-usecs
8) write 4-bit nibble '0010' to LCD ' set 4-bit interface mode
9) delay 160-usecs ' now configure display
Code:
BoostC LCD 4-bit initialization procedure
1) delay 15-msecs
2) write 4-bit nibble '0011' to LCD
3) delay 5-msecs
4) write 4-bit nibble '0011' to LCD
5) delay 150-usecs
6) write 4-bit nibble '0011' to LCD
7) delay 5-msecs
8) write 4-bit nibble '0010' to LCD ' set 4-bit interface mode
9) delay 150-usecs ' now configure display
Code:
K8LH Assembler LCD 4-bit initialization procedure
1) delay 30-msecs
2) write 4-bit nibble '0011' to LCD
3) delay 5-msecs
4) write 4-bit nibble '0011' to LCD
5) delay 160-usecs
6) write 4-bit nibble '0011' to LCD
7) delay 160-usecs
8) write 4-bit nibble '0010' to LCD ' set 4-bit interface mode
9) delay 160-usecs ' now configure display
Code:
A Popular Tutorial Assembler LCD 4-bit initialization procedure
1) delay 100-msecs
2) write 4-bit nibble '0010' to LCD ' set 4-bit interface mode (?)
3) write 4-bit nibble '0000' to LCD ' ???
4) delay 5-msecs ' now configure display
Last edited: