Expansion made easy ? LCD help SOLVED
Zap-o
Posts: 452
I am pulling my teeth out here.
I am using a serial to parallel chip to run an LCD display. This was brought to my attention in the publication "Nuts and Volts" volume 5 Expansion made easy. Long story short I have it wired up exactly as seen in the publication.
My first problem is that the volume was made for the stamp and I am having trouble converting it into spin. Since I don't know p-basic you can appreciate the difficulties involved.
I often get a letter on the display but things are inconsistent. I looked in the object exchange and downloaded an object. I carefully go through the object and try to emulate when ever possible being careful to deviating when needed, because I am using the serial to parallel chip.
Well I am asking could someone help me out. Below is my code and I believe that I am initializing incorrectly or, perhaps I am enabling the display in the wrong sequence.
Post Edited (Zap-o) : 2/11/2010 5:38:03 PM GMT
I am using a serial to parallel chip to run an LCD display. This was brought to my attention in the publication "Nuts and Volts" volume 5 Expansion made easy. Long story short I have it wired up exactly as seen in the publication.
My first problem is that the volume was made for the stamp and I am having trouble converting it into spin. Since I don't know p-basic you can appreciate the difficulties involved.
I often get a letter on the display but things are inconsistent. I looked in the object exchange and downloaded an object. I carefully go through the object and try to emulate when ever possible being careful to deviating when needed, because I am using the serial to parallel chip.
Well I am asking could someone help me out. Below is my code and I believe that I am initializing incorrectly or, perhaps I am enabling the display in the wrong sequence.
Pub SetUp | Temp ms(16) ' Wait for more than 15 ms Temp := WritePort(0,%0011_0000) Enable ' Toggle Enable line ms(5) ' Wait for more than 4.1 ms Temp := WritePort(0,%0011_0000) Enable ' Toggle Enable line ms(1) ' Wait for more than 100uS Temp := WritePort(0,%0011_0000) Enable ' Toggle Enable line Temp := WritePort(0,%0011_1100) ' Function Set Enable ' Toggle Enable line Temp := WritePort(0,%0000_1000) Enable ' Toggle Enable line Temp := WritePort(0,%0000_0001) ' Clear Display Enable ' Toggle Enable line Temp := WritePort(0,%0000_0100) ' Entry Mode Enable
Post Edited (Zap-o) : 2/11/2010 5:38:03 PM GMT
Comments
I borrowed code form the LCD object and fullduplexserial to finish the object. It works great. I still need to include the buttons but that should be simple.