Go Down

Topic: RockWorks - RW1025 (Read 377 times) previous topic - next topic

lhg96

Hello I have custom LCD with RW1025 controller for I2C interface below Image.
https://1drv.ms/u/s!AgpZkEb40j7ahsU5BPZqy6WtnwdwGw

I can't find out any sample code for Arduino.
I tried to build myself but it is too complex manual for datasheet attached file and below links.
http://www.rockworks.com.tw/homepage/dldatasheet/dldatasheet.php?action=datasheet&fn=RW1025_V0.1_160303&dir=./dldatasheet/datasheet/RW1025_V0.1_160303.pdf

I need help.
here is my code doing. Currently, I2C address scanning  is working well.

//===========================================================================
#include <Wire.h>
#define I2C_ADDRESS 0x3E //0b0111110

//============================================================================
void writeCommand(uint8_t command);
void writeData(uint8_t data);
void writeString(uint8_t count, uint8_t *MSG);
void Initialize_CFAH2004AC(void);
void Initialize_CGRAM(void);
//============================================================================
void writeCommand(uint8_t command)
{
  //Assert the CS
  //CLR_CS;

  Wire.beginTransmission(I2C_ADDRESS); 
 
  //Send the command via I2C:
  Wire.write(0x00);
  Wire.write(command);


  Wire.endTransmission();

  //Deassert the CS
  //SET_CS;

  delay(1);
}
//============================================================================
void writeData(uint8_t data)
{
  //Assert the CS
  //CLR_CS;
 
  Wire.beginTransmission(I2C_ADDRESS); 
 
  //Send the data via I2C:
  Wire.write(0xC0);              //Control Byte - Data (non-continued)
  Wire.write(data);
 
  Wire.endTransmission();
 
  //Deassert the CS
  //SET_CS;

  delay(1);
}
//============================================================================
void writeString(uint8_t count,uint8_t *MSG)
{
  for(uint8_t i = 0; i<count;i++)
  {
    writeData(MSG);
  }
}
//============================================================================
void Initialize_CFAH2004AC()
{
  //LCD Init
  delay(50);
  writeCommand(0x38); // Function set
  delay(1);
  writeCommand(0x0C); // Display ON/OFF
  delay(1);
  writeCommand(0x01); // Clear display
  delay(10);
  writeCommand(0x06); // Entry mode set
  delay(1);
}

//============================================================================
void setup( void )
{
  //DDRB |= 0xFF;

  //debug console
  Serial.begin(9600);
  Serial.println(F("setup()"));

  Wire.begin(); // join i2c bus (address optional for master)
 
  //Fire up the I2C LCD
  Serial.println(F("Initialize_CFAH2004AC()"));
  Initialize_CFAH2004AC();
 
}
//============================================================================

void loop(void){
  Serial.println("loop");
  delay(1000);
  writeCommand(0x38); // Function set
 
}
//============================================================================

Koepel

That is a very nice display !
This is the page of the manufacturer for this display: http://www.rockworks.com.tw/homepage/html/RW1025.html

If a I2C scanner can detect it, that is a good start.

Your writeCommand() function sends as first byte a 0x00. That is the command to turn off the display and turn off the bias.

You probably need an example how to use it, because there are many settings.
To see the Application Notes at rockworks.com.tw, you need to login. I think you need (a few) Application Notes because I can not find Arduino code or any code at all how to control this display.

Go Up