General > LCD Displays
Curspr position
(1/1)
gtec:
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????
vitaliy:
/***************************************************************************
; 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
gtec:
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.
Navigation
[0] Message Index
Go to full version