Ir ao conteúdo
  • Cadastre-se

ITM-12864K0-002 Não Consigo fazer funcionar


Posts recomendados

Caros amigos , comprei esse lcd acima , nunca consegui faze-lo funcionar, não sei se por algum descuido queimei , por sinal os 2 que comprei , ou se as bibliotecas que usei com arduino não funcionan com este modelo, por favor , se alguem já escreveu qualquer codigo que tenha funcionado com esse display , tanto com arduino, pic , atmega , ou qualquer microcontrolador, o qual possa me enviar(ou indicar) um library e um codigo que funcione apenas para testar se ainda estão bons ou se jogo no lixo, ficarei muito grato,

P.S.: que realmente alguem tenha testado com esse modelo e funconado,

Grato

 

Link para o comentário
Compartilhar em outros sites

olá Meus caros, antecipadamente obrigado pelas respostas, o circuito é o basico, com a diferença que nesse display ele requer uma tensão de -5V no VEE , para drivar (desculpe pelo drivar) o lcd , quanto ao software usei o exemplo da biblioteca do KS108 do arduino :

 

Transcrita aqui e apenas adaptada para os o arduino Mega2560

 

 

/*
 * GLCDexample
 *
 * Basic test code for the Arduino KS0108 GLCD library.
 * This code exercises a range of graphic functions supported
 * by the library and is an example of its use.
 * It also gives an indication of performance, showing the
 *  number of frames drawn per second.  
 */

#include <ks0108.h>
#include "Arial14.h"         // proportional font
#include "SystemFont5x7.h"   // system font
#include "ArduinoIcon.h"     // bitmap 

unsigned long startMillis;
unsigned int loops = 0;
unsigned int iter = 0;

void setup(){
  delay(500);                // allow time for LCD to reset
  GLCD.Init(NON_INVERTED);   // initialise the library, non inverted writes pixels onto a clear screen
  GLCD.ClearScreen();  
  GLCD.DrawBitmap(ArduinoIcon, 32,0, BLACK); //draw the bitmap at the given x,y position
  GLCD.SelectFont(System5x7); // switch to fixed width system font 
  countdown(5); 
  GLCD.ClearScreen();
  introScreen();              // show some intro stuff 
  GLCD.ClearScreen();
}

void introScreen(){
  GLCD.SelectFont(Arial_14); // you can also make your own fonts, see playground for details   
  GLCD.GotoXY(20, 2);
  GLCD.Puts("GLCD  version  ");
  GLCD.PrintNumber(GLCD_VERSION);
  GLCD.DrawRoundRect(16,0,99,18, 5, BLACK);  // rounded rectangle around text area   
  GLCD.SelectFont(System5x7); // switch to fixed width system font 
  showCharacters();
  countdown(5);
}

void showCharacters(){
  byte line = 3; // start on the fourth line 
  for(byte c = 32; c <=127; c++){
     if( (c-32) % 20 == 0)
         GLCD.CursorTo(1,line++);  // CursorTo is used for fixed width system font
     GLCD.PutChar(c);    
  }   
}

void drawSpinner(byte pos, byte x, byte y) {   
  // this draws an object that appears to spin
  switch(pos % 8) {
  case 0 : GLCD.DrawLine( x, y-8, x, y+8, BLACK); break;
  case 1 : GLCD.DrawLine( x+3, y-7, x-3, y+7, BLACK);  break;
  case 2 : GLCD.DrawLine( x+6, y-6, x-6, y+6, BLACK);  break;
  case 3 : GLCD.DrawLine( x+7, y-3, x-7, y+3, BLACK);  break;
  case 4 : GLCD.DrawLine( x+8, y, x-8, y, BLACK);  break;
  case 5 : GLCD.DrawLine( x+7, y+3, x-7, y-3, BLACK);  break;
  case 6 : GLCD.DrawLine( x+6, y+6, x-6, y-6, BLACK);  break; 
  case 7 : GLCD.DrawLine( x+3, y+7, x-3, y-7, BLACK);  break;
  } 
}

void countdown(int count){
    while(count--){  // do countdown  
     GLCD.CursorTo(0,1);   // first column, second row (offset is from 0)
     GLCD.PutChar(count + '0');
     delay(1000);  
  }  
}

void  loop(){   // run over and over again
  iter = 0;
  startMillis = millis();
  while( millis() - startMillis < 1000){ // loop for one second
    GLCD.DrawRect(0, 0, 64, 61, BLACK); // rectangle in left side of screen
    GLCD.DrawRoundRect(68, 0, 58, 61, 5, BLACK);  // rounded rectangle around text area   
    for(int i=0; i < 62; i += 4)
      GLCD.DrawLine(1,1,63,i, BLACK);  // draw lines from upper left down right side of rectangle  
    GLCD.DrawCircle(32,31,30,BLACK);   // draw circle centered in the left side of screen  
    GLCD.FillRect(92,40,16,16, WHITE); // clear previous spinner position  
    drawSpinner(loops++,100,48);       // draw new spinner position
    //GLCD.FillRect(24,txtLINE3,14,14, WHITE);  // clear text area that will be drawn below 
    GLCD.CursorTo(5,5);               // locate curser for printing text
    GLCD.PrintNumber(++iter);         // print current iteration at the current cursor position 
  } 
  // display number of iterations in one second
  GLCD.ClearScreen();               // clear the screen  
  GLCD.CursorTo(14,2);              // positon cursor  
  GLCD.Puts("FPS= ");               // print a text string
  GLCD.PrintNumber(iter);           // print a number 
}

 

#********************************************************************************************************************************************

#------------------------------------------------------------------------------------------------------------------------------------------------------------------

KS108.h : (arquivo da library ks108):

 

/*
  ks0108_Arduino.h - Arduino library support for ks0108 and compatable graphic LCDs
  Copyright (c)2008 Michael Margolis All right reserved

  This is the configuration file for mapping Arduino (ATmega168) pins to the ks0108 Graphics LCD library

*/

#ifndef    KS0108_CONFIG_H
#define KS0108_CONFIG_H

/*********************************************************/
/*  Configuration for assigning LCD bits to Arduino Pins */
/*********************************************************/
/* Arduino pins used for Commands - these must be within the range of 30-37
 */

#define CSEL1                33        // CS1 Bit   // swap pin assignments with CSEL2 if left/right image is reversed
#define CSEL2                34        // CS2 Bit
#define R_W                    35        // R/W Bit
#define D_I                    36        // D/I Bit 
#define EN                    37        // EN Bit

#define LCD_CMD_PORT        PORTC        // Command Output Register for pins 30-37

/* This version uses pins 22-29 for LCD Data */

/*******************************************************/
/*     end of Arduino configuration                    */
/*******************************************************/


// these macros  map pins to ports using the defines above    
// the following should not be changed unless you really know what your doing 
#define LCD_DATA_LOW_NBL   A   // port for low nibble:  A=pins 22-25  
#define LCD_DATA_HIGH_NBL  A   // port for high nibble: A=pins 26-29 

// macros to fast write data to pins 30 - 37
#define fastWriteHigh(_pin) (PORTC |= 1   << ((7-(_pin -30)) & 0x07)) 
#define fastWriteLow(_pin)  (PORTC &= ~(1 << ((7-(_pin -30)) & 0x07)))


#endif
 

na montagem do hardware não houve erro, pois usei um outro display de outro fabricante de 128x64 e funcionou corretamente, não sei se é incompatibilidade da biblioteca KS 108 ou se está queimado mesmo, não achei na internet ninguém que tivesse usado este modelo de display, apesar de ter sido amplamente vendido onde comprei na DABI da sta efigenia e até mesmo no mercado livre , pelo baixo preço da época


 

Link para o comentário
Compartilhar em outros sites

  • Membro VIP

Nem o back light acende?

Verifique se o -5 tem -5 mesmo. Tenha certeza que ele usa KS 108 como controlador. Meio que tenho um programinha osciloscópio que fiz pro ks há alguns anos mas é totalmente em C portanto é meio que 'importável' pra plataforma arduina. só me deu vontade falar mas não devo compartilhar.

 

Desmonte com cuidado desdobrando as orelhinhas metálicas,...

erm12864-2__bottom_view_3.jpg

limpe a borrachinha condutiva, limpe os contatos com borracha, remonte, cruze os dedos

Link para o comentário
Compartilhar em outros sites

Crie uma conta ou entre para comentar

Você precisa ser um usuário para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar agora

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...

Ebook grátis: Aprenda a ler resistores e capacitores!

EBOOK GRÁTIS!

CLIQUE AQUI E BAIXE AGORA MESMO!