CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

How to print special chars from this table

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
matheuslps



Joined: 29 Sep 2010
Posts: 73
Location: Brazil

View user's profile Send private message MSN Messenger

How to print special chars from this table
PostPosted: Mon Aug 22, 2011 2:00 pm     Reply with quote

The title is very clean....

How to print special chars like this ones:



I found this table on the datasheet from HD44780U LCD.

bye
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Aug 22, 2011 2:49 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group