gLCD EBM001 in mode SPI

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times
Contact:

gLCD EBM001 in mode SPI

Post by cubitus54 »

Hello,

Is it possible to change the type of screen EBM001 SPI hardware?

On the version of Flowcode V5 FC5_xxx_gLCD_.c in the SPI output software.
On the V6 version of Flowcode, the function is compressed and unchangeable ...

Thank you

V5 FC5_xxx_gLCD_.c

Code: Select all

void gLCD_SendByte (char Command, unsigned int Lcdout)
{
/*Macro_gLCD_SendByte_Start*/

	char i, data;
	//unsigned int mask = 0x8000;

	FC_CAL_Bit_Low (%a_MX_GFXLCD_PORT_CS, %a_MX_GFXLCD_PIN_CS);				//MX_GFXLCD_CS 0 start of sequence

	if (Command == MX_GFXLCD_CMD)
	{
		FC_CAL_Bit_Low (%a_MX_GFXLCD_PORT_RS, %a_MX_GFXLCD_PIN_RS);			//0 = MX_GFXLCD_CMD
	}
	else
	{
		FC_CAL_Bit_High (%a_MX_GFXLCD_PORT_RS, %a_MX_GFXLCD_PIN_RS);		//1 = MX_GFXLCD_PARAMeter
	}

	data = Lcdout;

	for (i=0;i<8;i++)
	{
		FC_CAL_Bit_Low (%a_MX_GFXLCD_PORT_CL, %a_MX_GFXLCD_PIN_CL);			//Clock 0
		if (data & 0x80)
			FC_CAL_Bit_High (%a_MX_GFXLCD_PORT_SD, %a_MX_GFXLCD_PIN_SD);    //Output MSB
		else
			FC_CAL_Bit_Low (%a_MX_GFXLCD_PORT_SD, %a_MX_GFXLCD_PIN_SD);

		FC_CAL_Bit_High (%a_MX_GFXLCD_PORT_CL, %a_MX_GFXLCD_PIN_CL);		//Clock 1
		data = data << 1;                       							//Shift Data to left
	}
	FC_CAL_Bit_High (%a_MX_GFXLCD_PORT_CS, %a_MX_GFXLCD_PIN_CS);			//End of sequence

/*Macro_gLCD_SendByte_End*/
Flowcode V6.1.2.0(11 05 2015)

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

Re: gLCD EBM001 in mode SPI

Post by Benj »

Hello Cubitus,

Here is the component source for the EBM001 in FC6.
glcd_EBM001.fcfx
(80.45 KiB) Downloaded 350 times
Let me know how your getting on.

User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times
Contact:

Re: gLCD EBM001 in mode SPI

Post by cubitus54 »

Hi,

Thank you very much ;)
Flowcode V6.1.2.0(11 05 2015)

User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times
Contact:

Re: gLCD EBM001 in mode SPI

Post by cubitus54 »

Hello,

Is it possible to create an integrated component in Flowcode?
glcd_EBM001_spi.fcfx
(82.81 KiB) Downloaded 403 times
Timing
SPI Hardware : 0,5µs/div
chrono.gif
chrono.gif (18.06 KiB) Viewed 8163 times
Flowcode V6.1.2.0(11 05 2015)

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

Re: gLCD EBM001 in mode SPI

Post by Benj »

Hello,

Yes you simply use the file -> Export menu and then move the created file into your Flowcode 6/components directory.

Do you want the new component including in the official build?

User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times
Contact:

Re: gLCD EBM001 in mode SPI

Post by cubitus54 »

Hello,

Excellent ! :D :D

Code: Select all

Do you want the new component including in the official build?

Why not :)

I may be a few other programs propose to you...
Flowcode V6.1.2.0(11 05 2015)

User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times
Contact:

Re: gLCD EBM001 in mode SPI

Post by cubitus54 »

Hello,

I'd like to try to transform EBM016_Humidity.fcpx in DHT11, DHT22.
Can you give me the component source

Thank you
Flowcode V6.1.2.0(11 05 2015)

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

Re: gLCD EBM001 in mode SPI

Post by Benj »

Hello,

Ok I will add your modified component to the build. Can you tell me if there is a specific driver IC or display that works with your modified component so I can add the correct info to the tooltip help.

Here is the EBM016 component source.
EBM016v1.fcfx
(28.18 KiB) Downloaded 354 times

User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times
Contact:

Re: gLCD EBM001 in mode SPI

Post by cubitus54 »

Hello,


Thank you for the humidity sensor.
The display is 1.8 or SPI. there is not really a reference and there are many version for this inexpensive and popular display.

aff_1.8 spi.jpg
aff_1.8 spi.jpg (122.08 KiB) Viewed 8113 times
Flowcode V6.1.2.0(11 05 2015)

User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times
Contact:

Re: gLCD EBM001 in mode SPI

Post by cubitus54 »

Hello,

More faster :)
Clear all screen in 215 ms -> 160 ms
if one uses an element in the SPI bus.
You can put the CS line to 0 and 0 to let it saves time and makes the fastest display.
Attachments
CS.gif
CS.gif (29.43 KiB) Viewed 8082 times
Last edited by cubitus54 on Thu Aug 27, 2015 10:24 am, edited 1 time in total.
Flowcode V6.1.2.0(11 05 2015)

User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times
Contact:

Re: gLCD EBM001 in mode SPI

Post by cubitus54 »

Hello,

More more faster :):)

Only for Ardiuno Mega
I use er SPI register directly (SPDR) in a command C..

90ms for clear all screen :D :D
SPI_c.gif
SPI_c.gif (29.77 KiB) Viewed 8081 times
Flowcode V6.1.2.0(11 05 2015)

Post Reply