Exemplo n.º 1
0
/**
 ******************************************************************************
 **
 **	Function Name		: LCD_WipeOnLR
 **
 **	Description			: Display an entire screen by
 **			              wiping it on( right to left ).
 **
 **	Passed Parameters	: ptr = pointer to a string containing the entire screen
 **
 **	Modified Data		: None
 **
 **	Return Value		: None
 **
 ******************************************************************************
 */
void LCD_WipeOnRL( uint8 *ptr )
{
	// "wipe" on new screen
	uint8 i;
	for( i=20; i>0; i-- ) {
		LCD_Cursor( 1,i );		LCD_DisplayCharacter( 1, *( ptr+ 0+i-1 ) );
		LCD_Cursor( 2,i );		LCD_DisplayCharacter( 1, *( ptr+40+i-1 ) );
		LCD_Cursor( 3,i );		LCD_DisplayCharacter( 2, *( ptr+80+i-1 ) );
		LCD_Cursor( 4,i );		LCD_DisplayCharacter( 2, *( ptr+120+i-1 ) );
	}
}
Exemplo n.º 2
0
/**
 ******************************************************************************
 **
 **	Function Name		: LCD_WipeOffRL
 **
 **	Description			: "Wipe" screen lright-to-left.
 **
 **	Passed Parameters	: None
 **
 **	Modified Data		: None
 **
 **	Return Value		: None
 **
 ******************************************************************************
 */
void LCD_WipeOffRL( void )
{
	uint8 i;
	for( i=40; i>0; i-- ) {
		#define BLOCK 0xff
		LCD_Cursor( 1,i );		LCD_DisplayCharacter( 1, BLOCK );
		LCD_Cursor( 2,i );		LCD_DisplayCharacter( 1, BLOCK );
		LCD_Cursor( 3,i );		LCD_DisplayCharacter( 2, BLOCK );
		LCD_Cursor( 4,i );		LCD_DisplayCharacter( 2, BLOCK );
	}
}
Exemplo n.º 3
0
/**
 ******************************************************************************
 **
 **	Function Name		: LCD_WipeOnLR
 **
 **	Description			: Display an entire screen by
 **			              wiping it on( left to right ).
 **
 **	Passed Parameters	: ptr = pointer to a string containing the entire screen
 **
 **	Modified Data		: None
 **
 **	Return Value		: None
 **
 ******************************************************************************
 */
void LCD_WipeOnLR( uint8 *ptr )
{
	// "wipe" on new screen
	uint8 i;
	for( i=0; i<40; i++ ) {
		LCD_Cursor( 1,i+1 );		LCD_DisplayCharacter( 1, *( ptr+ 0+i ) );
		LCD_Cursor( 2,i+1 );		LCD_DisplayCharacter( 1, *( ptr+40+i ) );
		LCD_Cursor( 3,i+1 );		LCD_DisplayCharacter( 2, *( ptr+80+i ) );
		LCD_Cursor( 4,i+1 );		LCD_DisplayCharacter( 2, *( ptr+120+i ) );
	}
}
Exemplo n.º 4
0
/**
 ******************************************************************************
 **
 **	Function Name		: LCD_WipeOffLR
 **
 **	Description			: "Wipe" screen left-to-right.
 **
 **	Passed Parameters	: None
 **
 **	Modified Data		: None
 **
 **	Return Value		: None
 **
 ******************************************************************************
 */
void LCD_WipeOffLR( void )
{
	// "wipe" off old screen( left to right )
	uint8 i;
	for( i=1; i<41; i++ ) {
		#define BLOCK 0xff
		LCD_Cursor( 1,i );		LCD_DisplayCharacter( 1, BLOCK );
		LCD_Cursor( 2,i );		LCD_DisplayCharacter( 1, BLOCK );
		LCD_Cursor( 3,i );		LCD_DisplayCharacter( 2, BLOCK );
		LCD_Cursor( 4,i );		LCD_DisplayCharacter( 2, BLOCK );
	}
}
// ******************************************************************* //
// *** Display a string at the specified row and column, using RAM *** //
// ******************************************************************* //
void LCD_DisplayString (char row, char column , char *string)
{
	LCD_Cursor (row, column);
	while (*string)
	LCD_DisplayCharacter (*string++);
	
}
Exemplo n.º 6
0
/**
 ******************************************************************************
 **
 **	Function Name		: LCD_DisplayRow
 **
 **	Description			: Display a string at the specified row.
 **
 **	Passed Parameters	: None
 **
 **	Modified Data		: None
 **
 **	Return Value		: None
 **
 ******************************************************************************
 */
void LCD_DisplayRow( uint8 row, uint8 *string )
{
	uint8 i;
	LCD_Cursor( row, 1 );
	for( i=0; i<40; i++ )		
		if( *string != '\0')
			LCD_DisplayCharacter( row, *string++ );
}
Exemplo n.º 7
0
/**
 ******************************************************************************
 **
 **	Function Name		: LCD_DisplayString
 **
 **	Description			:  Display a string at the specified row and column.
 **
 **	Passed Parameters	: None
 **
 **	Modified Data		: None
 **
 **	Return Value		: None
 **
 ******************************************************************************
 */
void LCD_DisplayString( uint8 row, uint8 column, uint8 *string )
{
	uint8 Count = 0;
	LCD_Cursor( row, column );
	while( *string && Count<40 )
	{
		LCD_DisplayCharacter( row, *string++ );
		Count++;
	}
}
Exemplo n.º 8
0
/**
 ******************************************************************************
 **
 **	Function Name		: LCD_DisplayStringCentered
 **
 **	Description			: Display a string centered on the specified row.
 **
 **	Passed Parameters	: None
 **
 **	Modified Data		: None
 **
 **	Return Value		: None
 **
 ******************************************************************************
 */
void LCD_DisplayStringCentered( uint8 row, uint8 *string )
{
	uint8 len = strlen( (char *)string );

	if( len <= 40 ) {
		// if the string is less than one line, center it ...
		uint8 i;
		LCD_Cursor( row, 1 );
		for( i=0; i<40; i++ )
			LCD_DisplayCharacter( row, ' ' );
		
		LCD_DisplayString( row,( ( 40 - len ) / 2 )+1,string );
	}
	else {
		// if the string is more than one line, display first 20 characters
		uint8 temp[41];
		strncpy((char *)temp, (char *)string, 40 );
		temp[40] = 0;
		LCD_DisplayString( row,1,temp );
	}
}