Page 1 of 1

custom characters

Posted: Mon Sep 02, 2013 10:30 am
by siliconchip
hi
I have now managed to create custom characters for a 2x16 lcd and I can put several characters on the lcd at certain points but I cannot make them scroll, I don't know if im on the right track but do I need to convert the ASCII characters to strings ?? any help would be appreciated

Re: custom characters

Posted: Mon Sep 02, 2013 3:07 pm
by Benj
Hello,

There is a scroll function built into the display would this be any good for you? I think send command bytes 0x14 or 0x10 work to shift the display.

Other then that you can maybe add the custom characters to a sting by doing something like this.

str[0] = custom character code
str[1] = 'H'
str[2] = 'i'
str[3] = 0

The zero at the end signifies the end of the string.

Re: custom characters

Posted: Sun Sep 08, 2013 7:03 pm
by siliconchip
hi benj,
thanks for the reply but im still struggling to get the characters to scroll would it be possible to post a simple program to scroll 1 custom character so I could dissect it to gain understanding

Re: custom characters

Posted: Sun Sep 08, 2013 7:24 pm
by medelec35
Hi Bob,
Would you like me to integrate custom character into the Scroll one line V3 Flowcharts?
If so what will be the most characters within string to be scrolled?

Re: custom characters

Posted: Sun Sep 08, 2013 7:33 pm
by siliconchip
hi martin I thinking of finding how to scroll one character then adding more when and as needed, and yes please

Re: custom characters

Posted: Sun Sep 08, 2013 11:04 pm
by medelec35
Hi Bob,
This was a tough one.
I have modified flowchart so you can scroll one or more custom characters.
I have put two custom chars on for you so you can see how to add more than one custom character.
If you only want one then just change TotalCustonCharacters = 2 to TotalCustonCharacters = 1 and remove the

Code: Select all

FCD_LCDDisplay0_RAM_Write(1,14,31,0,10,0,17,14,0);
C code .
As simple as that.

custom characters do not simulate in Flowcode.
You can only test this on hardware or third part simulator like Real pic simulator for example:
Scroll1 line.png
(23.93 KiB) Downloaded 3354 times
There may be an easier way to scroll one line only, but I could not think of one.

Martin

Re: custom characters

Posted: Mon Sep 09, 2013 11:33 am
by siliconchip
hi martin,
perfect, I had to alter the time delay to 900ms and change the target pic to a 18f 4550 but other than that it works great in hardware, this will now give me the basis to experiment with putting custom characters on the top line and scrolling as well as the bottom I now have a platform to work from brilliant as always many thanks :D

Re: custom characters

Posted: Mon Sep 09, 2013 11:43 am
by medelec35
Hi Bob,
siliconchip wrote: it works great in hardware, this will now give me the basis to experiment with putting custom characters on the top line and scrolling as well as the bottom I now have a platform to work from brilliant as always many thanks
Thats great!
Thanks for letting me know.

Martin