PIC18F452 maximum string length ???

Status
Not open for further replies.

kgavionics

Full Member level 3
Joined
Jun 12, 2012
Messages
167
Helped
7
Reputation
14
Reaction score
11
Trophy points
1,298
Location
Alberta.Canada
Visit site
Activity points
2,482
hi guys
first this my code, wich read table from the ROM and sending it to the LCD that scrolls the strings in loop

Code:
;=================================================  ===========

	MOVLW 0X50
	MOVWF TBLPTRL
	MOVLW 0X02
	MOVWF TBLPTRH
	MOVLW 0X5f
	MOVWF RCOUNT
B6  TBLRD*
	MOVFF TABLAT,WREG
	CALL dataw
	INCF TBLPTRL,F
	DECF RCOUNT,F
	BNZ B6


PNP movlw 0x18
call instw
CALL delay1s
BRA PNP






ORG 0X250
MYDATA  DB "this is a test for my dispaly based on hitachi 44780 driven by PIC 18F452 thanks for watching"
END
;=================================================  ===========
end ; END OF PROGRAM
;=================================================  ===========
here the result


the LCD displays the string from ( for my display based.....)


If i decrease the string length to 84 chars the LCD displays all the string.
I tried the null string detect to exit the loop also it doesn't work either.

Is there any limitation on pic18f???
 
Last edited:

hello,

maybe you have to manage (increment) also TBLPTRH pointer, when TBLPTRL cross over a page of 256 bytes.
0x250 to 0x300 => 176 bytes or 88 word
is the string stored in bytes ?
one char in one byte or word aligned ?
 

hello,

maybe you have to manage (increment) also TBLPTRH pointer, when TBLPTRL cross over a page of 256 bytes.
0x250 to 0x300 => 176 bytes or 88 word
is the string stored in bytes ?
one char in one byte or word aligned ?

hi paulfjujo

the instruction INCF TBLPTRL,F is there to increment the table pointer.I also used the instruction TABLRD*+ to increment automatically , it doesn't work either
normally, the string is aligned in byte, because the chars are in ascii format.

pretty weird???
 

Hi,

Try loading your data in this format with an even number of characters

db "ABCDEFGHIJKLMNOP", 0
db "1234567890KLMNOP", 0
 

I think that i found the problem.Maybe the HD44780 can't handle more than 80 chars or so!!!!
because what i did, i sent all the chars to LCD then i started scrolling the display

can someone confirm,am i right or wrong?
 

I think that i found the problem.Maybe the HD44780 can't handle more than 80 chars or so!!!!
because what i did, i sent all the chars to LCD then i started scrolling the display

can someone confirm,am i right or wrong?

Yes, that is correct.

Reference: Hitachi HD44780U Datasheet, Section: Features, Page: 1
Features
...
•80×8-bit display RAM (80 characters max.)
...

BigDog
 
Yes, that is correct.

Reference: Hitachi HD44780U Datasheet, Section: Features, Page: 1


BigDog

Thanks bigdog for clearing the situation for me.
I need to know how can i scroll more than 80 chars? how can i clear for instance, the 40 first locations and sending over and over again or is there a clever solution for this problem?

thank you in advance
 

You can read the Busy Flag which is accompanied with the current address counter of either the CG or DD RAM, depending on the last instruction issued to the LCD.

Once the end of the character buffer (DD RAM) is reached you can temporary halt the display and update the character buffer (DD RAM) and recommence scrolling.

The following OPTREX document covers some of these requirements in detail:

Reference:, Section: 3.1.9 Read Busy Flag and Address, Page: 37

I may have an example of such a technique, although it might take some time to find it.


BigDog
 
Hi found a solution
First you need to send 80 chars and after scroll them and count when the scroll finish then clear the display and send the second string. Tested ans works fine.

Thx anyway guys
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…