gLCD printing number Problem

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 190 times
Been thanked: 140 times
Contact:

gLCD printing number Problem

Postby petesmart » Wed Jul 06, 2011 1:54 pm

Hi team,

I am working with an EB0057/EB058 combination. The project is very simple, i have an angular sensor which outputs an analogue voltage. This voltage is sampled by an analogue input on a PIC creating a range of 0 to 1023. Conversion to degrees is done with some simple math with the output printed in degrees on the gLCD.

I am also plotting a line from an axis point that simulates the angle of deflection.

So my issue is the update of the gLCD. At present I have to use the clear routine before I update the number on the screen. Unlike the standard LCD you can write directly to the cursor position and the screen will update, whereas the gLCD will only overwrite the new pixels not clearing the existing pixels at the current location. The outcome is illegible....

Has anyone come across a technique of updating pixels / numbers at a cursor location without using a clear routine...the clear routine slows the performance of the screen write..


Best regards

Pete
sorry about that Chief!

User avatar
Benj
Matrix Staff
Posts: 14567
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4598 times
Been thanked: 4239 times
Contact:

Re: gLCD printing number Problem

Postby Benj » Wed Jul 06, 2011 2:54 pm

Hi Pete,

Have you tried turning off the transparency setting for the print macro?

Also you could print a string of spaces and this would effective clear an area of the screen.
These users thanked the author Benj for the post:
petesmart (Wed Jul 06, 2011 9:50 pm)
Rating: 5.26%
 

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 190 times
Been thanked: 140 times
Contact:

Re: gLCD printing number Problem

Postby petesmart » Sun Jul 10, 2011 11:07 am

Thanks Ben,

Transparency was the key ingredient..

I am keen to get a data sheet on the gLCD block as I would like to understand

1) transparency settings

2) font types and sizes

3) how to get symbols on the screen for example a degree symbol. Using alt-0176 whilst it prints on the screen in flow code in the string manipulation box... The gLCG simply ignores or prints a space.

4) any other command codes that might be available.

Many thanks for all of the great support.

Best regards

Pete
sorry about that Chief!

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 381 times
Been thanked: 716 times
Contact:

Re: gLCD printing number Problem

Postby JohnCrow » Sun Jul 10, 2011 11:56 am

Hi Pete

I've been playing with one of the gLCDs myself they are a nice little display.

Just as a quick replay rearding point 3.
I dont think you can print characters like the degree symbol by using the ascii code on these displays.
With a standard LCD like the EB-005, the charaters are programmed into the display. With the gLCD I believe you will have to program a custom character to do this
I'm sure Benj will be able to point you in the right direction.

The device does not seem to have a large range of built in font types and sizes, these are covered in the data sheet and the flowcode help files.
These users thanked the author JohnCrow for the post:
petesmart (Mon Jul 11, 2011 3:14 pm)
Rating: 5.26%
 
1 in 10 people understand binary, the other one doesn't !

User avatar
Benj
Matrix Staff
Posts: 14567
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4598 times
Been thanked: 4239 times
Contact:

Re: gLCD printing number Problem

Postby Benj » Mon Jul 11, 2011 11:25 am

Hi Pete,

The gLCD component help file details all the settings such as transparency and also details how the custom font property can be used to create your own characters. Let me know if you have any problems.

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 190 times
Been thanked: 140 times
Contact:

Re: gLCD printing number Problem

Postby petesmart » Mon Jul 11, 2011 3:13 pm

Thanks Ben and John for your responses. I have since found then help file on the gLCD...whilst it gave me the transparency and font selection information, I did not see the information on the custom character..

Did I miss it or not look in the right place?

I saw the check box for custom fonts in the gLCD properties, however could not figure out what it did...Any further clues will be greatly appreciated...Specifically the degree symbol.

Best regards

Pete
sorry about that Chief!

User avatar
Benj
Matrix Staff
Posts: 14567
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4598 times
Been thanked: 4239 times
Contact:

Re: gLCD printing number Problem

Postby Benj » Mon Jul 11, 2011 3:38 pm

Hello Pete,

Right sorry about that I will make sure that this gets added to the help file.

What you need to do is as follows.

Go into the properties of the gLCD component and tick to use the custom font.

Scroll down to the last line of the font code which should look like this.

0201020100

Change this to

0609090600

This is my untested version of the data for a degree symbol, you can edit it if it's not quite right for your application.

Here is the schema for the gLCD fonts.
gLCD.jpg
gLCD.jpg (10.7 KiB) Viewed 5687 times


Here is the degree symbol listed above - 0609090600
gLCDdemo.jpg
gLCDdemo.jpg (13.07 KiB) Viewed 5687 times


The character you have replaced is the ~ character so if you now send a ~ character to the hardware gLCD it will print out the degree symbol. The simulation will also reflect this code change so you can test first here.

The new character will also scale correctly for the different font sizes.

Let me know how you get on.
These users thanked the author Benj for the post:
medelec35 (Wed Aug 24, 2011 10:12 am)
Rating: 5.26%
 

User avatar
Benj
Matrix Staff
Posts: 14567
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4598 times
Been thanked: 4239 times
Contact:

Re: gLCD printing number Problem

Postby Benj » Mon Jul 11, 2011 3:42 pm

For reference here is the default font look up table. You can edit any of the unused characters in your program to allow for alternate characters.

0x00 , 0x00 , 0x00 , 0x00 , 0x00 , // 32 = <space>
0x00 , 0x06 , 0x5F , 0x06 , 0x00 , // 33 = !
0x07 , 0x03 , 0x00 , 0x07 , 0x03 , // 34 = "
0x24 , 0x7E , 0x24 , 0x7E , 0x24 , // 35 = #
0x24 , 0x2B , 0x6A , 0x12 , 0x00 , // 36 = $
0x63 , 0x13 , 0x08 , 0x64 , 0x63 , // 37 = %
0x36 , 0x49 , 0x56 , 0x20 , 0x50 , // 38 = &
0x00 , 0x07 , 0x03 , 0x00 , 0x00 , // 39 = '
0x00 , 0x3E , 0x41 , 0x00 , 0x00 , // 40 = (
0x00 , 0x41 , 0x3E , 0x00 , 0x00 , // 41 = )
0x08 , 0x3E , 0x1C , 0x3E , 0x08 , // 42 = *
0x08 , 0x08 , 0x3E , 0x08 , 0x08 // 43 = +
0x00 , 0xE0 , 0x60 , 0x00 , 0x00 , // 44 = ,
0x08 , 0x08 , 0x08 , 0x08 , 0x08 , // 45 = -
0x00 , 0x60 , 0x60 , 0x00 , 0x00 , // 46 = .
0x20 , 0x10 , 0x08 , 0x04 , 0x02 , // 47 = /
0x3E , 0x51 , 0x49 , 0x45 , 0x3E , // 48 = 0
0x00 , 0x42 , 0x7F , 0x40 , 0x00 , // 49 = 1
0x62 , 0x51 , 0x49 , 0x49 , 0x46 , // 50 = 2
0x22 , 0x49 , 0x49 , 0x49 , 0x36 , // 51 = 3
0x18 , 0x14 , 0x12 , 0x7F , 0x10 , // 52 = 4
0x2F , 0x49 , 0x49 , 0x49 , 0x31 , // 53 = 5
0x3C , 0x4A , 0x49 , 0x49 , 0x30 , // 54 = 6
0x01 , 0x71 , 0x09 , 0x05 , 0x03 // 55 = 7
0x36 , 0x49 , 0x49 , 0x49 , 0x36 , // 56 = 8
0x06 , 0x49 , 0x49 , 0x29 , 0x1E , // 57 = 9
0x00 , 0x6C , 0x6C , 0x00 , 0x00 , // 58 = :
0x00 , 0xEC , 0x6C , 0x00 , 0x00 , // 59 = ;
0x08 , 0x14 , 0x22 , 0x41 , 0x00 , // 60 = <
0x24 , 0x24 , 0x24 , 0x24 , 0x24 , // 61 = =
0x00 , 0x41 , 0x22 , 0x14 , 0x08 , // 62 = >
0x02 , 0x01 , 0x59 , 0x09 , 0x06 , // 63 = ?
0x3E , 0x41 , 0x5D , 0x55 , 0x1E , // 64 = @
0x7E , 0x09 , 0x09 , 0x09 , 0x7E , // 65 = A
0x7F , 0x49 , 0x49 , 0x49 , 0x36 , // 66 = B
0x3E , 0x41 , 0x41 , 0x41 , 0x22 // 67 = C
0x7F , 0x41 , 0x41 , 0x41 , 0x3E , // 68 = D
0x7F , 0x49 , 0x49 , 0x49 , 0x41 , // 69 = E
0x7F , 0x09 , 0x09 , 0x09 , 0x01 , // 70 = F
0x3E , 0x41 , 0x49 , 0x49 , 0x7A , // 71 = G
0x7F , 0x08 , 0x08 , 0x08 , 0x7F , // 72 = H
0x00 , 0x41 , 0x7F , 0x41 , 0x00 , // 73 = I
0x30 , 0x40 , 0x40 , 0x40 , 0x3F , // 74 = J
0x7F , 0x08 , 0x14 , 0x22 , 0x41 , // 75 = K
0x7F , 0x40 , 0x40 , 0x40 , 0x40 , // 76 = L
0x7F , 0x02 , 0x04 , 0x02 , 0x7F , // 77 = M
0x7F , 0x02 , 0x04 , 0x08 , 0x7F , // 78 = N
0x3E , 0x41 , 0x41 , 0x41 , 0x3E // 79 = O
0x7F , 0x09 , 0x09 , 0x09 , 0x06 , // 80 = P
0x3E , 0x41 , 0x51 , 0x21 , 0x5E , // 81 = Q
0x7F , 0x09 , 0x09 , 0x19 , 0x66 , // 82 = R
0x26 , 0x49 , 0x49 , 0x49 , 0x32 , // 83 = S
0x01 , 0x01 , 0x7F , 0x01 , 0x01 , // 84 = T
0x3F , 0x40 , 0x40 , 0x40 , 0x3F , // 85 = U
0x1F , 0x20 , 0x40 , 0x20 , 0x1F , // 86 = V
0x3F , 0x40 , 0x3C , 0x40 , 0x3F , // 87 = W
0x63 , 0x14 , 0x08 , 0x14 , 0x63 , // 88 = X
0x07 , 0x08 , 0x70 , 0x08 , 0x07 , // 89 = Y
0x71 , 0x49 , 0x45 , 0x43 , 0x00 , // 90 = Z
0x00 , 0x7F , 0x41 , 0x41 , 0x00 // 91 = [
0x02 , 0x04 , 0x08 , 0x10 , 0x20 , // 92 = <backslash>
0x00 , 0x41 , 0x41 , 0x7F , 0x00 , // 93 = ]
0x04 , 0x02 , 0x01 , 0x02 , 0x04 , // 94 = ^
0x80 , 0x80 , 0x80 , 0x80 , 0x80 , // 95 = _
0x00 , 0x03 , 0x07 , 0x00 , 0x00 , // 96 = `
0x20 , 0x54 , 0x54 , 0x54 , 0x78 , // 97 = a
0x7F , 0x44 , 0x44 , 0x44 , 0x38 , // 98 = b
0x38 , 0x44 , 0x44 , 0x44 , 0x28 , // 99 = c
0x38 , 0x44 , 0x44 , 0x44 , 0x7F , // 100 = d
0x38 , 0x54 , 0x54 , 0x54 , 0x18 , // 101 = e
0x08 , 0x7E , 0x09 , 0x09 , 0x00 , // 102 = f
0x18 , 0xA4 , 0xA4 , 0xA4 , 0x7C // 103 = g
0x7F , 0x04 , 0x04 , 0x78 , 0x00 , // 104 = h
0x00 , 0x00 , 0x7D , 0x00 , 0x00 , // 105 = i
0x40 , 0x80 , 0x84 , 0x7D , 0x00 , // 106 = j
0x7F , 0x10 , 0x28 , 0x44 , 0x00 , // 107 = k
0x00 , 0x00 , 0x7F , 0x40 , 0x00 , // 108 = l
0x7C , 0x04 , 0x18 , 0x04 , 0x78 , // 109 = m
0x7C , 0x04 , 0x04 , 0x78 , 0x00 , // 110 = n
0x38 , 0x44 , 0x44 , 0x44 , 0x38 , // 111 = o
0xFC , 0x44 , 0x44 , 0x44 , 0x38 , // 112 = p
0x38 , 0x44 , 0x44 , 0x44 , 0xFC , // 113 = q
0x44 , 0x78 , 0x44 , 0x04 , 0x08 , // 114 = r
0x08 , 0x54 , 0x54 , 0x54 , 0x20 // 115 = s
0x04 , 0x3E , 0x44 , 0x24 , 0x00 , // 116 = t
0x3C , 0x40 , 0x20 , 0x7C , 0x00 , // 117 = u
0x1C , 0x20 , 0x40 , 0x20 , 0x1C , // 118 = v
0x3C , 0x60 , 0x30 , 0x60 , 0x3C , // 119 = w
0x6C , 0x10 , 0x10 , 0x6C , 0x00 , // 120 = x
0x9C , 0xA0 , 0x60 , 0x3C , 0x00 , // 121 = y
0x64 , 0x54 , 0x54 , 0x4C , 0x00 , // 122 = z
0x08 , 0x3E , 0x41 , 0x41 , 0x00 , // 123 = {
0x00 , 0x00 , 0x7F , 0x00 , 0x00 , // 124 = |
0x00 , 0x41 , 0x41 , 0x3E , 0x08 , // 125 = }
0x02 , 0x01 , 0x02 , 0x01 , 0x00 // 126 = ~
These users thanked the author Benj for the post (total 2):
petesmart (Tue Jul 12, 2011 12:11 am) • JohnCrow (Tue Jul 12, 2011 7:44 am)
Rating: 10.53%
 

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 190 times
Been thanked: 140 times
Contact:

Re: gLCD printing number Problem

Postby petesmart » Tue Jul 12, 2011 12:14 am

Hi Ben,

Many thanks for this info. It is exactly what is was looking for... :D

attached is the outcome of your handy work Ben....simple but effective :mrgreen:

Is there a specification sheet for the gLCD component. I think its a FVP-oled-19001?

really appreciated the fast response on the font data.

All the best

Pete
Attachments
inclinometer.JPG
inclinometer with degree symbol !
inclinometer.JPG (22.29 KiB) Viewed 5674 times
sorry about that Chief!

User avatar
Benj
Matrix Staff
Posts: 14567
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4598 times
Been thanked: 4239 times
Contact:

Re: gLCD printing number Problem

Postby Benj » Tue Jul 12, 2011 10:09 am

Hi Pete,

Great glad its working correctly, looks good too :)

Yes your correct the display used on the EB057 and EB058 boards is the FVP-OLED-19001 device which uses the SSD1355 driver IC.

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 190 times
Been thanked: 140 times
Contact:

Re: gLCD printing number Problem

Postby petesmart » Wed Jul 13, 2011 4:29 am

Hi Ben,

Thanks for the update. Attached is the datasheet link for the display driver ssd1355 from Solomon Systech for those who may be interested.

http://www.datasheetarchive.com/SSD1355*-datasheet.html. I did not post the file as it was approx 1.5mb .pdf. Also not sure of the copyright rules ( if any ) in posting 3rd party documents on the forum, perhaps some guidance on this topic might be useful.

Did a lot more work on the project last night, sorting out screen formatting, leading zero suppression etc. Its actually quite easy in the end when you use floating point to string conversion. By manipulating the strings makes it quite efficient. The string features on the PIC platform are quite powerful.

Next step is to integrate an angle sensor either via an industrial potentiometer/encoder or an accelerometer via SPI. The accelerometer is interesting as it does not require a physical connection to the hydraulic arm axis point to detect angular motion....keep you posted

best regards

Pete

Capture.JPG
next stage of developement - angle line changes colour (black to red) when angle saftey margin exceeded and has memory markers > so you can return to the last postion. red box indicates memory postion
Capture.JPG (20.9 KiB) Viewed 5647 times
These users thanked the author petesmart for the post:
Benj (Wed Jul 13, 2011 9:48 am)
Rating: 5.26%
 
sorry about that Chief!