BiPOM Forum
General => LCD Displays => Topic started by: gtec on March 25, 2005, 10:08:14 am
-
I am using a MiniMax board. Does anyone know how to get the CursorSet in lcd.c to work beyond 15. If you write CursorSet( 18 ) for example it sets it to the 3rd character, not the 18th.
I guess this is happening because of the 4-bit addressing mode so it reads it as 2 instead of 18. Anyone know how to fix this????
-
/***************************************************************************
; Function: SetCurrentTextPosition
;
; Description: sets the cursor position to the <column>
; and <row> specified.
;
; Inputs: UBYTE column
; UBYTE row
;
; Returns: nothing
;**************************************************************************/
void SetCurrentTextPosition(UBYTE column, UBYTE row)
{
/* Combine address & command */
if ( row == 1) column |= 0xC0; // for bottom line
else column |= 0x80; // for top line
/* Send command to LCD */
WriteCtrl(column>>4);
WriteCtrl( column & 0xF);
}
Please try this function
-
Thanks,
This worked well so I cna move on with the project. I was pulling my hair out on this one.
gtec
Thanks for the quick response also.