Recent Posts

Pages: [1] 2 3 ... 10
Graphic LCDs / Re: NHD-C12864A1Z-FSW-FBW-HTT pixel problem
« Last post by Ted_M on Today at 09:32:00 AM »
This topic was supported through email and was resolved by clearing buffer memory.
Take a look at these shield stacking headers to see if they will help give you more spacing:
Hello!  I have an application where I want to display readings from an RF power amplifier I'm building. Voltage inputs will range from 0-50 millivolts to 0-3 volts.  I purchased a Arduino Mega 2560,an LCD 4.3" captive touch screen, and a 24-bit DAC shield.  I assumed I could stack the DAC between the screen and the Arduino Mega, but that turned out to be physically impossible.  I need the 24 bits to deal with the wide range of input voltages, and differential inputs to handle common mode noise.  How can I make this work?  Once I sort that out my next questions will be to ask if anyone can show me how to display the various amplifier parameters on my screen.
Character LCDs / Re: NHD-C0216CZ-NSW-BBW-3V3 Boost Circuit
« Last post by AmericanMeter on September 14, 2018, 08:34:41 AM »
I am using 1uF caps for both.

1uF 10V Ceramics X5R capacitor.

Character LCDs / Re: NHD-C0216CZ-NSW-BBW-3V3 Boost Circuit
« Last post by Ted_M on September 13, 2018, 04:25:28 PM »
What value are the capacitors connected to pins 8,9, and 10?


Graphic LCDs / NHD-C12864A1Z-FSW-FBW-HTT pixel problem
« Last post by Christophe_ on September 13, 2018, 05:39:12 AM »

I am working with NHD-C12864A1Z-FSW-FBW-HTT (ST7565r) and pic 18F46k20 (I tried at 1 MHz, 8 and 64 MHz) and I have a problem with pixels which are on instead to be off. They appear just after initilization and when I send command - text to the screen.

Please find the code (it's just a test...)
I think is due to noise and I don't know how I can remove it.

I thank you in advance for your help.

Code: [Select]

#include <pic18f46k20.h>
#include "Configuration_Header_File.h"
#include "SPI_Header_File.h"
#include "ST7565_Font.h"
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <xc.h>
#define _XTAL_FREQ 1000000

#define ST7565R_CMD_DISPLAY_ON                     0xAF
#define ST7565R_CMD_DISPLAY_OFF                    0xAE
#define ST7565R_CMD_START_LINE_SET(line)           (0x40 | (line))
#define ST7565R_CMD_PAGE_ADDRESS_SET(page)         (0xB0 | (page))
#define ST7565R_CMD_COLUMN_ADDRESS_SET_MSB(column) (0x10 | (column))
#define ST7565R_CMD_COLUMN_ADDRESS_SET_LSB(column) (0x00 | (column))
#define ST7565R_CMD_ADC_NORMAL                     0xA0
#define ST7565R_CMD_ADC_REVERSE                    0xA1
#define ST7565R_CMD_DISPLAY_NORMAL                 0xA6
#define ST7565R_CMD_DISPLAY_REVERSE                0xA7
#define ST7565R_CMD_DISPLAY_ALL_POINTS_OFF         0xA4
#define ST7565R_CMD_DISPLAY_ALL_POINTS_ON          0xA5
#define ST7565R_CMD_LCD_BIAS_1_DIV_5_DUTY33        0xA1
#define ST7565R_CMD_LCD_BIAS_1_DIV_6_DUTY33        0xA2
#define ST7565R_CMD_NORMAL_SCAN_DIRECTION          0xC0
#define ST7565R_CMD_REVERSE_SCAN_DIRECTION         0xC8
#define ST7565R_CMD_VOLTAGE_RESISTOR_RATIO_0       0x20
#define ST7565R_CMD_VOLTAGE_RESISTOR_RATIO_1       0x21
#define ST7565R_CMD_VOLTAGE_RESISTOR_RATIO_2       0x22
#define ST7565R_CMD_VOLTAGE_RESISTOR_RATIO_3       0x23
#define ST7565R_CMD_VOLTAGE_RESISTOR_RATIO_4       0x24
#define ST7565R_CMD_VOLTAGE_RESISTOR_RATIO_5       0x25
#define ST7565R_CMD_VOLTAGE_RESISTOR_RATIO_6       0x26
#define ST7565R_CMD_VOLTAGE_RESISTOR_RATIO_7       0x27
#define ST7565R_CMD_POWER_CTRL_ALL_ON              0x2F
#define ST7565R_CMD_SLEEP_MODE                     0xAC
#define ST7565R_CMD_NORMAL_MODE                    0xAD
#define ST7565R_CMD_RESET                          0xE2
#define ST7565R_CMD_NOP                            0xE3
#define ST7565R_CMD_ELECTRONIC_VOLUME(volume)      (0x3F & (~volume))
#define ST7565R_CMD_BOOSTER_RATIO_SET              0xF8
#define ST7565R_CMD_BOOSTER_RATIO_2X_3X_4X         0x00
#define ST7565R_CMD_BOOSTER_RATIO_5X               0x01
#define ST7565R_CMD_BOOSTER_RATIO_6X               0x03
#define ST7565R_CMD_STATUS_READ                    0x00
#define ST7565R_CMD_END                            0xEE
#define ST7565R_CMD_READ_MODIFY_WRITE              0xE0

void Init();
void SendCommand(char);
void SendData(char);
void SendString(char *);
void MSdelay(unsigned int);
void st7565_Clear();
void PositionXY(char);
void glcd_set_contrast(uint8_t val);
void st7565r_set_page_address(unsigned char address);
void st7565r_set_column_address(unsigned char address);

#define RES     LATBbits.LATB1  // RS : Commande.  A2
#define DC      LATBbits.LATB2  // R/W : Write. LATB0

void main()
    //OSCCON = 0X72;              /* set internal oscillator frequency, 8 MHz*/
    //used when 8MHz
    //    OSCCON = 0b01100000;
    //    PLLEN = 0;                     // turn off the PLL
    // 1MHz
    OSCCON = 0b00110000;
    PLLEN = 0; 
    TRISD = 0;                  /* set PORT as output port*/
    SPI_Init_Master();          /* initialize SPI master*/
    Init();               /* initialize ST7565R display */
    st7565_Clear();              /* clear ST7565R display */

    PositionXY(0);      /* set X and Y position for printing */
void SendCommand(char cmd)
    DC = 0;         /* Data/Command pin, D/C=1 - Data, D/C = 0 - Command*/
    CS = 0;         /* enable chip */
    SPI_Write(cmd); /* write command to the ST7565R   */
    CS = 1;         /* disable chip */
void SendData(char dat)
    char i;
    DC = 1;         /* Data/Command pin, D/C=1 - Data, D/C = 0 - Command*/
    CS = 0;         /* enable chip */
        SPI_Write(font[(dat) - (0x20)][i]); /* write data to the ST7565R   */
    CS = 1;         /* disable chip */

void SendString(char *data)
    char i;

void glcd_set_contrast(uint8_t val)
/* Can set a 6-bit value (0 to 63)  */

/* Must send this command byte before setting the contrast */

/* Set the contrat value ("electronic volumne register") */
if (val > 63) {
} else {

void PositionXY(char Y)
    //SendCommand(0x80 | X);    /* set X position */
    SendCommand(0x40 | Y);    /* set Y position */ 

void Init()
    /*apply 100 ms reset(low to high) pulse */
    RES = 1;
    RES = 0;                    /* enable reset */
    RES = 1;                    /* disable reset */

    SendCommand(ST7565R_CMD_LCD_BIAS_1_DIV_6_DUTY33); //1/9 bias
    SendCommand(ST7565R_CMD_ADC_NORMAL); //RAM->SEG output = normal (A0)
    SendCommand(ST7565R_CMD_REVERSE_SCAN_DIRECTION); //COM scan direction = normal: C8
    SendCommand(ST7565R_CMD_POWER_CTRL_ALL_ON); //power control set




void st7565_Clear()

    int byteAddress = 0;
    char page = 0b10110000;
    st7565r_set_page_address(page);          // call st7565r_set_page_address(unsigned char address) here !!
    int donebitmapSize = 0;
    while(donebitmapSize < 494)
        for(int column = 0; column < 122; column++)
            SendCommand(0x00) ;
    page = page + 0b00000001;

  void st7565r_set_page_address(unsigned char address)
  void st7565r_set_column_address(unsigned char address)
     address &= 0x7F;   // anded with (01111111)
     SendCommand(ST7565R_CMD_COLUMN_ADDRESS_SET_MSB(address >> 4));
     SendCommand(ST7565R_CMD_COLUMN_ADDRESS_SET_LSB(address & 0x0F));

/*********************************Delay Function********************************/
void MSdelay(unsigned int val)
     unsigned int i,j;
            for(j=0;j<81;j++);      /*This count Provide delay of 1 ms for 8MHz Frequency */

Character LCDs / NHD-C0216CZ-NSW-BBW-3V3 Boost Circuit
« Last post by AmericanMeter on September 12, 2018, 09:45:37 PM »

I have made 40 boards with NHD-C0216CZ-NSW-BBW-3V3.   On about 8 of them the boost circuit is not running for the LCD and therefore nothing is being displayed on the display.   The board is designed for 3.0V operation.   

Voltage rise time is 540uS to go from 0.3V to 2.7V.

Tried setting the Software setting to different settings, but can't get displays to start.  Same software works fine for the other 32 units.

Checked VDD, an GND and they are present on pins.
Display is not in Reset (pin is high).

Any suggestions?
Graphic LCDs / NHD-C12864A1Z-FS(RGB)-FBW-HT1 Stuck Pixels
« Last post by Darby68 on September 10, 2018, 09:04:25 PM »

I am using the NHD-C12864A1Z-FS(RGB)-FBW-HT1 in multiple projects. I have it working good with
with the #include "ST7565.h" library from Adafruit.

My problem is every time I compile my code there are what appears to be "stuck" pixels
just right outside the viewing area. I am sending

  glcd.drawstring(0, 4, "LINE 1"); // LINE 1
  glcd.drawstring(0, 5, "LINE 2"); // LINE 2

As you can see from my attached pic, the pixels are to the left of the X axis when set to "0".
It is happening on multiple screens and multiple board revs. Any help would be appreciated.


New Product Releases / New 10.1" HDMI TFT Modules
« Last post by Bridgette_E on September 10, 2018, 08:54:35 AM »

NEW 10.1" HDMI TFT Modules

HDMI interface displays are now bigger than ever before at Newhaven Display. Our HDMI TFT product line
is expanding to include two new 10.1” size modules. These two new products feature our 10.1” TFT paired
with our custom PCB designed by us here in Elgin, Illinois for HDMI compatibility, among other features.
The two options are differentiated by a Capacitive Touch Screen version, and a version with no touch panel.
Both options come standard with a durable steel mounting bracket featuring server-rack-height threaded
mounting holes. Both of the 10.1” HDMI TFT Modules are 1024x600 pixel resolution and sport MVA technology
for 75° viewing from all angles. The boards on these products also have a Texas Instruments Audio Amplifier
embedded to allow for the use of the audio channel already supported by HDMI. Easily up-scale your display
project thanks to simple, standard HDMI interfacing.

Just like our other HDMI TFT Modules, the process of connecting to the display is extremely easy. There’s no
need to work around any ribbon cables or extra controller boards, just connect a standard HDMI cable directly
to the TFT Module. Setup for the Capacitive Touch Panel version is easy as well; Connect the touch panel via
USB cable and the USB-HID driver recognition will quickly initialize the touch panel for use right away.

The durable steel bracket included with both 10.1” HDMI TFT options provides a secure and stable way to
mount the display within any application. The bracket is server rack-unit height making it an easy fit for
standard server racks. These mounting brackets bring a vibration-resistant and reliable method of installation
already packaged with the 10.1” HDMI TFT Modules.

HDMI compatible displays at Newhaven Display have never been bigger. Now is your chance to scale up your
project with the latest and greatest in easy-to-use HDMI display products.

•   Standard High Definition Multimedia Interface (HDMI)
•   USB-HID Capacitive Touch Panel
•   On-board Texas Instruments Audio Amplifier for Audio Support
•   Durable Steel Mounting Bracket with Threaded Standoffs
•   MVA Viewing Angles (75° all directions)
•   Compatible with PC (Windows/Linus) and SBCs such as RaspberryPi and BeagleBone
•   High Brightness LED Driver with PWM Control
•   1024x600 pixel resolution
•   Engineered and Assembled in Elgin, IL USA
•   RoHS compliant

NHD-10.1-HDMI-A-RSXV  (premium)
NHD-10.1-HDMI-A-RSXV-CTU  (capacitive premium)

See our HDMI TFT Module product line:
OLEDs / NHD-0216AW-SB3 - issue with writing characters to screen
« Last post by kokomojoe on September 09, 2018, 07:29:49 PM »
I am having issues with writing simple characters to the screen.  It appears that half of the character is written where it should be, then the other half is displayed half-way across the display.

My code is derived from the Arduino sketch.  My development environment is MCUExpresso 10.2, I am targeting a Kinetis KE06Z.  I am doing a simple bit bang serial interface. I've checked my output with a logic analyzer and compared it to the data sheet. So I'm confident I'm sending the right data in the order.  I used the initialization sequence from the Arduino sketch.  Things I've tried:
1. write a string character by character - same result
2. write a character then clear the screen. I single stepped through to see if complete letters would be displayed.  They were not. This still showed the problem of printing half on the left side and the other half 8 characters to the left. - same result
3. added 20 millisecond delay between character writes - same result.

I've googled other people's initialization sequence and the one I"m using is the same.  Although I'm sure it is a setting that is out of place.  Here is my init function:
Code: [Select]
void oled_init( void) {
// configure the digital lines to use for SPI function

pinMode( SCLK, OUTPUT);
pinMode( SDIN, INPUT);
pinMode( SCLK, OUTPUT);
pinMode( SDOUT, OUTPUT);
pinMode( CS, OUTPUT);
pinMode( RES, OUTPUT);

digitalWrite( RES, LOW);
digitalWrite( RES, HIGH);

digitalWrite(SCLK, HIGH);
digitalWrite(SDOUT, HIGH);
digitalWrite(CS, HIGH);
oled_command(0x2A);  //function set (extended command set)
oled_command(0x71);  //function selection A, disable internal Vdd regualtor
oled_command(0x28);  //function set (fundamental command set)

oled_command(0x08);  //display off, cursor off, blink off
oled_command(0x2A);  //function set (extended oled_command set)
oled_command(0x79);  //OLED command set enabled

oled_command(0xD5);  //set display clock divide ratio/oscillator frequency
oled_command(0x70);  //set display clock divide ratio/oscillator frequency
oled_command(0x78);  //OLED command set disabled

oled_command(0x09);  //extended function set (4-lines)
oled_command(0x06);  //COM SEG direction

oled_command(0x72);  //function selection B, disable internal Vdd regualtor
oled_data(0x00);     //ROM CGRAM selection

oled_command(0x2A);  //function set (extended command set)
oled_command(0x79);  //OLED command set enabled

oled_command(0xDA);  //set SEG pins hardware configuration
oled_command(0x10);  //set SEG pins ... NOTE: When using NHD-0216AW-XB3 or NHD_0216MW_XB3 change to (0x00)

oled_command(0xDC);  //function selection C
oled_command(0x00);  //function selection C

oled_command(0x81);  //set contrast
oled_command(0x7F);  //set contrast control

oled_command(0xD9);  //set phase length
oled_command(0xF1);  //set phase length

oled_command(0xDB);  //set VCOMH deselect level
oled_command(0x40);  //set VCOMH deselect level

oled_command(0x78);  //OLED command set disabled
oled_command(0x28);  //function set (fundamental command set)
oled_command(0x2a); // added jch

oled_command(0x01);  //clear display
oled_command(0x80);  //set DDRAM address to 0x00

oled_command(0x0C);  //display ON


Pages: [1] 2 3 ... 10