LCDriver problems - writing to 2nd line
-
- LCD?
- Posts: 8
- Joined: Thu Oct 25, 2001 6:00 pm
- Location: Manchester : England
- Contact:
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
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
-
- LCD?
- Posts: 8
- Joined: Thu Oct 25, 2001 6:00 pm
- Location: Manchester : England
- Contact:
-
- LCD?
- Posts: 8
- Joined: Thu Oct 25, 2001 6:00 pm
- Location: Manchester : England
- Contact:
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;
}
#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;
}
-
- LCD?
- Posts: 8
- Joined: Thu Oct 25, 2001 6:00 pm
- Location: Manchester : England
- Contact:
Take a look at LCDC, it has the ability for plugins... and another program is coming very soon... what are you making?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?
![]()
Henry J.
President
Matrix Orbital
President
Matrix Orbital
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???
Future feature???
Interesting idea... I think we can add it to the new displays, but only the new ones.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???
Henry J.
President
Matrix Orbital
President
Matrix Orbital
-
- LCD?
- Posts: 8
- Joined: Thu Oct 25, 2001 6:00 pm
- Location: Manchester : England
- Contact:
By LCDC do you mean LCDCenter? How do you write plugins for it? Cant see anything about that.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?
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

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