Menu

VFD display

Help
Mikam
2020-04-14
2020-05-13
1 2 > >> (Page 1 of 2)
  • Mikam

    Mikam - 2020-04-14

    Resolved. Please use v0.98.07

    Also see https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/tree/master/VFD_solutions


    Hi
    Using 98.06. VFD display Farnell 149-5420. Parallel interface 8bit works perfectly. If i then change to 4bit
    i just get garbage display. Swapped out with a pin compatible LCD, works perfect in both 8/4 bit.
    Has anyone tried the VFD in 4bit?

    Thanks

     

    Last edit: Anobium 2020-05-13
  • mkstevo

    mkstevo - 2020-04-14

    I've not used one of those units, no.

    I've used a similar unit with an SPI interface though. I do recall that it was rather fussy on the timing. It could be that there are not enough delays between the Hi/Lo nibbles of the 4 data bits as they are transferred to the display?

    I'm clutching at straws though really. I would have suggested that you try putting a standard LCD in the circuit and give that a try to eliminate any wiring sillies, but you've done that already...

    I never got the brightness on mine to work reliably for no reason I could ever track down. Gave up on that. These really are lovely displays and I would like to use them more, it is a pity that LCDs can be bought for so much less.

     
  • Mikam

    Mikam - 2020-04-15

    Hi Thanks for the info.
    Looks like ill have to revert to LCD. Just prefer VFD's as they look more profesional.
    Rgds

     
    • Anobium

      Anobium - 2020-04-15

      Looks nice.

      I will try to get a sample and see the differences. This looks closer to the T6963 Controller than a standard LCD. I try to get one on the next few days.

      Anobium

       
      • Anobium

        Anobium - 2020-04-15

        I have sent the 'ask' to the manufacturer. Have to wait for a response.

         
  • George Towler

    George Towler - 2020-04-15

    Perhaps the mode select sequence is different

     
  • mkstevo

    mkstevo - 2020-04-15

    According to the manual, to change to 4bit mode, you would need to send a control instruction for 4bit, and a second instruction for brightness. It could be that the usual LCD routine of sending the 4bit (or 8bit) instruction three times is incorrect for this display?

    The command for 4bit is the same (32 decimal, 0x20 hex) as is that for 8bit (48 decimal, 0x30 hex) but the manual does specify that it must be followed by a brightness value.

    The manual further states that there must be a minimum 40uS delay between sending the upper and lower nibbles of the data byte when in 4bit mode.

     

    Last edit: mkstevo 2020-04-15
  • William Roth

    William Roth - 2020-04-16

    This device required a minimum 40us delay between nibbles when using 4-bit mode. The current LCD driver uses HD44780 specifications so the only delay between nibbles is 2 us plus a bit of processing overhead.

    This VFD is possibly not initalizing correctly due the the 40us requirement and will certainly
    print "garbage" unless the 40us delay between nibbles is implemented.

    Also, the LCD initalization routines do not address "display luminance"

    It will require modification of the existing LCD Driver (4-bit and 8 bit initalizaton routines and modification to the 4-bit section of LCDWriteByte) to accomodate this incompatible device.

    William

     
  • Anobium

    Anobium - 2020-05-05

    I have obtained a VFD. Test and I cannot reproduce any issue. I tested on Great Cow BASIC v.0.98.01, 02, 03, 04, 05. 06 and the latest release candidate.

    Not sure what this issue.

    Evan


    4 - bit code

    #chip 18f4525,20
    #config mclr=on
    
    'Use LCD in 4 pin mode and define LCD pins
    #DEFINE LCD_IO 4
    #DEFINE LCD_RW PORTE.1
    #DEFINE LCD_RS PORTE.0
    #DEFINE LCD_Enable PORTE.2
    
    #DEFINE LCD_DB4 PORTD.4
    #DEFINE LCD_DB5 PORTD.5
    #DEFINE LCD_DB6 PORTD.6
    #DEFINE LCD_DB7 PORTD.7
    
    'Main program
    
    'Clear the LCD
    CLS
    'Display some text on both lines
    Locate 0,0
    Print "HOBBY COMPONENTS"
    Wait 1 s
    CLS
    Print ChipNameStr + " @ "+Str(ChipMHz) + "Mhz"
    Locate 1,0
    

    8bit code

    #chip 18f4525,20
    
    
    #DEFINE LCD_IO 8
    #DEFINE LCD_RW PORTE.1
    #DEFINE LCD_RS PORTE.0
    #DEFINE LCD_Enable PORTE.2
    
    #DEFINE LCD_DATA_PORT PORTD
    
    
    'Main program
    
    'Clear the LCD
        CLS
        'Display some text on both lines
        Locate 0,0
        Print "HOBBY COMPONENTS"
        Wait 1 s
        CLS
        Print ChipNameStr + " @ "+Str(ChipMHz) + "Mhz"
        Locate 1,0
        Print "by Anobium"
    
     

    Last edit: Anobium 2020-05-05
  • Anobium

    Anobium - 2020-05-05

    Very nice display.

    The color is a really nice green.. the GIF does not do the VFD justice.

    Code.

    #chip 18f4525,20
    #config mclr=on
    
    
    'Use LCD in 4 pin mode and define LCD pins
    #DEFINE LCD_IO 4
    #DEFINE LCD_RW PORTE.1
    #DEFINE LCD_RS PORTE.0
    #DEFINE LCD_Enable PORTE.2
    
    #DEFINE LCD_DB4 PORTD.4
    #DEFINE LCD_DB5 PORTD.5
    #DEFINE LCD_DB6 PORTD.6
    #DEFINE LCD_DB7 PORTD.7
    
      'Main program
      do
          'Clear the LCD
          CLS
          'Display some text on bot, 0xlines
          Locate 0,0
          Print "NORITAKE ITRON VFD "
          Locate 1,0
          Print "GU140x16G-7806A"
          Wait 2 s
          CLS
          Print ChipNameStr + ": "+Str(ChipMHz) + "Mhz"
    
          Locate 1,0
          Print "Great Cow BASIC"
          wait 1 s
    
          dim TableLength, TablePosition, GraphicData as byte
    
          ClS
          'Send Char 1
          SET LCD_RS OFF
          ReadTable Graphics1, 0, TableLength
          for TablePosition = 1 to TableLength
            ReadTable Graphics1, TablePosition, GraphicData
            LCDWriteByte ( GraphicData)
            SET LCD_RS ON
          next
    
          'Send Char 2
          SET LCD_RS OFF
          ReadTable Graphics2, 0, TableLength
          for TablePosition = 1 to TableLength
            ReadTable Graphics2, TablePosition, GraphicData
            LCDWriteByte ( GraphicData)
            SET LCD_RS ON
          next
    
          wait 1 s
      loop
    
    
    
    Table Graphics1
    0xF1, 0x30, 0x04, 0x37, 0x0B, 0x68, 0x1C, 0x5C, 0x48, 0x3E, 0x1D, 0x1D, 0x14, 0x36
    End Table
    
    Table Graphics2
    
    0xF1, 0x50, 0x00, 0x63, 0x0F, 0x76, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0xC7, 0xFE, 0x72, 0x73
    0x32, 0x3E, 0x3F, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    0x00, 0x3C, 0x42, 0x81, 0xB9, 0xC1, 0x42, 0x7C, 0x20, 0xD8
    0xFC, 0x3C, 0xFC, 0xCA, 0x49, 0xB1, 0x89, 0x42, 0x3C, 0x00
    End Table
    
     

    Last edit: Anobium 2020-05-05
  • William Roth

    William Roth - 2020-05-05

    I noticed that in 4-bit mode you defined the RW pin and did not define NO_RW. Do you have the RW pin grounded or is the display using RW Mode? RW mode waits for the busy/ready flag and will prevent timing errors.

    It could be that the OP was not using RW mode and the RW pin was grounded.

    Suggest you configure for NO_RW, ground the RW Pin, and retest to see if you get the garbage display.

    Bill

     

    Last edit: William Roth 2020-05-05
  • Anobium

    Anobium - 2020-05-05

    RW is required. With NO_RW... no action.

     
  • Mikam

    Mikam - 2020-05-06

    Hi
    Thanks for checking in 4bit mode. Not sure where the problem lies. If i cycle the power slowly
    i still get garbage, but if i cycle the power quickly <2s the display then works.
    Please cycle power.

     
    • Anobium

      Anobium - 2020-05-06

      What is your power supply?

       
  • Mikam

    Mikam - 2020-05-06

    GWinstek GPS-4303. Just tried another supply which can deliver 4A, still the same reset problem.

     
  • Anobium

    Anobium - 2020-05-06

    I will look to slowly power cycle.

     
  • Mikam

    Mikam - 2020-05-06

    This works. Power cyclescreen displays garbage then resets after a couple of seconds.

     
    • Anobium

      Anobium - 2020-05-06

      Confused. You said the 8bit worked. Are you confirming this?

       
  • Mikam

    Mikam - 2020-05-06

    Sorry wrong attachment.

     
  • Anobium

    Anobium - 2020-05-06

    I am not playing guess the answer.

    I can see a reset routine. What is different about it?

     

    Last edit: Anobium 2020-05-06
  • Anobium

    Anobium - 2020-05-06

    What section of code is this? Init? WriteByte? I will be hours guessing.

     
  • Mikam

    Mikam - 2020-05-06

    From lcd.h. I thought it might help. Sorry.

     
  • Anobium

    Anobium - 2020-05-06

    I am correct in assuming this is from INITLCD() ? and the LCD_IO 4 section?

     
  • Mikam

    Mikam - 2020-05-06

    Yes. Have you seen the same problem?

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.