Hi,
i am now working at the LCD side.
I have found a little thing that have me make at begin with the work confuse.
For my Board I have setup a Generic 16x1 LCD at PortB0 ( 8 Databit ) with Register Select PortA.1 and Enable PortA.2
In First time i simple make a initialise at start by call the macro "Start"
Then i PrintString("Hello World") and wounder me why only the first 8 character was showing.
So i have seen the Macro Call "Cursor"... i think by myself that must i do to go on to the 9 Character pos and make two sending strings..
PrintString("Hello Wo")
Cursor(9,0)
PrintString("rld!")
This was running in Simulation but the string was "Hello Wo rld!"
i change it to
PrintString("Hello Wo")
Cursor(8,0)
PrintString("rld!")
This runs in Simulation well..but
this don't do the job in Hardware..
so i test the Macro Command...
PrintString("Hello Wo")
Command(0x0c0) ..........// This is a command usually go on at 9. Char...for me at this LCD i have this run for me... pls check it in your hardware description before you use it....
PrintString("rld!")
and..
vola..
Hello World!
^^^^^^^^^^^
If someone has a Tip for this to make the strings comfortable as i do please let me know..
i am new in this ...
Thank You!
Best wishes
Rudi
Edit1:
Ok...
I have test a other way at this..
the appropriate memory addresses for the 16 characters are 00h - 0Fh. This should be initialized as a 1-line device. First 8 characters are at 00h - 07h and the others are at 40h - 47h.
This can be initialized as a 2-line device.... After writing the first 8 characters, the cursor is moving at the location 40h (9th charachter) using my command: 0C0H for my LCD...
many LCD are compatibel but... is not so practikabel because all manufactory are not allways the same...so i have set the 16x1 in first example as a 1 Row - 16 Columns LCD...
...now i have set the 16x1 LCD as a 2 Row - 8 Columns LCD
so i can write the first 8 Character in "line1" ... this are the Character 1-8
and write in seconde line the next 8 Charcter in "line2" .. this are the Character 9-16
by simple calling the macro Cursor(x,y) and i do not remember me for calling commands by hex like Assembler..
..
MOV A,#0C0H
ACALL COMMAND
..
so simple..
PrintString("Hello Wo")
Cursor(0,1) // <- ................................// this make the cursor to the secon "line" .. i configured the character 9-16 as a second line in LCD Properties..
PrintString("rld!")
..vola...
Hello World!
^^^^^^^^^^
16x1 LCD GENERIC 8 First Character..next 8 Character
For questions and comments on programming in general. And for any items that don't fit into the forums below.
Return to “General Programming”
Jump to
- Announcements
- ↳ Announcements
- The Knowledge Exchange
- ↳ Programming Tips & Tricks
- ↳ Freelance Embedded Engineers
- ↳ Article Discussion
- Microcontroller Programming
- ↳ General Programming
- ↳ Flowcode V9
- ↳ Flowcode V8
- ↳ Feature Requests
- ↳ Bug Reports
- ↳ User Components
- ↳ Flowcode V7
- ↳ User Components
- ↳ Feature requests
- ↳ Bug reports
- ↳ Fixed bugs
- ↳ 8-Bit PIC
- ↳ 16-Bit PIC
- ↳ 32-Bit PIC
- ↳ AVR & Arduino
- ↳ 32-Bit ARM
- ↳ Poll Discussion
- ↳ Flowcode V6
- ↳ Flowcode v6 Beta
- ↳ Bug reports
- ↳ Getting Started
- ↳ User Components
- ↳ Feature requests
- ↳ Bug reports
- ↳ Flowcode V5
- ↳ Flowcode V5 Issues
- ↳ Flowcode V5 Suggestions
- ↳ Flowcode V5 Free Edition
- ↳ Flowcode V4
- ↳ Flowcode 4 Bugs
- ↳ Flowcode 4 Suggestions
- ↳ Flowcode V2 & V3
- ↳ General / Misc
- ↳ Components (Comms)
- ↳ Components (Other)
- ↳ Bugs / Application Errors
- ↳ Suggestions
- ↳ BTEC Unit 6
- ↳ C and ASM Programming
- ↳ E-blocks
- ↳ Formula AllCode
- ↳ Formula Flowcode
- ↳ MIAC
- Language Support Forums
- ↳ Deutsch Support-Forum
- ↳ Forums d'aide en français
- ↳ Foro de soporte español
- Other Matrix products
- ↳ Electronics products
- ↳ Matrix Online Courses
- ↳ Other products
- ↳ CoCo
- Hidden