Recent Posts

Pages: [1] 2 3 ... 10
1
OLEDs / Re: NHD-3.12-25664UCB2 Problem Displaying Text
« Last post by Chris O. on June 27, 2017, 08:40:36 PM »
Quote
Does anyone have a snippet or library to do this? It seems like there is a library for every other display except this one. I am using an Arduino Mega 2560.

I did use u8glib library before on NHD-3.12-25664UMB3 OLED 256 x 64 with great success.
https://github.com/olikraus/u8glib

The author (Olikraus) also released newer version of this Library u8g2 which I have no experience with.
https://github.com/olikraus/u8g2

u8glib frames per second example:
NOTE:  tested on u8glib version 1.15
Code: [Select]
/*

  FPS.pde
 
  >>> Before compiling: Please remove comment from the constructor of the
  >>> connected graphics display (see below).
 
  Universal 8bit Graphics Library, http://code.google.com/p/u8glib/
 
  Copyright (c) 2012, olikraus@gmail.com
  All rights reserved.

  Redistribution and use in source and binary forms, with or without modification,
  are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice, this list
    of conditions and the following disclaimer.
   
  * Redistributions in binary form must reproduce the above copyright notice, this
    list of conditions and the following disclaimer in the documentation and/or other
    materials provided with the distribution.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 

  ST7920_192X32, SPI:    FPS: Box=7.6   @=9.8                iFPS: Box=11.4  @=14.7
  ST7920_192X32, 8Bit:   FPS: Box=6.2   @=7.5                iFPS: Box=9.3 @=11.2
  DOGM128 SW SPI:        FPS: Box=5.1   @=5.9  Pix=2.6       iFPS: Box=10.2 @=11.8 Pix=5.2
  DOGM128 HW SPI:        FPS: Box=5.5   @=6.3                iFPS: Box=11.0 @=12.6
  DOGXL160 SW SPI:       FPS: Box=1.7   @=1.9                iFPS: Box=6.9 @=7.7
  DOGXL160 HW SPI:       FPS: Box=1.8   @=2.1               
 
  NHD27OLED_BW,       SW SPI: FPS: Box=3.0  @=3.7
  NHD27OLED_BW,       HW SPI: FPS: Box=3.5  @=4.5
  NHD27OLED_2X_BW,    SW SPI: FPS: Box=3.8  @=4.9
  NHD27OLED_2X_BW,    HW SPI: FPS: Box=4.6  @=6.4
 
  30 Sep 2012
  NHD27OLED_BW, SW SPI: FPS: Clip=9.2 Box=3.9  @=4.4 NEW_CODE
  NHD27OLED_BW, SW SPI: FPS: Clip=9.2 Box=3.6  @=4.5
  NHD27OLED_BW, HW SPI: FPS: Clip=16.3 Box=4.7  @=5.6
  NHD27OLED_2X_BW, SW SPI: FPS: Clip=9.7 Box=4.5  @=5.8
  NHD27OLED_2X_BW, SW SPI: FPS: Clip=18.0 Box=5.8  @=7.9

  1 Oct 2012
  ST7920_192X32, 8Bit:   FPS: Box=7.2   @=10.0               
  DOGM128 SW SPI:         FPS: Box=5.2   @=6.6  Pix=2.6               
  DOGM128 HW SPI:         FPS: Clip=33.2 Box=5.5   @=7.1
  DOGXL160 SW SPI:         FPS: Box=1.7   @=2.0
  DOGXL160 HW SPI:         FPS: Box=1.8   @=2.2

  DOGXL160 GR SW SPI:         FPS: Box=1.1   @=1.3

  1 Mar 2013
  ST7920_192X32_1X, SPI:    FPS: Clip=10.3 Box=5.5  @=7.2 Pix=3.9
  ST7920_192X32_4X, SPI:    FPS: Clip=10.9 Box=6.7  @=8.8 Pix=7.4
  ST7920_192X32_1X, 8Bit:    FPS: Clip=14.2 Box=6.1  @=8.4 Pix=4.2
  ST7920_192X32_4X, 8Bit:    FPS: Clip=14.2 Box=7.8  @=10.7 Pix=8.7
  ST7920_192X32_1X, HW SPI:    FPS: Clip=14.2 Box=6.3  @=8.7 Pix=4.3
  ST7920_192X32_4X, HW SPI:    FPS: Clip=15.3 Box=8.0  @=11.2 Pix=9.0

  2 Jun 2013
  U8GLIB_DOGM128 SW SPI:                                          FPS: Clip=23.9 Box=4.5  @=6.6  Pix=2.1
  U8GLIB_DOGM128_2X SW SPI:                                       FPS: Clip=28.5 Box=6.6  @=9.7  Pix=3.9
  U8GLIB_DOGM128_2X HW SPI:                                       FPS: Clip=40.8 Box=7.1  @=10.8 Pix=4.1
 
  3 Jun 2013
  U8GLIB_ST7920_192X32_1X -Os                             SW SPI  FPS: Clip=11.0 Box=5.4  @=7.1 Pix=3.9  Size=11828
  U8GLIB_ST7920_192X32_1X -O3                             SW SPI  FPS: Clip=10.9 Box=5.6  @=7.5 Pix=4.0  Size=13800
  U8GLIB_ST7920_192X32_1X -Os                             SW SPI  FPS: Clip=16.8 Box=6.7  @=9.6 Pix=4.5  Size=11858  (new seq data output)
  U8GLIB_ST7920_192X32_1X -Os                             HW SPI  FPS: Clip=25.7 Box=7.5  @=11.3 Pix=4.8             (new seq data output)
 
  6 Jun 2013
  U8GLIB_DOGS102 u8g(13, 11, 10, 9);                 STD SW SPI  FPS: Clip=9.5  Box=7.6   @=8.2  Pix=6.2 Size=15652
  U8GLIB_DOGS102 u8g(13, 11, 10, 9);                     SW SPI  FPS: Clip=19.1 Box=12.8  @=14.0 Pix=9.2 Size=15532


  12 Jun 2013
  SSD1351_128X128_332                                        SW SPI FPS: Clip=1.3 Box=0.7  @=0.9 Pix=0.4
  SSD1351_128X128_332                                        HW SPI FPS: Clip=3.6 Box=1.1  @=1.5 Pix=0.5

  24 Jun 2013
  Uno SSD1351_128X128_332                                    SW SPI FPS: Clip=1.4 Box=0.8  @=0.9 Pix=0.4
 
  Uno SSD1351_128X128_332                                    HW SPI FPS: Clip=4.4 Box=1.2  @=1.6 Pix=0.5
  Uno SSD1351_128X128_HICOLOR                                HW SPI FPS: Clip=3.7 Box=0.8  @=1.0 Pix=0.3

  Mega2560 SSD1351_128X128_332                               HW SPI FPS: Clip=4.4 Box=1.2  @=1.6 Pix=0.5
  Mega2560 SSD1351_128X128_4X_332                            HW SPI FPS: Clip=4.6 Box=2.3  @=2.8 Pix=1.5
  Mega2560 SSD1351_128X128_HICOLOR                           HW SPI FPS: Clip=3.6 Box=0.8  @=1.0 Pix=0.3
  Mega2560 SSD1351_128X128_4X_HICOLOR                      HW SPI FPS: Clip=4.2 Box=1.7  @=2.1 Pix=1.0

  Due SSD1351_128X128_332                                    HW SPI     FPS: Clip=24.6  Box=6.3   @=7.8  Pix=2.8
  Due SSD1351_128X128_4X_332                                 HW SPI     FPS: Clip=28.1  Box=13.0  @=15.1 Pix=8.5
  Due SSD1351_128X128_HICOLOR                                HW SPI     FPS: Clip=20.8  Box=3.4   @=4.5  Pix=1.4
  Due SSD1351_128X128_4X_HICOLOR                             HW SPI     FPS: Clip=26.3  Box=8.9   @=11.1 Pix=4.8

  Due SSD1351_128X128_4X_HICOLOR                             SW SPI     FPS: Clip=0.4   Box=0.4   @=0.4  Pix=0.4
 
  Due DOGS102 u8g(13, 11, 10, 9);                            SW SPI     FPS: Clip=19.1  Box=13.1  @=14.3 Pix=9.4
  Due DOGS102 u8g(10, 9);                                    HW SPI     FPS: Clip=128.9 Box=30.7  @=40.6 Pix=15.4

  Due NHD27OLED_BW u8g(10, 9)                                HW SPI     FPS: Clip=53.0  Box=19.6  @=23.8 Pix=10.6
  Due NHD27OLED_2X_BW u8g(10, 9)                             HW SPI     FPS: Clip=57.0  Box=25.3  @=31.7 Pix=18.1
  Due NHD27OLED_GR u8g(10, 9)                                HW SPI     FPS: Clip=34.1  Box=11.7  @=13.7 Pix=5.6
  Due NHD27OLED_2X_GR u8g(10, 9)                             HW SPI     FPS: Clip=38.1  Box=15.5  @=20.0 Pix=8.8
 
  01 Jun 2014
  16 Bit mode: NHD-3.12-25664UMB3 OLED 256 x 64 pixel resolution
  Teensy 3.0 (CPU SPEED 96Mhz) NHD31OLED_BW u8g(13, 11, 10, 9) SW SPI   FPS: Clip=2.5   Box=2.1   @=2.2  Pix=1.8
  Teensy 3.0 (CPU SPEED 48Mhz) NHD31OLED_BW u8g(10, 9)         HW SPI   FPS: Clip=37.2  Box=7.7   @=10.0 Pix=4.1
  Teensy 3.0 (CPU SPEED 96Mhz) NHD31OLED_BW u8g(10, 9)         HW SPI   FPS: Clip=46.3  Box=9.5   @=11.3 Pix=5.2
  Teensy 3.0 (CPU SPEED 96Mhz) NHD31OLED_2X_BW u8g(10, 9)      HW SPI   FPS: Clip=49.6  Box=13.3  @=16.3 Pix=9.2
  Teensy 3.0 (CPU SPEED 96Mhz) NHD31OLED_2X_GR u8g(10, 9)      HW SPI   FPS: Clip=37.6  Box=8.4   @=10.4 Pix=4.5
 
  Improved performance:
  For Teensy 3.x, there is a digitalWriteFast(pin, value) function that will compile to the fastest possible ARM code
  using only a single bus cycle. http://forum.pjrc.com/threads/23431-Teensy-3-using-IO-pins
  For improved performance replace digitalWrite with digitalWriteFast in ...\arduino-1.0.5\libraries\U8glib\utility\u8g_com_arduino_common.c
 
  Teensy 3.0 (CPU SPEED 96Mhz) NHD31OLED_2X_BW u8g(10, 9)      HW SPI   FPS: Clip=50.7  Box=13.4  @=16.4 Pix=9.2
*/

// SPI Library
#include <SPI.h> //IMPORTANT NOTE: Needed for hw spi on teensy 3.x with Hoss U8G modify Library.
// http://forum.pjrc.com/threads/23445-Teensy-3-0-and-u8glib/page3

#include "U8glib.h"

// setup u8g object, please remove comment from one of the following constructor calls
// IMPORTANT NOTE: The following list is incomplete. The complete list of supported
// devices with all constructor calls is here: http://code.google.com/p/u8glib/wiki/device
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_NHD27OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_NHD27OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_NHD27OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_NHD27OLED_BW u8g(10,9);              // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_NHD27OLED_2X_BW u8g(10,9);           // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_NHD27OLED_GR u8g(10,9);              // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_NHD27OLED_2X_GR u8g(10,9);           // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)

//U8GLIB_NHD31OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_NHD31OLED_2X_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_NHD31OLED_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_NHD31OLED_BW u8g(10,9);       // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_NHD31OLED_2X_BW u8g(10, 9);          // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_NHD31OLED_GR u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_NHD31OLED_2X_GR u8g(10, 9);          // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)

/*
 IMPORTANT NOTE: Needed 16 Bit mode for NHD-3.12-25664UMB3 OLED 256 x 64 pixel resolution
 16 Bit mode: U8glib can be put into 16 Bit mode. Remove comment from {{{#define U8G_16BIT 1}}} in ...\arduino-1.0.5\libraries\U8glib\utility\u8g.h
 
    -------------------> My Pinout connections for NHD-3.12-25664UMB3 OLED <------------------------------------
    Teensy 3.x <--wire-connection--to-> NHD-3.12-25664UMB3 OLED
                                       4-wire Serial Interface:
    PIN-13 -> SCK -------------------> PIN-7  SCLK  Serial Clock signal.          (Hardware Pins are SCK = 13)
    PIN-11 -> DOUT, MOSI ------------> PIN-8  SDIN  Serial Data Input signal.     (Hardware Pins are MOSI = 11)
    PIN-10 -> CS, Select Device -----> PIN-16 CS    Active LOW Chip Enable signal.
    PIN-9  -> D/C, A0 ---------------> PIN-4  D/C   Register select signal. D/C=0: Command, D/C=1: Data
    PIN-3.3v+(100 mA max)-> /Reset --> PIN-15 /RES  Active LOW Reset signal. (Connect to Teensy 3.x 3.3v+)
   
    PIN-GND --to Uno GND to ---------> PIN-1 VSS    Power Supply Ground (-)
                                       IMPORTANT NOTE: needs 3.3v Power Supply other then teensy (100 mA max).
                                                       I had been using Arduino Uno 3.3v out (Connect Uno GND to Teensy GND)
    Arduino Uno 3.3v out (+) --------> PIN-2 VDD    Power Supply Supply Voltage for OLED and logic 3.3V (+)
                                       PIN-3 NC     No Connect
                                       PIN-5        VSS Power Supply Ground (-)
                                       PIN-6        VSS Power Supply Ground (-)
                                       PIN-9 NC     No Connect
                                       PIN-10>14    VSS Power Supply Ground (-)
                                       PIN-17 BS1   GND / 4-wire Serial Interface / MPU Interface Select signal.
                                       PIN-18 BS0   GND / 4-wire Serial Interface / MPU Interface Select signal.
                                       PIN-19>22 NC No Connect / Multi-font IC   
 */
 
#define SECONDS 10
uint8_t flip_color = 0;
uint8_t draw_color = 1;

void draw_set_screen(void) {
  // graphic commands to redraw the complete screen should be placed here 
  if ( u8g.getMode() == U8G_MODE_HICOLOR ) {
    if ( flip_color == 0 )
      u8g.setHiColorByRGB(0,0,0);
    else
      u8g.setHiColorByRGB(255,255,255);
  }
  else {
    u8g.setColorIndex(flip_color);
  }
  u8g.drawBox( 0, 0, u8g.getWidth(), u8g.getHeight() );
}

void draw_clip_test(void) {
  u8g_uint_t i, j, k;
  char buf[3] = "AB";
  k = 0;
  if ( u8g.getMode() == U8G_MODE_HICOLOR ) {
    u8g.setHiColorByRGB(255,255,255);
  }
  else {
    u8g.setColorIndex(draw_color);
  }
  u8g.setFont(u8g_font_6x10);
 
  for( i = 0; i  < 6; i++ ) {
    for( j = 1; j  < 8; j++ ) {
      u8g.drawHLine(i-3, k, j);
      u8g.drawHLine(i-3+10, k, j);
     
      u8g.drawVLine(k+20, i-3, j);
      u8g.drawVLine(k+20, i-3+10, j);
     
      k++;
    }
  }
  u8g.drawStr(0-3, 50, buf);
  u8g.drawStr180(0+3, 50, buf);
 
  u8g.drawStr(u8g.getWidth()-3, 40, buf);
  u8g.drawStr180(u8g.getWidth()+3, 40, buf);

  u8g.drawStr90(u8g.getWidth()-10, 0-3, buf);
  u8g.drawStr270(u8g.getWidth()-10, 3, buf);

  u8g.drawStr90(u8g.getWidth()-20, u8g.getHeight()-3, buf);
  u8g.drawStr270(u8g.getWidth()-20, u8g.getHeight()+3, buf);
 
}

void draw_char(void) {
  char buf[2] = "@";
  u8g_uint_t i, j;
  // graphic commands to redraw the complete screen should be placed here 
  if ( u8g.getMode() == U8G_MODE_HICOLOR ) {
    u8g.setHiColorByRGB(255,255,255);
  }
  else {
    u8g.setColorIndex(draw_color);
  }
  u8g.setFont(u8g_font_6x10);
  j = 8;
  for(;;) {
    i = 0;
    for(;;) {
      u8g.drawStr( i, j, buf);
      i += 8;
      if ( i > u8g.getWidth() )
        break;
    }
    j += 8;
    if ( j > u8g.getHeight() )
      break;
  }
 
}

void draw_pixel(void) {
  u8g_uint_t x, y, w2, h2;
  if ( u8g.getMode() == U8G_MODE_HICOLOR ) {
    u8g.setHiColorByRGB(255,255,255);
  }
  else {
    u8g.setColorIndex(draw_color);
  }
  w2 = u8g.getWidth();
  h2 = u8g.getHeight();
  w2 /= 2;
  h2 /= 2;
  for( y = 0; y < h2; y++ ) {
    for( x = 0; x < w2; x++ ) {
      if ( (x + y) & 1 ) {
        u8g.drawPixel(x,y);
        u8g.drawPixel(x,y+h2);
        u8g.drawPixel(x+w2,y);
        u8g.drawPixel(x+w2,y+h2);
      }
    }
  }
}

// returns unadjusted FPS
uint16_t picture_loop_with_fps(void (*draw_fn)(void)) {
  uint16_t FPS10 = 0;
  uint32_t time;
 
  time = millis() + SECONDS*1000;
 
  // picture loop
  do {
    u8g.firstPage(); 
    do {
      draw_fn();
    } while( u8g.nextPage() );
    FPS10++;
    flip_color = flip_color ^ 1;
  } while( millis() < time );
  return FPS10; 
}

const char *convert_FPS(uint16_t fps) {
  static char buf[6];
  strcpy(buf, u8g_u8toa( (uint8_t)(fps/10), 3));
  buf[3] =  '.';
  buf[4] = (fps % 10) + '0';
  buf[5] = '\0';
  return buf;
}

void show_result(const char *s, uint16_t fps) {
  // assign default color value
  if ( u8g.getMode() == U8G_MODE_HICOLOR ) {
    u8g.setHiColorByRGB(255,255,255);
  }
  else {
    u8g.setColorIndex(draw_color);
  }
  u8g.setFont(u8g_font_8x13B);
  u8g.firstPage(); 
  do {
    u8g.drawStr(0,12, s);
    u8g.drawStr(0,24, convert_FPS(fps));
  } while( u8g.nextPage() );
}

void setup(void) {
  // flip screen, if required
  // u8g.setRot180();
 
  // assign default color value
  if ( u8g.getMode() == U8G_MODE_R3G3B2 )
    draw_color = 255;     // white
  else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
    draw_color = 3;         // max intensity
  else if ( u8g.getMode() == U8G_MODE_BW )
    draw_color = 1;         // pixel on
  else if ( u8g.getMode() == U8G_MODE_HICOLOR ) {
    u8g.setHiColorByRGB(255,255,255);
  }
}

void loop(void) {
  uint16_t fps;
  fps = picture_loop_with_fps(draw_clip_test);
  show_result("draw clip test", fps);
  delay(5000);
  fps = picture_loop_with_fps(draw_set_screen);
  show_result("clear screen", fps);
  delay(5000);
  fps = picture_loop_with_fps(draw_char);
  show_result("draw @", fps);
  delay(5000); 
  fps = picture_loop_with_fps(draw_pixel);
  show_result("draw pixel", fps);
  delay(5000);
}
2
TFTs / Re: Graphic software for NHD-4.3CTP-SHIELD-V
« Last post by Saurabh_B on June 26, 2017, 08:39:38 AM »
Hello George,

I would recommend using the FTDI Screen Editor Software, this can be found here: http://www.ftdichip.com/Support/Utilities.htm#EVEScreenEditor

FTDI also includes a user guide to help you get started as well.
3
TFTs / arduino 101 on nhd-4.3 ctp-shield-n
« Last post by geraldc on June 24, 2017, 10:35:13 PM »
Hi.
Has anyone tried this combination?I can get display to work on uno and mega but not 101 board.
Even with screen disconnected I cant get sketch (sample guages) to compile.
Update. Deleted libraries and reinstalled libraries.Display now working with demo guages.

Thanks
4
TFTs / Graphic software for NHD-4.3CTP-SHIELD-V
« Last post by igeorge on June 24, 2017, 08:55:23 AM »
I bought this shield to develop an application.
But contrary to Nextion  or Mikroelectronika, i did not find a graphic user interface software to design the screen, define, buttons and other components on the screen, nor a tutorial how to start with it.
Can you help me ?
Thank you
 
5
Graphic LCDs / 1.8V IO on NHD-2.4-240320CF-CTXI-F
« Last post by llb on June 18, 2017, 01:21:51 PM »
Hello,

I want to interface the NHD-2.4-240320CF-CTXI-F with an 1.8V system. The datasheet (http://www.newhavendisplay.com/specs/NHD-2.4-240320CF-CTXI-F.pdf) mentions that IOVDD can be 1.8V, but the logic IO parameters Vih, Vil, Voh and Vol all are specified in terms of VDD (which is 3.3V). Is this a typo in the datasheet (intuitively, I would expect IOVDD to set the IO logic levels, instead of VDD) or can the display in fact only interface with 3.3V logic?

Thank you!
6
TFTs / NHD 5.0 800480 startup woes - SOLVED
« Last post by dfansler on June 16, 2017, 10:25:48 AM »
I built a board with LED's for all the signals going to the display, that sits between the processor board and the NHD controller board.  Watching the display init routine run, I noticed that bits 6 & 7 were not behaving.  Turns out that those two pins had a solder bridge between them at the processor.  My display now works.

I wish to thank my parents for having me, my wife for having me, my 2 dogs and 1 cat for having me and finally myself - for without myself I would be . . . . . . not be?

Kind regards,
David

Seems like everytime I try a new display, I have a battle getting it to respond.  On my current project I had to switch from the 7.0 TFT to the 5.0 TFT, both 800x480 and both using the SSD1963 controller board.

Attached is a video of the display going thru the init code.  I am using Curt's eval code for the 5.0 800x480 with the SSD1963.  Oh well, the video is too big - what it shows is the display goes black, then when the init occurs, the screen turns white and you can see a horizontal line of pixels as it moved down the display.  When it reaches the bottom, the screen stays mostly white, except for the upper third has darkend - looks a lot like a thunderstorm cloud.  Ok, so I could include a reduced version photo of the screen as the line scans down the display.

I have single stepped through the TFT_5_Write_Data and the TFT_5_Write_Command functions and verified the signals to the controller board - on the controller board.

I have included the code below.

Any suggestions?
Kind regards,
David

void TFT_5_Write_Data (unsigned char data1)  //no joy with delays
{
   gpio_set_gpio_pin(LCD_RS);
   delay_us(100);
   AVR32_GPIO.port[1].ovr = data1;
   delay_us(100);
   gpio_clr_gpio_pin(LCD_nWR);
   delay_us(100);
   gpio_set_gpio_pin(LCD_nWR);
   delay_us(100);
}

void TFT_5_Write_Command (unsigned char command)
{
   int x;
   
   AVR32_GPIO.port[1].ovr = command;
   delay_us(100);
   gpio_clr_gpio_pin(LCD_RS);
   delay_us(100);
   gpio_clr_gpio_pin(LCD_nWR);
   delay_us(100);
   gpio_set_gpio_pin(LCD_nWR);
   delay_us(100);
}

void TFT_5_WindowSet(int s_x, int e_x, int s_y, int e_y)
{
   int s_x_c;  //Start_X_Corrected
   s_x_c = e_x - s_x;
   TFT_5_Write_Command(0x2a);      //set page address
   TFT_5_Write_Data((s_x)>>8);      //set start page address = 0
   TFT_5_Write_Data(s_x);
   TFT_5_Write_Data((e_x)>>8);      //set end page address 639
   TFT_5_Write_Data((e_x));
   TFT_5_Write_Command(0x2b);      //set column address
   TFT_5_Write_Data((s_y)>>8);      //set start column address = 0
   TFT_5_Write_Data(s_y);
   TFT_5_Write_Data((e_y)>>8);      //set end column address = 459
   TFT_5_Write_Data((e_y));
}
void TFT_5_Init(void)
{
   //new setup as of 06-15-17
   gpio_set_gpio_pin(LCD_DISP);
   gpio_clr_gpio_pin(LCD_nWR);
   gpio_clr_gpio_pin(LCD_nRESET);
   delay_ms(15);
   gpio_set_gpio_pin(LCD_nRESET);
   delay_ms(100);
   TFT_5_Write_Command(0x01);     //Software Reset
   delay_ms(100);
   TFT_5_Write_Command(0x01);     //Software Reset
   delay_ms(100);

   TFT_5_Write_Command(0xe0);    //START PLL
   TFT_5_Write_Data(0x01);
   TFT_5_Write_Command(0xe0);    //LOCK PLL
   TFT_5_Write_Data(0x03);
   TFT_5_Write_Command(0xb0);      //SET LCD MODE (7 parameters)
   TFT_5_Write_Data(0x08);         //18-bit, TFT FRC enable, dithering off
   TFT_5_Write_Data(0x80);         //LCD panel mode
   TFT_5_Write_Data(0x03);         //SET horizontal size=800-1 HightByte
   TFT_5_Write_Data(0x1f);          //SET horizontal size=800-1 LowByte
   TFT_5_Write_Data(0x01);         //SET vertical size=480-1 HightByte
   TFT_5_Write_Data(0xdf);         //SET vertical size=480-1 LowByte
   TFT_5_Write_Data(0x00);         //SET even/odd line RGB seq.=RGB
   TFT_5_Write_Command(0xf0);      //SET pixel data I/F format=8bit
   TFT_5_Write_Data(0x00);   
   TFT_5_Write_Command(0x36);   //SET address mode=flip vertical
   TFT_5_Write_Data(0x09);
   TFT_5_Write_Command(0x3a);   // SET R G B format = 6 6 6
   TFT_5_Write_Data(0x60);
   TFT_5_Write_Command(0xe2);         //SET PCLK freq=9.5MHz  ; pixel clock frequency
   TFT_5_Write_Data(0x1d);
   TFT_5_Write_Data(0x02);
   TFT_5_Write_Data(0x54);
   TFT_5_Write_Command(0xe6);         //SET PCLK freq=9.5MHz  ; pixel clock frequency
   TFT_5_Write_Data(0x02);
   TFT_5_Write_Data(0xff);
   TFT_5_Write_Data(0xff);
   TFT_5_Write_Command(0xb4);      //SET Horizontal Period (8 parameters)
   TFT_5_Write_Data(0x04);         //SET HSYNC Total=1056
   TFT_5_Write_Data(0x20);
   TFT_5_Write_Data(0x00);         //SET HSYNC Start Position=88
   TFT_5_Write_Data(0x58);
   TFT_5_Write_Data(0x80);         //SET HSYNC Pulse Width=128=127pixels+1
   TFT_5_Write_Data(0x00);         //SET HSYNC pulse start position=0
   TFT_5_Write_Data(0x00);
   TFT_5_Write_Data(0x00);         //SET HSYNC pulse subpixel start position
   TFT_5_Write_Command(0xb6);       //SET Vertical Period (7 parameters),
   TFT_5_Write_Data(0x02);         //SET Vsync total=525
   TFT_5_Write_Data(0x0d);
   TFT_5_Write_Data(0x00);         //SET VSYNC Pulse Start Position=32
   TFT_5_Write_Data(0x20);
   TFT_5_Write_Data(0x01);         //SET VSYNC Pulse Width= 0=0lines+1
   TFT_5_Write_Data(0x00);         //SET VSYNC Pulse Start Position=0
   TFT_5_Write_Data(0x00);
   TFT_5_Write_Command(0x2a);      //SET column address
   TFT_5_Write_Data(0x00);         //SET start column address=0
   TFT_5_Write_Data(0x00);
   TFT_5_Write_Data(0x03);         //SET end column address=799
   TFT_5_Write_Data(0x1f);
   TFT_5_Write_Command(0x2b);      //SET page address
   TFT_5_Write_Data(0x00);         //SET start page address=0
   TFT_5_Write_Data(0x00);
   TFT_5_Write_Data(0x01);         //SET end page address=479
   TFT_5_Write_Data(0xdf);
   TFT_5_Write_Command(0x13);      //SET normal mode
   TFT_5_Write_Command(0x38);      //SET normal mode
   TFT_5_Write_Command(0x29);      //SET display on
}   
7
Evaluation Tools / Re: FTDI Eve screen editor
« Last post by CarlW on June 16, 2017, 06:40:40 AM »
I was able to use the EVE screen editor (version 2.3.4).
Followed the suggestion posted above.

The output sketches are almost error free. Just a few arduino specific tweaks.

My problem with the EVE editor was I needed to add the EVE editor program to the "exception" list in my virus software.
Then the program is stable and very useful!

There is a video on youtube that I followed loosely to add a custom font.
https://youtu.be/IWV0Dpby0B4

8
TFTs / Arduino DUE + 4.3" TFT + NHD-4.3-480272MF-20: PIO issues
« Last post by MyNameIsMud on June 16, 2017, 12:17:15 AM »
Hi,

I'm struggling a bit with the setup: I have the NHD-4.3-480272EF-ASXN display plus the NHD-4.3-480272MF-20 controller board. The example code provided for the setup works nicely with Mega but I'm having issues porting it for Arduino DUE.

The main issue is the PIO register manipulation, does anybody have idea how it should be done?

I've tried the following to configure the PIO (from Arduino forum):

  PIOC->PIO_PER = 0x01FF;  // Configure PORTC to PIO controller, pins 33-40
  PIOC->PIO_OER = 0x01FF;  // Enable PORTC to output
  PIOC->PIO_ODSR = something; // Write something on pins 33-40

It does not seem to work. Am I missing something completely?

I verified the wiring setup by digitalwriting the parallel port, and it works but is terribly slow.

BR,
Lassi
9
TFTs / Re: Using RGB666 on NHD-4.3-480272EF-ATXL#-T
« Last post by Paul_B on June 14, 2017, 08:04:48 AM »
You can also wire them to the upper bits, in sequence  ;)
10
TFTs / Re: Using RGB666 on NHD-4.3-480272EF-ATXL#-T
« Last post by Paul_B on June 14, 2017, 08:02:54 AM »
Hello carrasco,

One approach is to wire all the unused bits to a fixed value (typically zero - Ground). Please note that you do not need to utilize a pull-down resistor. 
Pages: [1] 2 3 ... 10