Driving VFD panels with PT6311 controller

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

Re: Driving VFD panels with PT6311 controller

Postby Sam66 » Sat Mar 15, 2014 10:49 pm

Hi Dmitry,

Tested new version, special symbols are flashing but behavior is, I think not quite right:

Medium flame flashes all the time
1st: Oven1 then Timer1 flash ok
2nd: Starting at bottom right and working back, all other symbols flash in conjunction with a digit eg. delimeter1 flashes with digit 1, delimeter2 with digit 3.
3rd: Long pause (flame continues flashing)
Back to 1st

Sam

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 Mar 17, 2014 11:44 am

Hi Sam,

Hmm, this is rather unexpected :) This time the code was thoroughly tested.

Medium flame flashes all the time

That is correct behavior;

1st: Oven1 then Timer1 flash ok

Yes, these two are special case, they are not sharing the same bytes with digits.

2nd: Starting at bottom right and working back, all other symbols flash in conjunction with a digit eg. delimeter1 flashes with digit 1, delimeter2 with digit 3.

Very unusual, at first all digits should flash one by one then special symbols should do the same.

3rd: Long pause (flame continues flashing)

I am a bit puzzled - shouldn't be any pause...

Would you mind running the sketch attached please?


Thank you,
Dmitry
Attachments
PT6311_Test03_Sketch_2014_03_17.zip
(1.04 KiB) Downloaded 992 times

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

Re: Driving VFD panels with PT6311 controller

Postby Sam66 » Mon Mar 17, 2014 9:12 pm

Hi Dmitry,

The new sketch:

Med flame flashes throughout
Oven1, Timer 1 flash as before
No other flashing - just a long pause before it goes back to Oven1 and Timer1

For an idea of timing based on the flash rate of the flame:
2 Oven1
2 (no flashing)
2 Timer1
20 (no flashing)

Thanks,

Sam

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 Mar 18, 2014 8:47 am

Hi Sam,

It seems that I now have explanation why 'tested' code doesn't work - while getting rid of extra lines with debug output I accidently removed one vital line :)

In VFDPanel_19S9D.cpp inside

Code: Select all

           //Does current digit have a special symbol associated with it?
           if (symbolAddr == idx)
           {
               break;
           }           


please make a change so that it would look like this:

Code: Select all

           //Does current digit have a special symbol associated with it?
           if (symbolAddr == idx)
           {
               superimposeSymbol(&tmpBuf, i);
               break;
           }           


Thank you,
Dmitry

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

Re: Driving VFD panels with PT6311 controller

Postby Sam66 » Tue Mar 18, 2014 6:11 pm

That change has fixed it - all digits and symbols now flashing in turn!

Thanks,

Sam

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 Mar 20, 2014 12:33 pm

Hi Sam,

Very good, in this case I would be inclined to say that the driver is virtually done unless you have some ideas what extra features would be nice to have.

Let me briefly describe what functionality is there, what it can and what it can't. There are two ways to transfer bytes to VFD controller: by writing directly or by means of an intermediate buffer which physically resides in Arduino's RAM. The buffer allows to build 'a frame' in several steps and then transmit the whole frame to VFD controller in one go (or almost in one go when it comes to flash effect). The second advantage of having buffer is an ability to flash with digits and symbols (as flashing is not supported by VFD controller), flash rate is changeable as it is controlled by Arduino's application. The driver hides complexities of mapping segments and digits positions. Digits are logically addressed by index in range 0...VFD_MAX_COLUMNS-1.

Let's not focus on direct communication with the panel as it is rather low level and go straight to the intermediate buffer. Here is a sequence of steps to interact with VFD display by means of intermediate buffer:
1. Clear the internal buffer:

Code: Select all

vfd.clearFrame();

2. Print string of digits
- from PGM memory by using

Code: Select all

vfd.print_f_p(PSTR("012..."))
or
- from RAM by using

Code: Select all

vfd.print_f("012...")

3. A single digit can be addressed by

Code: Select all

write_f(uint8_t value, uint8_t dstIndex)
where value is ASCII character to be displayed, dstIndex is a digit logical index

4. A special symbol can be either lit up by using

Code: Select all

vfd.symbolOn(uint8_t symbol_idx)
or switched off by using

Code: Select all

vfd.symbolOff(uint8_t symbol_idx)

5. 'Flame' symbols is controlled separately by using

Code: Select all

setFlame(uint8_t flame_idx, uint8_t isFlashing)
where first argument is flame size, second argument enables flashing when set to true

6. To do physical data transfer to the VFD controller

Code: Select all

vfd.flipFrame()
has to be invoked



Once the fist frame is created, it could be modified without necessity to generate it again from scratch. Let's say, you only need to switch one special symbol off. Just invoke

Code: Select all

vfd.symbolOff(uint8_t symbol_idx)
with appropriate index and then do

Code: Select all

vfd.flipFrame()
again.



Enabling/disabling flashing for digits is controlled by

Code: Select all

setFlashAttr(uint8_t symbol_idx, uint16_t value)
enabling/disabling flashing for special symbols is controlled by

Code: Select all

symbolSetFlashAttr(uint8_t symbol_idx, uint16_t value)
The actual switch between two flashing phases is done by

Code: Select all

vfd.flipFlashState()
and then

Code: Select all

vfd.flipFrame()
must be triggered again. Flash attributes are applicable to digits, not segments but special symbols are controlled independently from digits.


Any questions - do not hesitate to ask, I would be pleased to answer.

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 Mar 24, 2014 9:52 pm

Hi Sam,

Forgot to mention, there is a trick you can do when setting/getting flash attributes which applies to the following methods:

void VFD_19S9D::setFlashAttr(uint8_t index, uint16_t value)
uint16_t VFD_19S9D::getFlashAttr(uint8_t index)
void VFD_19S9D::symbolSetFlashAttr(uint8_t symbol_idx, uint16_t value)
uint16_t VFD_19S9D::symbolGetFlashAttr(uint8_t symbol_idx)

For the first two methods if index is within range of 0...VFD_MAX_COLUMNS-1 then the next argument specifies a bit value (either 0 or 1) for a single attribute to be set/get, otherwise the next argument represents values for all digits which allows to get/set attributes in one go.

For the last two methods if symbol_idx is within range of 0...VFD_MAX_SPECIAL_SYMBOLS-1 then the next argument specifies a bit value (either 0 or 1) for a single attribute to be set/get, otherwise the next argument represents values for all special symbols which allows to get/set attributes in one go.


Thank you,
Dmitry

Rafael
Posts: 12
Joined: Tue Mar 25, 2014 4:23 pm

Re: Driving VFD panels with PT6311 controller

Postby Rafael » Tue Mar 25, 2014 4:30 pm

Hi Dmitryp,

Please, can you help me to run this display?

Image

Tryed all modes:

Code: Select all

#define VFD_DISP_MODE_8D20S  0   //8 digits, 20 segments
#define VFD_DISP_MODE_9D19S  8   //9 digits, 19 segments
#define VFD_DISP_MODE_10D18S 9   //10 digits, 18 segments
#define VFD_DISP_MODE_11D17S 0xA //11 digits, 17 segments
#define VFD_DISP_MODE_12D16S 0xB //12 digits, 16 segments
#define VFD_DISP_MODE_13D15S 0xC //13 digits, 15 segments
#define VFD_DISP_MODE_14D14S 0xD //14 digits, 14 segments
#define VFD_DISP_MODE_15D13S 0xE //15 digits, 13 segments
#define VFD_DISP_MODE_12D16S 0xF //16 digits, 12 segments


With no sucess to write 'HELLO' as write in the first page.

Thanks a lot.

Rafael

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 Jul 14, 2014 2:56 am

Hi Rafael,

Sorry for such a late reply - your question sank in content generated by spammers.

Unfortunately just a picture of the actual VFD glass is not enough. Do you know what VFD driver (which chip) is used? Or alternatively, can you post a picture of the other side of this display?

Thank you,
Dmitry

Rafael
Posts: 12
Joined: Tue Mar 25, 2014 4:23 pm

Re: Driving VFD panels with PT6311 controller

Postby Rafael » Mon Jul 14, 2014 11:29 pm

Hi,

The controller is PT6311-LQ

Image

Thanks.


Return to “General Technical Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest