Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
ch = getc();
could you try assign specific value for ch, Example: ch = 'A';
If 'A' is sent to PC, you try use other function.
- - - Updated - - -
Sorry, I just read your post again, You need check hardware: TX and RX pin. I can't see pin number of your schematic.
This schematic used PORT B and PORT C.
In code:
TRISB = 0b00000000; // Set PORTB direction to be output
TRISC = 0x00; // Set PORTC direction to be output
PORTB = 0x00; // Turn OFF LEDs on PORTB
...
PORTB = characters[count]; // PORT B
PORTC = column; // PORT C
CS1 and CS2 to choose paper of LCD to display. (I think that is reason, it print on first 4 lines).
you can call glcd_cmd(0xC0); in loop ('while(1)') to go to 1st position to display.
Could you try changed the main function as below?
void main()
{
int i;
GRAPHIC_LCD_INIT();
output_low(CS1); // CS1 connected to PIN_B0
output_low(CS2); // CS2 connected to PIN_B1
glcd_cmd(0xC1); // display start line
while(1)
{
for (i = 0; i <...
Could you try this code?
If can't run, you change value of data array and check your connection.
unsigned char data[] = {127,127,8,8,127,127,0,0}; // H, 8x8
void GRAPHIC_LCD_INIT()
{
output_high(CS1); // CS1 connected to PIN_B0
output_high(CS2); // CS2 connected to PIN_B1...
This code used to display a character at the position x,y.
LCD has matrix COLxROW RAM to store character (all characters are display on LCD).
So function will saved the character to RAM of LCD at position x,y.
PHYS_XSZ is number of characters on a line.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.