LCDriver problems - writing to 2nd line

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
Unbeliever
LCD?
Posts: 8
Joined: Thu Oct 25, 2001 6:00 pm
Location: Manchester : England
Contact:

Post 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

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3014
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post by Henry »

Lines on the LCD are as follows

1
3
2
4
Henry J.
President
Matrix Orbital

Unbeliever
LCD?
Posts: 8
Joined: Thu Oct 25, 2001 6:00 pm
Location: Manchester : England
Contact:

Post by Unbeliever »

Cant get the cursor onto the second line with any combination of numbers that I have used so far.
Really confusing me.

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3014
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post by Henry »

post some source code.
Henry J.
President
Matrix Orbital

Unbeliever
LCD?
Posts: 8
Joined: Thu Oct 25, 2001 6:00 pm
Location: Manchester : England
Contact:

Post 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;
}

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3014
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post 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>

Unbeliever
LCD?
Posts: 8
Joined: Thu Oct 25, 2001 6:00 pm
Location: Manchester : England
Contact:

Post by Unbeliever »

Yeah using the latest version.

Thinking I may just sack off lcdriver and get friendly directly with the LCD :smile:

Although I will need to teach myself more on how to send data etc via the COM ports, but it cant be *too* hard?

:smile:

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3014
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post 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 :smile:

Although I will need to teach myself more on how to send data etc via the COM ports, but it cant be *too* hard?

:smile:
Take a look at LCDC, it has the ability for plugins... and another program is coming very soon... what are you making?
Henry J.
President
Matrix Orbital

ctimmer
LCD!
Posts: 15
Joined: Thu Oct 25, 2001 6:00 pm
Location: Alaska

Post 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???

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3014
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post 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.
Henry J.
President
Matrix Orbital

Unbeliever
LCD?
Posts: 8
Joined: Thu Oct 25, 2001 6:00 pm
Location: Manchester : England
Contact:

Post 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 :smile:

Unbeliever
LCD?
Posts: 8
Joined: Thu Oct 25, 2001 6:00 pm
Location: Manchester : England
Contact:

Post by Unbeliever »

Ahh just found LCDC - should go to bed but think Im gonna spend a while looking at it :smile:

Cheers :smile:

Post Reply