Problems using a 1x8 chars LCD
David VanHorn email (remove spam text)
At 07:48 PM 1/10/01 +0100, Andreas Eriksson wrote:
> >Dosen't this require NOPs between the instructions, to get around the
> >read-modify-write "feature"?
A peculiarity of Pics, where subsequent BCF/BSF operations in any order,
may cause undesired results, due to the way that the pic outputs data to
Start with two bits at zero
You would expect PORTB to now be XXXXXX11, but it may be XXXXXX10
What happens is that the BSF instruction reads port B into a temp register,
sets the bit, then writes it back out to the port.
If bit 0 on the processor pin hasn't had time to come high, then the next
BSF (Or BCF) will read it as a zero, and write it back out as a zero.
The key point is that there's only 1/4 clock between the time that the
first output happens, and the second instruction is reading.
It's in the pic manuals.
>Arent you supposed to just set RS=0(instruction, not data) RW=0(write)
From my AND data book, the sequence is
/RS,/RW,/E <delay 140ns>
/RS,/RW,E <delay 450ns>
/RS,/RW,/E <delay 10ns>
At this point, RS, RW, and data are free to change.
The delays are only an issue with very fast pics (or slow AVRs)
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email mitvma.mit.edu with SET PICList DIGEST in the body listserv
In reply to: <firstname.lastname@example.org>
See also: www.piclist.com/techref/io/lcd/pic.htm?key=lcd
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the