
//----------------------------------------------------------------------------
//
//  Locate the lcd cursor. cursor position (0..max) in pos
// eg: for a 16 char * 2 display :- 0..15 is the top line, 16..31 is the bottom line
//
//----------------------------------------------------------------------------
void locate_cursor(char pos)
{
char a;

  a = pos % NUM_CH_LINE;
  switch(pos / NUM_CH_LINE)
    {
    case 0:
        lcd_comm_wr(a + 0x80);
        break;
    case 1:
        lcd_comm_wr(a + 0xc0);
        break;
    case 2:
        lcd_comm_wr(a + 0x94);
        break;
    case 3:
        lcd_comm_wr(a + 0xd4);
        break;
    }  
}         
