Page 1 of 1

Newbie with problems EB058 gLCD

Posted: Mon Mar 28, 2011 5:15 pm
by kelvinbrammer
Hi there

I am new to eblocks. I am just trying to load the test program into a pic16f877a as per the user guide, but nothing happens.

I program the pic and get a message saying it has been programmed. I am using an extrernal 13.5V psu and have the correct additional power wire connected.

I also select the correct pic in PPP and disable everything and set to XT.

I am using EB057TP.hex as I can't find the EB058tp.hex as specified in the guide.

Also, this is actually a new glcd eb058.

I have created a test program just to check the outputs of all of the ports and they all light LEDs.

Any help would be gratefully received.

Thanks.
Kelvin

Re: Newbie with problems EB058 gLCD

Posted: Fri Apr 01, 2011 11:45 am
by Benj
Hello Kelvin,

There was a bug in the EB058 component when it was released.

Here is an updated version, simply copy the file into your "Flowcode v4/Components" directory before starting Flowcode.
PIC_gLCD.c
(33.77 KiB) Downloaded 494 times
The attached Flowcode file should work correctly with the display.
EB058TP.fcf
(7.5 KiB) Downloaded 519 times
The files on the E-block datasheet page should now be correct and include updated components for other versions of Flowcode.

Re: Newbie with problems EB058 gLCD

Posted: Fri Apr 01, 2011 9:30 pm
by kelvinbrammer
Thanks for the reply.

I haven't even got as far as using flowcode yet, although I only have version 3.6.11.53. I am only trying to test the glcd with the pre compiled test code from http://www.matrixmultimedia.com/software/EB057.zip but all I get is a blank screen and no lit LED.

Regards

Kelvin

Re: Newbie with problems EB058 gLCD

Posted: Sat Apr 02, 2011 8:49 pm
by kelvinbrammer
Ben

I have just re-downloaded the EB058TP.hex file. This is a newer one than the one I originally had. The glcd now works.

Many Thanks

Kelvin

Re: Newbie with problems EB058 gLCD

Posted: Mon Apr 04, 2011 2:11 pm
by kelvinbrammer
Will the updated component work with flowcode 3?

Kelvin

Re: Newbie with problems EB058 gLCD

Posted: Tue Apr 05, 2011 2:50 pm
by Benj
Hello Kelvin,

Hmm it should do but the parameters passed from Flowcode will be incorrect due to the older version of the component. Do you want me to test this for you?

Re: Newbie with problems EB058 gLCD

Posted: Tue Apr 05, 2011 8:47 pm
by kelvinbrammer
Hi

Could you test it please, It would be much appreciated?

Thanks

Kelvin

Re: Newbie with problems EB058 gLCD

Posted: Wed Apr 06, 2011 12:40 pm
by Benj
Hello,

Here is a C component file for driving the EB057 and EB058 E-blocks gLCD from Flowcode v3.

You will need to make sure that the component connection for the CS pin is correct. The other connections are hardwired to the SPI peripheral pins.

Do not use this file with Flowcode v4 or if you do not use the EB057 or EB058 gLCD E-blocks as the other display types will stop working.

Re: Newbie with problems EB058 gLCD

Posted: Mon Jun 13, 2011 8:03 am
by greentech
how can i wire the mcp23s17 chip with pic micro and lcd. can u post a diagram. the diagram in the datasheet is hard to understand.

best regards.

Re: Newbie with problems EB058 gLCD

Posted: Tue Jun 14, 2011 10:29 am
by Benj
Hello,

You connect the device up as follows.

LCD Pin -> uC Pin

CS -> Pin selected in Flowcode
SCK -> SCK
MISO -> SDI
MOSI -> SDO

If you need actual pin connections then let me know which device you are using.

Re: Problems EB058 gLCD

Posted: Wed Jul 06, 2011 11:23 am
by Mark
I am trying to get the gLCD working on the EB006 board using a 16F877, the gLCD is on Port C and I am coding in Flowcode v4 pro, checked as up to date. The power (14v (actually 17v)) goes to the gLCD board and ground is via the D-type connector. I have checked '14v' and 3.3v is present on the gLCD unit. There is no light at all from the EB058. Precursor code flashes led's on another e-block to show that the chip is OK, code simulates OK for the gLCD.

Should the LED on the board have lit up?
Should there be any background glow from the backlight?

Flowcode provides the connections:
Reset,
Chip select,
Clock and
Data

EB058 provides
CS -> Pin selected in Flowcode
SCK -> SCK
MISO -> SDI
MOSI -> SDO

What should connect to what?

For me (and others) a list of: pin X of port C is used for... would be handy to save having to use the wiring diagram to figure out what physically goes where.

Working example code would save an explanantion...

Thanks in advance,

Mark

Re: Newbie with problems EB058 gLCD

Posted: Wed Jul 06, 2011 12:18 pm
by Benj
Hello Mark,

LED and Backlight off are normal when starting out with the gLCD. You have to establish communications for the LED and backlight to become operational.

First of all have you loaded the updated component C file listed above by dropping the C file into your Components directory.

You will then need to go into the properties of the gLCD component and switch it to the EB057 display type.

Next go to the component connections screen the only pin you are interested in is the chip select pin. Set this to PortC pin 0. The other pins you can leave disconnected or connect to any other pins. These other pins are for other displays and so are not actually used in the code meaning you do not have to worry about finding free pins to use.

If you are using the EB058 E-blocks adapter board then set the jumper to position B.

If you are wiring the connections yourself then you need to follow this arrangement.

RC0 -> CS
RC3 -> SCK
RC4 -> MISO
RC5 - MOSI

This wiring and jumper setup applies for any 40pin 8-bit PIC device.

Re: Newbie with problems EB058 gLCD

Posted: Thu Jul 07, 2011 8:18 am
by Mark
Hi Ben,

Thanks, working fine now.

For the record the 01 April C code is the one that worked the 06 April posted code did not (for me).

The activation of backlight and LED by software is useful, to save power. I did not spot an option to 'deactivate' (for the same benefit) is there one?

Cheers,

Mark

Re: Newbie with problems EB058 gLCD

Posted: Thu Jul 07, 2011 9:48 am
by Benj
Hi Mark,

The LED and backlight on the display are both controlled by the LCD itself. You could try calling this function using a C code icon in your Flowchart.

Code: Select all

gLCD_SendByte(MX_GFXLCD_CMD, 0x01);				//Software Reset
After calling this you will have to use the init function again to restart the display.

Re: Newbie with problems EB058 gLCD

Posted: Fri Jul 29, 2011 9:16 pm
by Mark
Ben,

I finally got round to trying out the code to turn off the gLCD:

gLCD_SendByte(MX_GFXLCD_CMD, 0x01); //Software Reset

used as the sole text in a C Code icon. However, I got the error text below, any suggestion?

Thanks.

File name: C:\Documents and Settings\User\My Documents\Flowcode Code\Formula Flowcode\Line Follower Move Display 3.1.c
Generated by: Flowcode v4.5.18.74
Date: Friday, July 29, 2011 21:13:52
Licence: Professional
Registered to: H..........

http://www.matrixmultimedia.com


Launching the compiler...
c:\program files\matrix multimedia\flowcode v4\boostc\boostc_pic18_flowcode.exe -v -t PIC18F4455 "Line Follower Move Display 3.1.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited


Line Follower Move Display 3.1.c
Starting preprocessor: c:\PROGRA~1\MATRIX~1\FLOWCO~1\boostc\pp.exe "Line Follower Move Display 3.1.c" -i c:\PROGRA~1\MATRIX~1\FLOWCO~1\boostc\include -d _PIC18F4455 -la -c2 -o "Line Follower Move Display 3.1.pp" -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX


............................................................................................................

Line Follower Move Display 3.1.c(3896:2): error: unknown identifier 'gLCD_SendByte'
Line Follower Move Display 3.1.c(3896:2): error: failed to generate expression
Line Follower Move Display 3.1.c success

failure

.
Return code = 1

Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

FINISHED

Re: Newbie with problems EB058 gLCD

Posted: Mon Aug 01, 2011 10:02 am
by Benj
Hello,

Ok sorry please can you try replacing the line with this.

FCD_gLCD0_gLCD_SendByte(MX_GFXLCD_CMD, 0x01); //Software Reset

Re: Newbie with problems EB058 gLCD

Posted: Mon Aug 01, 2011 8:35 pm
by Mark
Ben,

Thanks. No syntax problem reported on compile. But, please see my post:

http://www.matrixmultimedia.com/mmforum ... 657#p26312

I just cannot get the gLCD working under software driven commss with FC 4.5, exactly the same programme as worked a treat with FC 4 (same details as in the preceding posts to the above link). In fact it worked far faster in software than in hardware (with the 48MHz FF 18F4455 that is).

Mark

Re: Newbie with problems EB058 gLCD

Posted: Mon Apr 02, 2012 4:23 pm
by Kennedy
HI
i have a problem using EB058 with PIC18f4550. i connect Port B like this
RESET >> 4
CS >> 0
SCK >>3
SDO >>5
but it isn't work. how can find the problem is?

Thank you
Kennedy

Re: Newbie with problems EB058 gLCD

Posted: Mon Apr 02, 2012 5:10 pm
by Benj
Hello,

The EB057/58 needs connecting to the hardware SPI pins on your device. For your chip these pins are as follows.

RESET >> Any I/O
CS >> Any I/O
SCK >> RB1
SDO >> RC7

Because the clock and data out are on different ports I would connect the E-block to PortB and then use the patch system to route the various connections through. Then wire a link from RC7 to the SDO on the patch system, you could use a second E-block connected to PortC to help with this.

Let me know if you need any further explanation to get this running for you.