will this graphic VFD work?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

will this graphic VFD work?

Post by hyperion007 »

Hi,

I got my hands on a Noritake GU140X16J-7002 140x16 graphic VFD display but I'm unsure if it will work with any existing FC component for graphic LCD?

I have never used a graphic display before so maybe someone could take a quick look at the datasheet and tell me if it will work or if I have to bitbang it (I rather not)


Thanks.

http://noritake-vfd.com/discountsalefor ... -7002.aspx
Attachments
GU140X16J-7002.pdf
(140.17 KiB) Downloaded 260 times

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

A quick comparison shows this display does not use the same command set the existing display components use. So you will need a custom component (are you using the professional edition?) or bit bang.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

I am indeed using the professional version. Ok. I have never made a custom component but I guess I could give it a try. Thanks for checking!

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

I have custom component code for the -3900 series VFD displays. The commands for this display look very familiar :-) I need to check if I can release the code as it was intended for a commercial project.

Will you be using the parallel or serial interface?
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

I would like to use serial if possible due to less wires/ports but If you have one for parallel coms I would gladly take that :)

I could not make heads or tails of making my own custom component.

Thanks for checking.

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

Any news Kersing?

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

I'll be able to provide the custom code after a little cleanup of some proprietary stuff left in it. Will post later this week.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

Great news! Thank you very much!

/Daniel

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

Sorry for the delay. Attached you will find the component.

To use the code:
Copy attached file into the Components directory of your FC installation. (You might want to save the current file first)
Add the component to your flowchart. Call macro InitDisplay first to initialize the display.

Current setup is to use parallel communications for the display.
A0 = Busy signal from display
A1 = Write signal to display
D0-D7 = Data to display.

If you want to change this you need to edit the (C) code for '[Initialization]' and 'writechar' by selecting the component, click on 'Custom Code' in the property pane, select the macro from the list and use "Edit Code" to adapt. Or use your favorite editor to edit the attached file directly (search for porta/portd)

Good luck!
Attachments
FC5_PIC_Custom.c
Custom code for VFD display
(8.9 KiB) Downloaded 243 times
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

Hi Kersing!

Thank you very much. I will have a go at it when I get home.

I'll let you know how it work.

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: will this graphic VFD work?

Post by Benj »

Hello Hyperion,

Let us know if Kersing's custom component works ok. If it does then I will add the code into a v6 gLCD component.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

Ben,

The code has been written for a dsPIC with a XXXX-3900 type VFD. Tested and working on that setup. I have adapted it for use on the FC5 8 bit PIC series for this post. Attached the FC4 original code for 16bit PICs.

While working on the component, could you add the option to specify the display size for V6 as there are quite a few sizes available?

Best regards,

Jac

BTW. VFD Y axis addressing for most commands uses a line address (lines are 8 pixels in height), not a pixel address.
Attachments
PIC16BIT_Custom.c
(8.94 KiB) Downloaded 209 times
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

looking at the datasheet for this display: http://media.digikey.com/pdf/Data%20She ... J-7002.pdf

I am unsure where to plug the A0 and A1 pins

Pin4 is RS
Pin5 is /W
Pin6 is /RD

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

Does the unit have a jumper JRB? If so it should be set to BC, with A0 connected to pin 3. A1 should be connected to pin 5 (not WR). (Check this picture, bottom right is the jumper where B and C should be connected. Full data sheet at this url)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

YEs it has JRB jumper but nothing connected.

but you say A0 should be pin3? it says that pin3 is not connected (NC) in all datasheets for the 700x displays. and Pin5 is WR but you say it should not be WR on pin5?

edit: nevermind I now saw this: * Pin#3 can be changed to /RESET or PBUSY terminal, and selectable by jumper. but I am still not sure what you mean about pin5

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

Pin 5 (Write signal) is active low. This is usually written as not WR or /WR. Sorry for the confusion.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

Ok, so pin4 and pin6 should not be connected to anything?

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

According to the data sheet RS (pin 4) should not be used. So no need to connect it. The code does not read from the display, so /RD (pin 6) does not need to be connected to the PIC. You could connected it to +5V to make sure the signal level is well defined.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

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: will this graphic VFD work?

Post by Benj »

While working on the component, could you add the option to specify the display size for V6 as there are quite a few sizes available?
Yep that shouldn't be an issue. Any idea what standard sizes are available or should I just allow any size to be entered?

Also can you think of a meaningful name for the component, Noritake maybe?

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

Ok, I have now tried it.

With a jumper on B+C and A0 to Pin3 and A1 to Pin5, Pin6 to +5V and D0-7 to pin7-14

Nothing happens. I have called the custom(0) InitDisplay() and then a Custom(0) WriteString("Volume")


But if I remove the jumper on B+C I do get a some characters flashing in the top left corner of the display. It looks like a V and e, the next time I power it up it's oe and it just displays two random letters of "Volume" and then goes blank.

But with the jumper I get nothing.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

There is a small difference in the parallel interface for this module compared to the module the code was developed for. The original module had a ready signal, this one uses a busy signal. To compensate edit the writechar macro, replace:

Code: Select all

        char ready;

        // Wait for display to become ready to accept input
        do {
                ready = (porta & 0x01) == 0x01;
        } while ( ! ready );
with:

Code: Select all

        char busy;

        // Wait for display to become ready to accept input
        do {
                busy = (porta & 0x01) == 0x01;
        } while ( busy );
Or replace the file in the components directory with the attachment.

The behavior with the jumper removed is consistent with timing issues, the controller is writing data to the display before it has finished processing the previous input. The code listed above should solve these issues by waiting for the display to become not busy before attempting to write the next byte.
Attachments
FC5_PIC_Custom.c
(8.9 KiB) Downloaded 170 times
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

Hi,

I replaced the custom component with the new one you provided. Now it does print the entire string "Volume" but it then turns off the display.
I tried using the macro SetPower(1) but it was the same.

Progress none the less :)

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

Could you post your program? (fcf file)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: will this graphic VFD work?

Post by hyperion007 »

sure, it contains a lot of other stuff, but the stuff for the VFD are at the top of the main macro
Attachments
PIC18F4550_Apple_RC_Graphic_VFD.fcf
(54.64 KiB) Downloaded 147 times

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: will this graphic VFD work?

Post by kersing »

Could you try the attached code to see what it does? It should display the string, wait 1/2 second and print 'A' repeatedly.
Attachments
PIC18F4550_TEST_Graphic_VFD.fcf
(55.26 KiB) Downloaded 138 times
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Post Reply