Page 1 of 1
Posted: Thu Mar 28, 2002 3:53 pm
by Unbeliever
Hi. Im having some problems writing to the 2nd line on my 20x2 display.
I can write to the top line fine using :
lcdSetCursorPos(x, 0);
and then writing using lcdSendCharacter()/lcdSendString().
However when I try and move the cursor to the 2nd line by doing
lcdSetCursorPos(x, 1);
it stays on the top line.
Any ideas why?
Cheers
Posted: Thu Mar 28, 2002 4:05 pm
by Henry
Lines on the LCD are as follows
1
3
2
4
Posted: Thu Mar 28, 2002 4:07 pm
by Unbeliever
Cant get the cursor onto the second line with any combination of numbers that I have used so far.
Really confusing me.
Posted: Thu Mar 28, 2002 4:17 pm
by Henry
post some source code.
Posted: Thu Mar 28, 2002 4:21 pm
by Unbeliever
Here's what I have. Just a simple little app to test moving the cursor to the 2nd line and printing a char there.
#include <lcdriver.h>
#include <stdio.h>
#include <windows.h>
int main(int argc, char *argv[])
{
char input[255];
int i,j,k;
HANDLE hComm;
/* check we can get access to the screen */
if (LCD_RESULT_NOERROR != lcdRequest())
{
printf("ERROR: Display is in use by another application.");
return 1;
}
/* set wrapping */
if (LCD_RESULT_NOERROR != lcdSetWrapMode(0, 0))
{
printf("ERROR: LCDriver error while setting wrap mode.");
lcdFree();
return 1;
}
/* set cursor to 0 */
if (LCD_RESULT_NOERROR != lcdSetCursor(0))
{
printf("ERROR: LCDriver error while setting cursor appearance.");
lcdFree();
return 1;
}
/* set cursor to somewhere on the 2nd line and send a char */
lcdSetCursorPos(1, 1);
lcdSendCharacter('A');
/* free up lcdriver */
lcdFree();
return 0;
}
Posted: Thu Mar 28, 2002 4:37 pm
by Henry
are you using the newest version of LCDriver? V1.2?
I have never used LCDriver to program or VB...
_________________
Henry J.
Technical Support
Matrix Orbital
<font size=-1>[ This Message was edited by: Henry on 2002-03-28 16:38 ]</font>
Posted: Thu Mar 28, 2002 4:41 pm
by Unbeliever
Yeah using the latest version.
Thinking I may just sack off lcdriver and get friendly directly with the LCD
Although I will need to teach myself more on how to send data etc via the COM ports, but it cant be *too* hard?

Posted: Thu Mar 28, 2002 5:09 pm
by Henry
On 2002-03-28 16:41, Unbeliever wrote:
Yeah using the latest version.
Thinking I may just sack off lcdriver and get friendly directly with the LCD
Although I will need to teach myself more on how to send data etc via the COM ports, but it cant be *too* hard?
Take a look at LCDC, it has the ability for plugins... and another program is coming very soon... what are you making?
Posted: Thu Mar 28, 2002 6:25 pm
by ctimmer
From the 'sure would be nice' list I would like to see a 'dump mode' on the LCD's. When activated the LCD would just display (in hex) the data it receives without any kind of formatting. That would eliminate a lot of problems with what I think I am sending vs what I am really sending.
Future feature???
Posted: Thu Mar 28, 2002 7:19 pm
by Henry
On 2002-03-28 18:25, ctimmer wrote:
From the 'sure would be nice' list I would like to see a 'dump mode' on the LCD's. When activated the LCD would just display (in hex) the data it receives without any kind of formatting. That would eliminate a lot of problems with what I think I am sending vs what I am really sending.
Future feature???
Interesting idea... I think we can add it to the new displays, but only the new ones.
Posted: Thu Mar 28, 2002 7:32 pm
by Unbeliever
On 2002-03-28 17:09, Henry wrote:
Take a look at LCDC, it has the ability for plugins... and another program is coming very soon... what are you making?
By LCDC do you mean LCDCenter? How do you write plugins for it? Cant see anything about that.
I have an mp3 player, a standalone box in a seperates case no mouse monitor or keyboard. Everything is done through the network at the moment but Im writing the stuff to be able to control it via the LCD buttons.
I have all the winamp stuff pretty much done and can control it via a console app so I just need to hook the LCD and its keys to this app.
The main screen will let you play/pause, stop, go to next track etc.. and the I have menu's to edit the playlist etc.. Works really well but need to hook it up to the LCD

Posted: Thu Mar 28, 2002 7:35 pm
by Unbeliever
Ahh just found LCDC - should go to bed but think Im gonna spend a while looking at it
Cheers
