Driving VFD panels with PT6311 controller

User avatar
dmitryp
Site Admin
Posts: 45
Joined: Sun Aug 04, 2013 1:16 am
Location: Sydney, Australia
Contact:

Driving VFD panels with PT6311 controller

Postby dmitryp » Sat Feb 01, 2014 12:12 am

This topic has been sparked by a question asked at http://www.instructables.com/id/A-DVD-Player-Hack/
Samhayward2002 has a VFD panel with PT6311 controller and he wants to drive it with Arduino-compatible board. In order to do this, a basic software driver has been designed. A simple sketch is included.
Attachments
PT6311_Test.zip
A simple Arduino compatible PT6311 driver allowing to test VFD panel
(4.7 KiB) Downloaded 1348 times

Sam66
Posts: 15
Joined: Tue Feb 11, 2014 6:03 pm

Re: Driving VFD panels with PT6311 controller

Postby Sam66 » Tue Feb 11, 2014 6:15 pm

I finally got round to wiring this up and testing the sketch you kindly provided.

My display is 9 grids 16 segments (actual segments on each grid range from 8 to 16) so initially I tried the sketch set to 12d16s - this lit up a few segments on each of the 9 digits (but not all segments on any digits)

I then tried it set to 9d19s which lit up different segments this time including all segments on 3 of the digits and some random ones on all other digits.

Any ideas what to try next?

Sam66
Posts: 15
Joined: Tue Feb 11, 2014 6:03 pm

Re: Driving VFD panels with PT6311 controller

Postby Sam66 » Fri Feb 14, 2014 4:29 pm

In this line:

write_raw(0xFF, 9)

What does the 9 signify? Is it the number of bytes sent? If so do you specify 9 in case we are using more than 16 segments? So for 16 segments 6 should light up the first 3 digits?

Could I use the same command format to try and light up segment number 1 on all 9 digits eg. write_raw(0x02, 18)

Sorry for all the questions but I'm trying to get my head around things so I can experiment myself without bothering you :)

Sam66
Posts: 15
Joined: Tue Feb 11, 2014 6:03 pm

Re: Driving VFD panels with PT6311 controller

Postby Sam66 » Mon Feb 17, 2014 10:19 pm

Ok, so I made a bit more progress and understand a little more about how it functions.

Adding these lines to the sketch:

write_raw(0b0000000, 27);
pt6311_driver.addrSetCmd(24);
write_raw(0b00111110, 1);
write_raw(0b10110110, 1);
pt6311_driver.addrSetCmd(22);
write_raw(0b10100100, 1);
pt6311_driver.addrSetCmd(10);
write_raw(0b10100100, 1);
pt6311_driver.addrSetCmd(7);
write_raw(0b11101110, 1);

Displays 'HELLO'.

I'm sure this is not the most efficient way to do it but at least I'm making progress.

User avatar
dmitryp
Site Admin
Posts: 45
Joined: Sun Aug 04, 2013 1:16 am
Location: Sydney, Australia
Contact:

Re: Driving VFD panels with PT6311 controller

Postby dmitryp » Tue Feb 18, 2014 12:43 am

Sam66 wrote:I finally got round to wiring this up and testing the sketch you kindly provided.

My display is 9 grids 16 segments (actual segments on each grid range from 8 to 16) so initially I tried the sketch set to 12d16s - this lit up a few segments on each of the 9 digits (but not all segments on any digits)

I then tried it set to 9d19s which lit up different segments this time including all segments on 3 of the digits and some random ones on all other digits.

Any ideas what to try next?


Good start!
I am still not sure which mode would be correct for your VFD. Looks like it is 9d19s, but it needs to be investigated a bit more. The test is writing nine 0xFF bytes (all bits are set meaning that all corresponding segments must be lit up), assuming that one digit occupies 3 bytes in VFD controller's RAM then 3 digits with all segments being lit up - which is pretty much inline with what you are observing. However, nothing else should be glowing on other digits... Anyway, the next step is to discover which bit is mapped to which segment so that we can build a charset.

BTW, does your VFD have digits only or there are some special symbols like 'DVD', 'MP3', progress bar or something along these lines? Can you post a photo of your VFD maybe?

Thank you,
Dmitry

I'll prepare a high level test on top of this driver (today-tomorrow).

User avatar
dmitryp
Site Admin
Posts: 45
Joined: Sun Aug 04, 2013 1:16 am
Location: Sydney, Australia
Contact:

Re: Driving VFD panels with PT6311 controller

Postby dmitryp » Tue Feb 18, 2014 1:06 am

Sam66 wrote:In this line:

write_raw(0xFF, 9)

What does the 9 signify? Is it the number of bytes sent? If so do you specify 9 in case we are using more than 16 segments? So for 16 segments 6 should light up the first 3 digits?

Could I use the same command format to try and light up segment number 1 on all 9 digits eg. write_raw(0x02, 18)

Sorry for all the questions but I'm trying to get my head around things so I can experiment myself without bothering you :)


Exactly right, 9 is a number of times the first byte should be sent resulting 0xFF being consecutively written 9 times. One digit should be represented by three bytes but not all bits in those three bytes are used in your hardware.

In order to light up 1 segment you need to write something like this:

Code: Select all

write_raw(0x1, 1); // First digit
write_raw(0x0, 1);
write_raw(0x0, 1);

write_raw(0x1, 1); // Second digit
write_raw(0x0, 1);
write_raw(0x0, 1);

...


No problem ask as many questions as you like, it is really exciting to get that thing up and running.

Thank you,
Dmitry

User avatar
dmitryp
Site Admin
Posts: 45
Joined: Sun Aug 04, 2013 1:16 am
Location: Sydney, Australia
Contact:

Re: Driving VFD panels with PT6311 controller

Postby dmitryp » Tue Feb 18, 2014 1:43 am

Sam66 wrote:Ok, so I made a bit more progress and understand a little more about how it functions.

Adding these lines to the sketch:

write_raw(0b0000000, 27);
pt6311_driver.addrSetCmd(24);
write_raw(0b00111110, 1);
write_raw(0b10110110, 1);
pt6311_driver.addrSetCmd(22);
write_raw(0b10100100, 1);
pt6311_driver.addrSetCmd(10);
write_raw(0b10100100, 1);
pt6311_driver.addrSetCmd(7);
write_raw(0b11101110, 1);

Displays 'HELLO'.

I'm sure this is not the most efficient way to do it but at least I'm making progress.


Yes, it is not the most efficient way but it does the job. As I said, we need to identify which bit is mapped to which segment and then build a charset, mix it with some extra high level logic to get a bit more usable API. I am going to take my high level class and bolt your PT6311.cpp to it.

Will send the code today-tomorrow. Meantime can you maybe identify which bit is mapped to which segment?

Thank you,
Dmitry

Sam66
Posts: 15
Joined: Tue Feb 11, 2014 6:03 pm

Re: Driving VFD panels with PT6311 controller

Postby Sam66 » Tue Feb 18, 2014 3:47 pm

Hi Dmitry,

Thanks for the replies.

'However, nothing else should be glowing on other digits...'

This was resolved by writing 0x00 to all addresses first

I've made a character set of sorts - I can email it to you or post on here but it may be a bit long to post as there are 4 different layouts for the 7 segment digits along with 17 special symbols. Each digit is controlled by only 1 byte (with 2 digits / 2 bytes per grid) each third byte is not used by the display.

I have a photo of the display which I will annotate this evening so it is clear for you, then upload here or email to you.

A lot of the special symbols are controlled by 0x80 so some mechanism for turning this bit on or off will need to be added after the required character is selected from the character set - I'm probably getting ahead of things here though.

You are right, it is exciting to get the display working :)

User avatar
dmitryp
Site Admin
Posts: 45
Joined: Sun Aug 04, 2013 1:16 am
Location: Sydney, Australia
Contact:

Re: Driving VFD panels with PT6311 controller

Postby dmitryp » Thu Feb 20, 2014 12:18 pm

Sam66 wrote:'However, nothing else should be glowing on other digits...'
This was resolved by writing 0x00 to all addresses first


I would expect PT6311 RAM buffer to be cleared automatically upon start. At least it works like this in case of Holtek drivers. Oh well, maybe it is a wishful thinking. Doesn't matter, we can explicitly clear it.

Sam66 wrote:...as there are 4 different layouts for the 7 segment digits...


This is a bit unusual. I am working on a high level driver which would hide these complexities. However, because of this oddity it is taking a bit longer than I expected.

Sam66 wrote:I have a photo of the display which I will annotate this evening so it is clear for you, then upload here or email to you.


Thank you, that info is very useful.

Sam66 wrote:A lot of the special symbols are controlled by 0x80 so some mechanism for turning this bit on or off will need to be added after the required character is selected from the character set.


Sure, it will be incorporated into API as well.

Will get back to you very soon with the source code.

Thank you,
Dmitry

User avatar
dmitryp
Site Admin
Posts: 45
Joined: Sun Aug 04, 2013 1:16 am
Location: Sydney, Australia
Contact:

Re: Driving VFD panels with PT6311 controller

Postby dmitryp » Mon Feb 24, 2014 12:36 pm

Hi Sam,

Here is an updated version of VFD driver for your panel. I tried to hide complexities of the hardware implementation so that from application point of view segment mappings are the same for all digits and all digits are linearly addressed by a column number in range 0... 13.

Try to run PT6311_Test02_Sketch.ino sketch and see the results - unfortunately, I can't test the app as I don't have the hardware so... there could be some issues.
If everything is right you should see on your display numbers in the following order:

Code: Select all

 012   345
6789    123


Thank you,
Dmitry
Attachments
PT6311_Test_2014_02_24.zip
(9.54 KiB) Downloaded 1192 times


Return to “General Technical Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest