Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LCD : unused positions are are weird characters

Status
Not open for further replies.

SneaKSz

Member
Hello all,

I'm using the "LCD-Type BATRON BTHQ 21605AV-YETF-LED04-I2C-5V " ,
datasheet : https://www.electro-tech-online.com/custompdfs/2011/02/312175.pdf.

I'm able to get ABCDE on the LCD like I want to , but all the other used characters of the first row and all the chars on the second row are 'arrows'.

I cleaned the screen and then send the "ABCDE" and stopped , but once again all the other chars are " arrows" .

Someone has an idea? This cant be hard.


write data :

Code:
	SendStart();
	SSPBUF= 0x76;// i2c slave Address 
	SSPFlag();
	SSPBUF= 0x00;// Control byte for Instruction 
	SSPFlag();
	SSPBUF= 0x01;// clear screen
	SendStop();
	SSPBUF= 0x80;// DDRAM Address set to 00hex 
	SendStop();


	SendStart();
	SSPBUF= 0x76;
	SSPFlag();
	SSPBUF= 0x40;// Control byte for Data 
	SSPFlag();
	SSPBUF= 0xC1; // A
	SSPFlag();
	SSPBUF= 0xC2; //B
	SSPFlag();
	SSPBUF= 0xC3;//C
	SSPFlag();
	SSPBUF= 0xC4;//D
	SSPFlag();
Kind regars
 
Last edited:
You didn't send a SendStop() ??

Logical deduction would be that either you are filling the screen with arrow chars before you send the ABCD (like a problem with clear screen command) OR you are continuing to send arrow characters after you send ABCD. ;)
 
hi,

its the second option you've said.

Ive forgot the SendStop(); indeed !

Ill try it out now .

Thanks Mr RB !!
 
Hmm Still does not work, the arrows are still present.
Code:
        SendByteControl(0x76,0x00,0x34,0x0E, 0x06); // command

       SendStart();
	SSPBUF= 0x76;
	SSPFlag();
	SSPBUF= 0x40;// Control byte for Data 
	SSPFlag();
	SSPBUF= 0xC1; // A
	SSPFlag();
	SSPBUF= 0xC4; // A
	SSPFlag();
	SendStop();

send :

Code:
void SendByteControl(unsigned char  address ,unsigned char controlb,unsigned char fs,unsigned char  display, unsigned char entry  ){
SendStart();
SSPBUF= address;
SSPFlag();
SSPBUF= controlb;
SSPFlag();
SSPBUF= fs;
SSPFlag();
SSPBUF= display;
SSPFlag();
SSPBUF= entry;
SSPFlag();
SSPBUF= 0x35;// extended
SSPFlag();
SSPBUF= 0x04;
SSPFlag();
SSPBUF= 0x10;
SSPFlag();
SSPBUF= 0x42;
SSPFlag();
SSPBUF= 0x9F;
SSPFlag();
SSPBUF= 0x34;//Regular
SSPFlag();
SSPBUF= 0x80;
SSPFlag();
SSPBUF= 0x02;
SSPFlag();
SSPBUF= 0x01;
SSPFlag();
}
 
Clearing the screen via a command didnt work , I had to clear them manually. Ive written a blank spot to every position on the display.

Kind regards!
 
Check the datasheet for the clear screen command, many of the graphics LCDs clear the screen TO a selected character.

If your LCD works like that it may explain what was happening.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top