Hi I'm working on a little project, but I ran in to a little problem that I dont seem to be able to solve.
I want to be able to write text on my graphic LCD (KS0108B circuit) without using to much of the memory.
I was hoping to create something similar to the LCDout function.
For example: LCDout "IE"
I'm using this config for the datapins:
MCU--------LCD
portd.0 = pin7 (DB0)
portd.1 = pin8 (DB1)
portd.2 = pin9 (DB2)
portd.3 = pin10 (DB3)
portd.4 = pin11 (DB4)
portd.5 = pin12 (DB5)
portd.6 = pin13 (DB6)
portd.7 = pin14 (DB7)
portb.2 = pin6 (Enable)
So the letter "I" for example would be:
PORTD = %11111111
PORTB.2 = 1 ' Enable activated
Pauseus 1
PORTB.2 = 0 ' Enable deactivated
and the letter "E" would be:
PORTD = %11111111
PORTB.2 = 1 ' Enable activated
Pauseus 1
PORTB.2 = 0 ' Enable deactivated
PORTD = %10001001
PORTB.2 = 1 ' Enable activated
Pauseus 1
PORTB.2 = 0 ' Enable deactivated
PORTD = %10001001
PORTB.2 = 1 ' Enable activated
Pauseus 1
PORTB.2 = 0 ' Enable deactivated
PORTD = %10001001
PORTB.2 = 1 ' Enable activated
Pauseus 1
PORTB.2 = 0 ' Enable deactivated
PORTD = %10001001
PORTB.2 = 1 ' Enable activated
Pauseus 1
PORTB.2 = 0 ' Enable deactivated
And so on...
The only problem is that I dont know how to divide a string into seperate letters.
So If anyone has the answer please answer, and If you don't understand what the heck I'm talking about please let me know and perhaps I can explain a little better.
Bookmarks