PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Aug 22, 2011 2:49 pm     | 
				     | 
			 
			
				
  | 
			 
			
				That's LCD character set A02. Are you sure that your LCD has that 
 
character set ?
 
 
First you need to find out if you really have the A02 character set.
 
Run the following program which will display all chars in the range from
 
0xA0 to 0xBF (on rows 1 and 2 of the LCD).
 
 	  | Code: | 	 		  
 
#include <16F877.H> 
 
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP 
 
#use delay(clock=4000000) 
 
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS) 
 
 
#include "flex_lcd.c"
 
 
#define LCD_COLUMN_ADDRESS  0xA0
 
 
//==========================================
 
void main()
 
{
 
int8 i;
 
 
lcd_init();
 
 
// Display two columns in the LCD character set,
 
// starting at the address of the first column,
 
// as specified in LCD_COLUMN_ADDRESS.
 
for(i = 0; i < 32; i++)
 
   {
 
    if(i == 16)
 
       lcd_putc('\n');
 
         
 
    lcd_putc(i + LCD_COLUMN_ADDRESS);  
 
   }
 
 
 
while(1);
 
}
 
 | 	  
 
If you have character set A02, you will see the double-bar character in
 
the upper left corner of the LCD.    But I think most LCD's have the A00
 
character set, or some variation of it.  In which case, there is no character
 
at address 0xA0 in the table.
 
 
But anyway, if you do have a character there in your LCD's character set
 
then you can display it with:
 
 	  | Code: | 	 		  
 
lcd_putc(0xA0);  // Display double-bar character
 
 | 	 
  | 
			 
		  |