• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

CFA634 : Sending CGROM data

VorTechS

New member
I've been playing around with my CFA634 and have managed to write a socket based service that allows me to perform various functions on my display :-

Clearing the screen
Disabling wrapping
Setting text on specific lines
Scrolling (service controlled, not module controlled)
Flashing (service controlled, not module controlled)
Same line Flashing and scrolling

... and now I want to extend one of these functions to allow me to use CGROM characters.

I can't seem to get the data sent right to allow me to do this though, nor can I seem to get WinTest to display the relevant character.

For example, I want to display the 'right pointing arrow' (character 016) in column 0, line 0.

So I'm doing a set cursor position to the appropriate line/column, and then am sending bytes: 030 002 016 , which I was expecting to display this character. But it isn't.

I've obviously mis-understood how to do this, could someone please point me in the right direction?

Thanks
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Tech

Administrator
You need to send one byte with the value of 016, not three bytes with the values of '0', '1', and '6'.

What language are you coding in?
 

VorTechS

New member
I'm coding in .NET (c# or vb.net), and when I said I was sending 030 002 016, they were the individual byte values (so 30, 2, 16).

When using WinTest I was entering in the input box:

\030\002\016 (both character by character and via copy + paste)
 

CF Tech

Administrator
If you wanted to use command \030 (which you don't
), you would want to write to register \001, to get data to display. For example:

\030\001\016

But you should never have to use command \030 unless you are doing something really tricky.

You should use \025 to set up the bitmap, then just embed the \016 in your string.

For instance in Wintest:

Hello\016World
 

VorTechS

New member
If you wanted to use command \030 (which you don't
), you would want to write to register \001, to get data to display. For example:

\030\001\016

But you should never have to use command \030 unless you are doing something really tricky.

You should use \025 to set up the bitmap, then just embed the \016 in your string.

For instance in Wintest:

Hello\016World
I must confess I'm slightly at a loss about the \025 comment, as I understand it from the documentation that's about re-mapping the custom characters? (Which is not where I want to be just yet....)

I just want to display a character from the CGROM, as per the documentation which states:

''To access the characters in red, it is necessary to send some data directly to the LCD controller. Send Data Directly to the LCD control (\030, Control+Equal) (Pg. 24) allows any character to be displayed."

So in the case of your WinTest example 'Hello\016World':

I get 'HelloWorld' without the character I was expecting

If send 'Hello\030\001\016World', I get the character I was expecting!

Your example of just sending \016 does appear to work for characters that are NOT part of the 'red' entries in the CGROM table.

Thank you, as usual your support is excellent... and I have my answer! :)
 
USB LCD Displays - Graphic and Character LCDs with a Keypad

VorTechS

New member
I'm still experimenting with the LCD trying to come up with something effective that let's me do lots of styles on a single LCD line (scrolling, flashing) using a single command line... so I've been slowly building up.

I've finally arrived at a possible solution, but the current architecture means that I've run into timing issues updating the display - so I need to revisit that.

Once it's done I'll by all means post the code I have! :)
 

VorTechS

New member
So I got the biggest problem I faced working the way I wanted, so I can send the strings via a TCP client to a buffer, and the send the buffer to the display line by line eliminating problems of incorrect display rendering. Originally I had it sending different types of commands to do different styles, using SetCursorPosition which caused the display to render incorrectly as they were fired off on separate time intervals often clashing.

Now though I've merged everything into a few basic, simple commands using a 'style' attribute, where the attributes are as follows:

'[0]' = static
'[1]' = flashing
'[2*xx]' = scrolling (where '*xx' = the number of characters to be displayed during scrolling)

So, my sample application (which will be using this command set to display media information from my CarPC) fires up a tcp client, connects to the LCD service and does:

'/start 1'
'/line 0 /style [0]Album: [2*13]The Prodigy: Experience....'
'/line 1 /style [0]Track: [2*13]Everybody in the Place (Let's Go!)'
'/line 3 /style [0] {time} [1] {16} [0]00:00 '

Then fired on a timer:

'/line 3 /static 0 /value {time}'
'/update'

Which connects to an LCD display on COM1 and then gives me:

Album: {The Prodigy: Experience.... scrolling from column 8 showing 13 characters}
Track: {Everybody in the Place (Let's Go!) scrolling from column 8 showing 13 characters}

{Current Time} {Flashing play symbol} {Elapsed Time}

That is going to do me for today!

So far though the scrolling and flashing is controlled by the issue of the '/update' command (so in my case, every time my client timer fires every half second) and it would be nice to make the control of the flashing scrolling unique per line - which will take a bit more thought.
 

VorTechS

New member
Thanks! :)

Luckily the 634 makes life easier without the CRC ;)

I've come up with a simple solution to the scrolling/flashing issue - make the user do it!
A couple of extra commands such as /flash, /scroll - I'm going to pop those in today, tidy up the code (lots of unnecessary classes and redundant stuff) and then I'll pop it under the 3rd Party section.

I ran a 'stress test' last night, so both the client and the service running overnight... came back this morning and found it still running:



(Sorry for the time difference, it took me ages on the phone's camera to capture the flashing play image!)
 
Top