101

Re: управление драйвером жк lc75823

можете проанализировать этот код, с ним у меня все прекрасно работает.

#define VFD_in 11  // This is the pin number 7 on Arduino UNO
#define VFD_clk 13 // This is the pin number 8 on Arduino UNO
#define VFD_ce 10 // This is the pin number 9 on Arduino UNO

//*************************************************//
void setup() {
  pinMode(VFD_clk, OUTPUT);
  pinMode(VFD_in, OUTPUT);
  pinMode(VFD_ce, OUTPUT);
 
  pinMode(13, OUTPUT);
  Serial.begin(9600); // only to debug
}
void send_char(unsigned char a)
{
 //
 unsigned char transmit = 15; //define our transmit pin
 unsigned char data = 170; //value to transmit, binary 10101010
 unsigned char mask = 1; //our bitmask
  data=a;
  // the validation of data happen when clk go from LOW to HIGH.
  digitalWrite(VFD_ce, LOW); // When strobe is low, all output is enable. If high, all output will be set to low.
  delayMicroseconds(5);
  digitalWrite(VFD_clk,LOW);// need invert the signal to allow 8 bits is is low only send 7 bits
  delayMicroseconds(5);
  for (mask = 0b00000001; mask>0; mask <<= 1) { //iterate through bit mask
  digitalWrite(VFD_clk,LOW);// need invert the signal to allow 8 bits is is low only send 7 bits
  delayMicroseconds(5);
    if (data & mask){ // if bitwise AND resolves to true
      digitalWrite(VFD_in, HIGH);
      //Serial.print(1);
    }
    else{ //if bitwise and resolves to false
      digitalWrite(VFD_in, LOW);
      //Serial.print(0);
    }
    digitalWrite(VFD_clk,HIGH);// need invert the signal to allow 8 bits is is low only send 7 bits
    delayMicroseconds(5);
    //
    digitalWrite(VFD_ce, HIGH); // When strobe is low, all output is enable. If high, all output will be set to low.
  delayMicroseconds(5);
  }
}
/*********************************************************************/
// I h've created 3 functions to send bit's, one with strobe, other without strobe and one with first byte with strobe followed by remaing bits.
void send_char_without(unsigned char a)
{
 unsigned char transmit = 15; //define our transmit pin
 unsigned char data = 170; //value to transmit, binary 10101010
 unsigned char mask = 1; //our bitmask
  data=a;
  for (mask = 0b00000001; mask>0; mask <<= 1) { //iterate through bit mask
  digitalWrite(VFD_clk, LOW);
  delayMicroseconds(5);
    if (data & mask){ // if bitwise AND resolves to true
      digitalWrite(VFD_in, HIGH);
      //Serial.print(1);
    }
    else{ //if bitwise and resolves to false
      digitalWrite(VFD_in, LOW);
      //Serial.print(0);
    }
    digitalWrite(VFD_clk,HIGH);// need invert the signal to allow 8 bits is is low only send 7 bits
    delayMicroseconds(5);
  }
}
/*********************************************************************/
void send_char_8bit_stb(unsigned char a)
{
 unsigned char transmit = 15; //define our transmit pin
 unsigned char data = 170; //value to transmit, binary 10101010
 unsigned char mask = 1; //our bitmask
 int i = -1;
  data=a;
  for (mask = 0b00000001; mask>0; mask <<= 1) { //iterate through bit mask
   i++;
   digitalWrite(VFD_clk, LOW);
  delayMicroseconds(5);
    if (data & mask){ // if bitwise AND resolves to true
      digitalWrite(VFD_in, HIGH);
      //Serial.print(1);
    }
    else{ //if bitwise and resolves to false
      digitalWrite(VFD_in, LOW);
      //Serial.print(0);
    }
    digitalWrite(VFD_clk,HIGH);// 
    delayMicroseconds(1);
    if (i==7){
    Serial.println(i);
    digitalWrite(VFD_ce, HIGH);
    delayMicroseconds(1);
    }  
  }
}
/*******************************************************************/
void allON_LC75823(){
unsigned char group=0;
//send total of 56 bits (7Bytes), the 4 last 14 bits belongs to controls
//The p0, p1, p2 & p3 at 0, means all pins from s1 to s12 will belongs to segments, other's settings tell will px is a port general purpose!
      for(int i=0; i<3;i++){   // Dx until 164 bits
            group=i;
      digitalWrite(VFD_ce, LOW); //
      delayMicroseconds(1);
      // Position of bit(..76543210)
      send_char_8bit_stb(0B01000001); //(0x41) firts 8 bits is address, every fixed as (0B01000001), see if clk finish LOW or HIGH Very important!
      delayMicroseconds(1);
      // On the 75878 the message have first 16*8 bits more 8 times to performe 128 bits(last byte is control: 0BXXX00000)
          
          send_char_without(0B11111111);  send_char_without(0B11111111); //   1:8     -9:16// 
          send_char_without(0B11111111);  send_char_without(0B11111111); //  17:24    -25:32// 
          send_char_without(0B11111111);  send_char_without(0B11111111); //  33:40    -41:48//
          send_char_without(0B11111111);  send_char_without(0B11111111); //  49:56    -57:64//
          send_char_without(0B11111111);  send_char_without(0B11111111); //  65:72    -73:80//
          send_char_without(0B11111111);  send_char_without(0B11111111); //  81:88    -89:96//
          send_char_without(0B11111111);  send_char_without(0B11111111); //  97:104   -105:112//
          send_char_without(0B11111111);  send_char_without(0B11111111); // 113:120   -121:128// 
          send_char_without(0B11111111);  send_char_without(0B11111111); // 120:136   -137:144// 
          send_char_without(0B11111111);  send_char_without(0B00011111); // 145:152   -153:160//
          
      delayMicroseconds(1);
      digitalWrite(VFD_ce, LOW); // 
      delayMicroseconds(1);
      }
}
/**************************************************************************/
void allOFF_LC75823(){
unsigned char group=0;
//send total of 64 bits, the 4 last bits belongs to set of DR, SC, BU, * D'ont care;
//The p0, p1, p2 & p3 at 0, means all pins from s1 to s12 will belongs to segments, other's settings tell will px is a port general purpose!
      for(int i=0; i<3;i++){   // Dx until 600 bits
            group=i;
      digitalWrite(VFD_ce, LOW); //
      delayMicroseconds(1);
      send_char_8bit_stb(0B01000001); //(0x41) firts 8 bits is address, every fixed as (0B01000001), see if clk finish LOW or HIGH Very important!
      delayMicroseconds(1);
      // On the 75878 the message have first 16*8 bits more 8 times to performe 128 bits(last byte is control: 0BXXX00000)
          
          send_char_without(0B00000000);  send_char_without(0B00000000); //   1:8     -9:16// 
          send_char_without(0B00000000);  send_char_without(0B00000000); //  17:24    -25:32// 
          send_char_without(0B00000000);  send_char_without(0B00000000); //  33:40    -41:48//
          send_char_without(0B00000000);  send_char_without(0B00000000); //  49:56    -57:64//
          send_char_without(0B00000000);  send_char_without(0B00000000); //  65:72    -73:80//
          send_char_without(0B00000000);  send_char_without(0B00000000); //  81:88    -89:96//
          send_char_without(0B00000000);  send_char_without(0B00000000); //  97:104   -105:112//
          send_char_without(0B00000000);  send_char_without(0B00000000); // 113:120   -121:128// 
          send_char_without(0B00000000);  send_char_without(0B00000000); // 120:136   -137:144// 
          send_char_without(0B00000000);  send_char_without(0B00010000); // 145:152   -153:160//
      delayMicroseconds(1);
      digitalWrite(VFD_ce, LOW); // 
      delayMicroseconds(1);
      }
}
/*******************************************************************/

void loop() {
 //
 allOFF_LC75823(); // All off
 delay(1000);
 allON_LC75823(); // All on
 delay(3000);
}

102

Re: управление драйвером жк lc75823

В этом коде данные передаются по 8 бит, с учетом специфики Вашего дисплея не получится управлять цифрами, у Вас один разряд цифры может быть сразу в трех байтах.

Это скетч может только зажигать и гасить все сегменты.

103

Re: управление драйвером жк lc75823

Это понятно, но что делать с вашим скетчем, как заставить его правильно работать

104

Re: управление драйвером жк lc75823

Он работает правильно, можно зажечь любой сегмент, проблема в порядке этих сегментов.
Я же подготовил скетч который каждые 3 секунды по очереди включает сегменты, надо просто открыть монитор порта и посмотреть номер бита и отметить его на рисунке.

105 (2024-03-20 21:09:16 отредактировано vladbuharkin20)

Re: управление драйвером жк lc75823

пока что определил первые 32 сегмента из скетча, в архиве новая схема Данный контент доступен только зарегистрированным пользователям.

106

Re: управление драйвером жк lc75823

теперь нужен код с большим количеством сегментов, и я продолжу дальше определять

107

Re: управление драйвером жк lc75823

Давайте протестируем, должны гореть сегменты 7 и 15

#define CE  9
#define CL  8
#define DI  7

int w;
unsigned long www=1;

void setup() {
  Serial.begin(9600);
  pinMode(CE, OUTPUT);
  pinMode(CL, OUTPUT);
  pinMode(DI, OUTPUT);
  digitalWrite(CE,LOW);
  digitalWrite(CL,LOW);
  delay(200);
  write_byte(0x41, 0b00000010000000000100000000000000, 0b0  ,     0b0000);

}

void loop() {

 /*
  write_byte(0x41, 0b10000000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("1");
  delay(3000);
  write_byte(0x41, 0b01000000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("2");
  delay(3000);
  write_byte(0x41, 0b00100000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("3");
  delay(3000);
  write_byte(0x41, 0b00010000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("4");
  delay(3000);
  write_byte(0x41, 0b00001000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("5");
  delay(3000);
  write_byte(0x41, 0b00000100000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("6");
  delay(3000);
  write_byte(0x41, 0b00000010000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("7");
  delay(3000);
  write_byte(0x41, 0b00000001000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("8");
  delay(3000);
  write_byte(0x41, 0b00000000100000000000000000000000, 0b0  ,     0b0000);
  Serial.println("9");
  delay(3000);
  write_byte(0x41, 0b00000000010000000000000000000000, 0b0  ,     0b0000);
  Serial.println("10");
  delay(3000);
  write_byte(0x41, 0b00000000001000000000000000000000, 0b0  ,     0b0000);
  Serial.println("11");
  delay(3000);
  write_byte(0x41, 0b00000000000100000000000000000000, 0b0  ,     0b0000);
  Serial.println("12");
  delay(3000);
  write_byte(0x41, 0b00000000000010000000000000000000, 0b0  ,     0b0000);
  Serial.println("13");
  delay(3000);
  write_byte(0x41, 0b00000000000001000000000000000000, 0b0  ,     0b0000);
  Serial.println("14");
  delay(3000);
  write_byte(0x41, 0b00000000000000100000000000000000, 0b0  ,     0b0000);
  Serial.println("15");
  delay(3000);
  write_byte(0x41, 0b00000000000000010000000000000000, 0b0  ,     0b0000);
  Serial.println("16");
  delay(3000);
  write_byte(0x41, 0b00000000000000001000000000000000, 0b0  ,     0b0000);
  Serial.println("17");
  delay(3000);
  write_byte(0x41, 0b00000000000000000100000000000000, 0b0  ,     0b0000);
  Serial.println("18");
  delay(3000);
  write_byte(0x41, 0b00000000000000000010000000000000, 0b0  ,     0b0000);
  Serial.println("19");
  delay(3000);
  write_byte(0x41, 0b00000000000000000001000000000000, 0b0  ,     0b0000);
  Serial.println("20");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000100000000000, 0b0  ,     0b0000);
  Serial.println("21");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000010000000000, 0b0  ,     0b0000);
  Serial.println("22");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000001000000000, 0b0  ,     0b0000);
  Serial.println("23");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000100000000, 0b0  ,     0b0000);
  Serial.println("23");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000010000000, 0b0  ,     0b0000);
  Serial.println("25");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000001000000, 0b0  ,     0b0000);
  Serial.println("26");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000100000, 0b0  ,     0b0000);
  Serial.println("27");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000010000, 0b0  ,     0b0000);
  Serial.println("28");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000001000, 0b0  ,     0b0000);
  Serial.println("29");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000000100, 0b0  ,     0b0000);
  Serial.println("30");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000000010, 0b0  ,     0b0000);
  Serial.println("31");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000000001, 0b0  ,     0b0000);
  Serial.println("32");
  delay(3000);
  
  */

}

void write_byte(byte addr, unsigned long b0, unsigned long b1,  byte contr){
  /// addr 8 bit
     digitalWrite(CE,LOW);
   for(int i = 0; i <= 7; i++){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (addr >> i) & 1); 
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(CE,HIGH);

// data 156 bit
  // 1-24 seg
     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 27;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
   
   
     
     
// control data 4 bit     
for(int i = 3; i >= 0; i--){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (contr >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CE,LOW);
     digitalWrite(CL,LOW);
     delay(10);
  }  

108

Re: управление драйвером жк lc75823

ничего не произошло, даже старые сегменты которые горели не потухли

109

Re: управление драйвером жк lc75823

Должно работать

#define CE  9
#define CL  8
#define DI  7

int w;
unsigned long www=1;

void setup() {
  Serial.begin(9600);
  pinMode(CE, OUTPUT);
  pinMode(CL, OUTPUT);
  pinMode(DI, OUTPUT);
  digitalWrite(CE,LOW);
  digitalWrite(CL,LOW);
  delay(200);


}

void loop() {

    write_byte(0x41, 0b00000010000000000100000000000000, 0b0  ,     0b0000);

    delay(1000);

 /*
  write_byte(0x41, 0b10000000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("1");
  delay(3000);
  write_byte(0x41, 0b01000000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("2");
  delay(3000);
  write_byte(0x41, 0b00100000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("3");
  delay(3000);
  write_byte(0x41, 0b00010000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("4");
  delay(3000);
  write_byte(0x41, 0b00001000000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("5");
  delay(3000);
  write_byte(0x41, 0b00000100000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("6");
  delay(3000);
  write_byte(0x41, 0b00000010000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("7");
  delay(3000);
  write_byte(0x41, 0b00000001000000000000000000000000, 0b0  ,     0b0000);
  Serial.println("8");
  delay(3000);
  write_byte(0x41, 0b00000000100000000000000000000000, 0b0  ,     0b0000);
  Serial.println("9");
  delay(3000);
  write_byte(0x41, 0b00000000010000000000000000000000, 0b0  ,     0b0000);
  Serial.println("10");
  delay(3000);
  write_byte(0x41, 0b00000000001000000000000000000000, 0b0  ,     0b0000);
  Serial.println("11");
  delay(3000);
  write_byte(0x41, 0b00000000000100000000000000000000, 0b0  ,     0b0000);
  Serial.println("12");
  delay(3000);
  write_byte(0x41, 0b00000000000010000000000000000000, 0b0  ,     0b0000);
  Serial.println("13");
  delay(3000);
  write_byte(0x41, 0b00000000000001000000000000000000, 0b0  ,     0b0000);
  Serial.println("14");
  delay(3000);
  write_byte(0x41, 0b00000000000000100000000000000000, 0b0  ,     0b0000);
  Serial.println("15");
  delay(3000);
  write_byte(0x41, 0b00000000000000010000000000000000, 0b0  ,     0b0000);
  Serial.println("16");
  delay(3000);
  write_byte(0x41, 0b00000000000000001000000000000000, 0b0  ,     0b0000);
  Serial.println("17");
  delay(3000);
  write_byte(0x41, 0b00000000000000000100000000000000, 0b0  ,     0b0000);
  Serial.println("18");
  delay(3000);
  write_byte(0x41, 0b00000000000000000010000000000000, 0b0  ,     0b0000);
  Serial.println("19");
  delay(3000);
  write_byte(0x41, 0b00000000000000000001000000000000, 0b0  ,     0b0000);
  Serial.println("20");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000100000000000, 0b0  ,     0b0000);
  Serial.println("21");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000010000000000, 0b0  ,     0b0000);
  Serial.println("22");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000001000000000, 0b0  ,     0b0000);
  Serial.println("23");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000100000000, 0b0  ,     0b0000);
  Serial.println("23");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000010000000, 0b0  ,     0b0000);
  Serial.println("25");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000001000000, 0b0  ,     0b0000);
  Serial.println("26");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000100000, 0b0  ,     0b0000);
  Serial.println("27");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000010000, 0b0  ,     0b0000);
  Serial.println("28");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000001000, 0b0  ,     0b0000);
  Serial.println("29");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000000100, 0b0  ,     0b0000);
  Serial.println("30");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000000010, 0b0  ,     0b0000);
  Serial.println("31");
  delay(3000);
  write_byte(0x41, 0b00000000000000000000000000000001, 0b0  ,     0b0000);
  Serial.println("32");
  delay(3000);
  
  */

}

void write_byte(byte addr, unsigned long b0, unsigned long b1,  byte contr){
  /// addr 8 bit
     digitalWrite(CE,LOW);
   for(int i = 0; i <= 7; i++){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (addr >> i) & 1); 
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(CE,HIGH);

// data 156 bit
 
     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b0 >> i) & 1);
    // Serial.print((b0 >> i) & 1,BIN);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b1 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 27;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
   
   
     
     
// control data 4 bit     
for(int i = 3; i >= 0; i--){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (contr >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CE,LOW);
     digitalWrite(CL,LOW);
     delay(10);
  }  

110

Re: управление драйвером жк lc75823

7 и 18 сегменты

111

Re: управление драйвером жк lc75823

я извиняюсь, маленько затупил я забыл сказать что поменял пины подключения на вот эти

#define CE  10
#define CL  13
#define DI  11

а так и первый код работает, но загорелись сегменты под номером:7,18

112

Re: управление драйвером жк lc75823

Да все верно 7 и 18

113

Re: управление драйвером жк lc75823

Вот код для сегментов 33-64

#define CE  9
#define CL  8
#define DI  7

int w;
unsigned long www=1;

void setup() {
  Serial.begin(9600);
  pinMode(CE, OUTPUT);
  pinMode(CL, OUTPUT);
  pinMode(DI, OUTPUT);
  digitalWrite(CE,LOW);
  digitalWrite(CL,LOW);
  delay(200);
  write_byte(0x41, 0b00000010000000000100000000000000, 0b0  ,     0b0000);

}

void loop() {

 
  write_byte(0x41, 0, 0b10000000000000000000000000000000,       0b0000);
  Serial.println("33");
  delay(3000);
  write_byte(0x41, 0, 0b01000000000000000000000000000000,       0b0000);
  Serial.println("34");
  delay(3000);
  write_byte(0x41, 0, 0b00100000000000000000000000000000,       0b0000);
  Serial.println("35");
  delay(3000);
  write_byte(0x41, 0, 0b00010000000000000000000000000000,       0b0000);
  Serial.println("36");
  delay(3000);
  write_byte(0x41, 0, 0b00001000000000000000000000000000,       0b0000);
  Serial.println("37");
  delay(3000);
  write_byte(0x41, 0, 0b00000100000000000000000000000000,       0b0000);
  Serial.println("38");
  delay(3000);
  write_byte(0x41, 0, 0b00000010000000000000000000000000,      0b0000);
  Serial.println("39");
  delay(3000);
  write_byte(0x41, 0, 0b00000001000000000000000000000000,       0b0000);
  Serial.println("40");
  delay(3000);
  write_byte(0x41, 0, 0b00000000100000000000000000000000,       0b0000);
  Serial.println("41");
  delay(3000);
  write_byte(0x41, 0, 0b00000000010000000000000000000000,      0b0000);
  Serial.println("42");
  delay(3000);
  write_byte(0x41, 0, 0b00000000001000000000000000000000,       0b0000);
  Serial.println("43");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000100000000000000000000,       0b0000);
  Serial.println("44");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000010000000000000000000,      0b0000);
  Serial.println("45");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000001000000000000000000,       0b0000);
  Serial.println("46");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000100000000000000000,       0b0000);
  Serial.println("47");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000010000000000000000,       0b0000);
  Serial.println("48");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000001000000000000000,       0b0000);
  Serial.println("49");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000100000000000000,       0b0000);
  Serial.println("50");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000010000000000000,       0b0000);
  Serial.println("51");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000001000000000000,      0b0000);
  Serial.println("52");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000100000000000,      0b0000);
  Serial.println("53");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000010000000000,      0b0000);
  Serial.println("54");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000001000000000,      0b0000);
  Serial.println("55");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000000100000000,      0b0000);
  Serial.println("56");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000000010000000,       0b0000);
  Serial.println("57");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000000001000000,        0b0000);
  Serial.println("58");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000000000100000,        0b0000);
  Serial.println("59");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000000000010000,        0b0000);
  Serial.println("60");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000000000001000,        0b0000);
  Serial.println("61");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000000000000100,        0b0000);
  Serial.println("62");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000000000000010,        0b0000);
  Serial.println("63");
  delay(3000);
  write_byte(0x41, 0, 0b00000000000000000000000000000001,        0b0000);
  Serial.println("64");
  delay(3000);
  
 

}

void write_byte(byte addr, unsigned long b0, unsigned long b1,  byte contr){
  /// addr 8 bit
     digitalWrite(CE,LOW);
   for(int i = 0; i <= 7; i++){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (addr >> i) & 1); 
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(CE,HIGH);

// data 156 bit
  // 1-24 seg
     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b1 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 27;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
   
   
     
     
// control data 4 bit     
for(int i = 3; i >= 0; i--){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (contr >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CE,LOW);
     digitalWrite(CL,LOW);
     delay(10);
  }  

114

Re: управление драйвером жк lc75823

поменяйте пины в скетче на вот эти пожалуйста

#define CE  10
#define CL  13
#define DI  11

115

Re: управление драйвером жк lc75823

хорошо, сейчас буду записывать

116

Re: управление драйвером жк lc75823

сегменты с 33-64 Данный контент доступен только зарегистрированным пользователям.

117

Re: управление драйвером жк lc75823

65-96 bit

#define CE  10
#define CL  13
#define DI  11

int w;
unsigned long www=1;

void setup() {
  Serial.begin(9600);
  pinMode(CE, OUTPUT);
  pinMode(CL, OUTPUT);
  pinMode(DI, OUTPUT);
  digitalWrite(CE,LOW);
  digitalWrite(CL,LOW);
  delay(200);
 // write_byte(0x41, 0b00000010000000000100000000000000, 0b0  ,     0b0000);

}

void loop() {

 
  write_byte(0x41, 0, 0, 0b10000000000000000000000000000000,       0b0000);
  Serial.println("65");
  delay(3000);
  write_byte(0x41, 0, 0, 0b01000000000000000000000000000000,       0b0000);
  Serial.println("66");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00100000000000000000000000000000,       0b0000);
  Serial.println("67");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00010000000000000000000000000000,       0b0000);
  Serial.println("68");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00001000000000000000000000000000,       0b0000);
  Serial.println("69");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000100000000000000000000000000,       0b0000);
  Serial.println("70");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000010000000000000000000000000,      0b0000);
  Serial.println("71");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000001000000000000000000000000,       0b0000);
  Serial.println("72");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000100000000000000000000000,       0b0000);
  Serial.println("73");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000010000000000000000000000,      0b0000);
  Serial.println("74");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000001000000000000000000000,       0b0000);
  Serial.println("75");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000100000000000000000000,       0b0000);
  Serial.println("76");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000010000000000000000000,      0b0000);
  Serial.println("77");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000001000000000000000000,       0b0000);
  Serial.println("78");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000100000000000000000,       0b0000);
  Serial.println("79");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000010000000000000000,       0b0000);
  Serial.println("80");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000001000000000000000,       0b0000);
  Serial.println("81");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000100000000000000,       0b0000);
  Serial.println("82");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000010000000000000,       0b0000);
  Serial.println("83");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000001000000000000,      0b0000);
  Serial.println("84");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000100000000000,      0b0000);
  Serial.println("85");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000010000000000,      0b0000);
  Serial.println("86");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000001000000000,      0b0000);
  Serial.println("87");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000000100000000,      0b0000);
  Serial.println("88");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000000010000000,       0b0000);
  Serial.println("89");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000000001000000,        0b0000);
  Serial.println("90");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000000000100000,        0b0000);
  Serial.println("91");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000000000010000,        0b0000);
  Serial.println("92");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000000000001000,        0b0000);
  Serial.println("93");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000000000000100,        0b0000);
  Serial.println("94");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000000000000010,        0b0000);
  Serial.println("95");
  delay(3000);
  write_byte(0x41, 0, 0, 0b00000000000000000000000000000001,        0b0000);
  Serial.println("96");
  delay(3000);
  
 

}

void write_byte(byte addr, unsigned long b0, unsigned long b1, unsigned long b2,  byte contr){
  /// addr 8 bit
     digitalWrite(CE,LOW);
   for(int i = 0; i <= 7; i++){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (addr >> i) & 1); 
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(CE,HIGH);

// data 156 bit
  // 1-24 seg
     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b1 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b2 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 27;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
   
   
     
     
// control data 4 bit     
for(int i = 3; i >= 0; i--){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (contr >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CE,LOW);
     digitalWrite(CL,LOW);
     delay(10);
  }  

118

Re: управление драйвером жк lc75823

97-128

#define CE  10
#define CL  13
#define DI  11

int w;
unsigned long www=1;

void setup() {
  Serial.begin(9600);
  pinMode(CE, OUTPUT);
  pinMode(CL, OUTPUT);
  pinMode(DI, OUTPUT);
  digitalWrite(CE,LOW);
  digitalWrite(CL,LOW);
  delay(200);
 // write_byte(0x41, 0b00000010000000000100000000000000, 0b0  ,     0b0000);

}

void loop() {

 
  write_byte(0x41, 0, 0, 0, 0b10000000000000000000000000000000,       0b0000);
  Serial.println("97");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b01000000000000000000000000000000,       0b0000);
  Serial.println("98");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00100000000000000000000000000000,       0b0000);
  Serial.println("99");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00010000000000000000000000000000,       0b0000);
  Serial.println("100");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00001000000000000000000000000000,       0b0000);
  Serial.println("101");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000100000000000000000000000000,       0b0000);
  Serial.println("102");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000010000000000000000000000000,      0b0000);
  Serial.println("103");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000001000000000000000000000000,       0b0000);
  Serial.println("104");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000100000000000000000000000,       0b0000);
  Serial.println("105");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000010000000000000000000000,      0b0000);
  Serial.println("106");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000001000000000000000000000,       0b0000);
  Serial.println("107");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000100000000000000000000,       0b0000);
  Serial.println("108");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000010000000000000000000,      0b0000);
  Serial.println("109");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000001000000000000000000,       0b0000);
  Serial.println("110");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000100000000000000000,       0b0000);
  Serial.println("111");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000010000000000000000,       0b0000);
  Serial.println("112");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000001000000000000000,       0b0000);
  Serial.println("113");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000100000000000000,       0b0000);
  Serial.println("114");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000010000000000000,       0b0000);
  Serial.println("115");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000001000000000000,      0b0000);
  Serial.println("116");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000100000000000,      0b0000);
  Serial.println("117");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000010000000000,      0b0000);
  Serial.println("118");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000001000000000,      0b0000);
  Serial.println("119");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000000100000000,      0b0000);
  Serial.println("120");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000000010000000,       0b0000);
  Serial.println("121");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000000001000000,        0b0000);
  Serial.println("122");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000000000100000,        0b0000);
  Serial.println("123");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000000000010000,        0b0000);
  Serial.println("124");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000000000001000,        0b0000);
  Serial.println("125");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000000000000100,        0b0000);
  Serial.println("126");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000000000000010,        0b0000);
  Serial.println("127");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0b00000000000000000000000000000001,        0b0000);
  Serial.println("128");
  delay(3000);
  
 

}

void write_byte(byte addr, unsigned long b0, unsigned long b1, unsigned long b2, unsigned long b3,  byte contr){
  /// addr 8 bit
     digitalWrite(CE,LOW);
   for(int i = 0; i <= 7; i++){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (addr >> i) & 1); 
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(CE,HIGH);

// data 156 bit
  // 1-24 seg
     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b1 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b2 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b3 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 27;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
   
   
     
     
// control data 4 bit     
for(int i = 3; i >= 0; i--){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (contr >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CE,LOW);
     digitalWrite(CL,LOW);
     delay(10);
  }  

119

Re: управление драйвером жк lc75823

129-156

#define CE  10
#define CL  13
#define DI  11

int w;
unsigned long www=1;

void setup() {
  Serial.begin(9600);
  pinMode(CE, OUTPUT);
  pinMode(CL, OUTPUT);
  pinMode(DI, OUTPUT);
  digitalWrite(CE,LOW);
  digitalWrite(CL,LOW);
  delay(200);
 // write_byte(0x41, 0b00000010000000000100000000000000, 0b0  ,     0b0000);

}

void loop() {

 
  write_byte(0x41, 0, 0, 0, 0, 0b10000000000000000000000000000000,       0b0000);
  Serial.println("129");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b01000000000000000000000000000000,       0b0000);
  Serial.println("130");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00100000000000000000000000000000,       0b0000);
  Serial.println("131");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00010000000000000000000000000000,       0b0000);
  Serial.println("132");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00001000000000000000000000000000,       0b0000);
  Serial.println("133");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000100000000000000000000000000,       0b0000);
  Serial.println("134");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000010000000000000000000000000,      0b0000);
  Serial.println("135");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000001000000000000000000000000,       0b0000);
  Serial.println("136");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000100000000000000000000000,       0b0000);
  Serial.println("137");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000010000000000000000000000,      0b0000);
  Serial.println("138");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000001000000000000000000000,       0b0000);
  Serial.println("139");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000100000000000000000000,       0b0000);
  Serial.println("140");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000010000000000000000000,      0b0000);
  Serial.println("141");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000001000000000000000000,       0b0000);
  Serial.println("142");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000100000000000000000,       0b0000);
  Serial.println("143");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000010000000000000000,       0b0000);
  Serial.println("144");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000001000000000000000,       0b0000);
  Serial.println("145");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000100000000000000,       0b0000);
  Serial.println("146");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000010000000000000,       0b0000);
  Serial.println("147");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000001000000000000,      0b0000);
  Serial.println("148");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000000100000000000,      0b0000);
  Serial.println("149");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000000010000000000,      0b0000);
  Serial.println("150");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000000001000000000,      0b0000);
  Serial.println("151");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000000000100000000,      0b0000);
  Serial.println("152");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000000000010000000,       0b0000);
  Serial.println("153");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000000000001000000,        0b0000);
  Serial.println("154");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000000000000100000,        0b0000);
  Serial.println("155");
  delay(3000);
  write_byte(0x41, 0, 0, 0, 0, 0b00000000000000000000000000010000,        0b0000);
  Serial.println("156");
  delay(3000);
  
  
 

}

void write_byte(byte addr, unsigned long b0, unsigned long b1, unsigned long b2, unsigned long b3, unsigned long b4, byte contr){
  /// addr 8 bit
     digitalWrite(CE,LOW);
   for(int i = 0; i <= 7; i++){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (addr >> i) & 1); 
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(CE,HIGH);

// data 156 bit
  // 1-24 seg
     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b1 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b2 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b3 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 27;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b4 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
   
   
     
     
// control data 4 bit     
for(int i = 3; i >= 0; i--){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (contr >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CE,LOW);
     digitalWrite(CL,LOW);
     delay(10);
  }  

120

Re: управление драйвером жк lc75823

Вроде все определил
Данный контент доступен только зарегистрированным пользователям.

121

Re: управление драйвером жк lc75823

Плохо конечно что сегменты цифр идут не по порядку, но что нибудь придумаю

122

Re: управление драйвером жк lc75823

Давайте наконец то выведем цифру 7

#define CE  10
#define CL  13
#define DI  11

int w;
unsigned long www=1;

void setup() {
  Serial.begin(9600);
  pinMode(CE, OUTPUT);
  pinMode(CL, OUTPUT);
  pinMode(DI, OUTPUT);
  digitalWrite(CE,LOW);
  digitalWrite(CL,LOW);
  delay(200);
                 //  1                              32  33                             64
  write_byte(0x41, 0b00000000000000000000000000000010, 0b00000110000000000000000000000000,0b00000000000000000000000000000000,0b00000000000000000000000000000000,0b0,       0b0000);

}

void loop() {

 

  
 

}

void write_byte(byte addr, unsigned long b0, unsigned long b1, unsigned long b2, unsigned long b3, unsigned long b4, byte contr){
  /// addr 8 bit
     digitalWrite(CE,LOW);
   for(int i = 0; i <= 7; i++){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (addr >> i) & 1); 
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(CE,HIGH);

// data 156 bit
  // 1-24 seg
     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b0 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b1 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b2 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 31;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b3 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 

     for(int i = 27;i >= 0; i--){ 
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (b4 >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
    
// control data 4 bit     
for(int i = 3; i >= 0; i--){
     digitalWrite(CL,LOW);delayMicroseconds(10);
     digitalWrite(DI, (contr >> i) & 1);
     digitalWrite(CL,HIGH);delayMicroseconds(10);
     } 
     digitalWrite(CE,LOW);
     digitalWrite(CL,LOW);
     delay(10);
  }  

int segm(int cif){
  unsigned int data_out;
  switch(cif){
    case 0: data_out=0b1100010100011;break;//0
    case 1: data_out=0b0000000010011;break;//1
    case 2: data_out=0b0101010101010;break;//2
    case 3: data_out=0b0001010101011;break;//3 
    case 4: data_out=0b1001000001011;break;//4  
    case 5: data_out=0b0000000000000;break;//5
    case 6: data_out=0b0000000000000;break;//6
    case 7: data_out=0b0000000000000;break;//7
    case 8: data_out=0b0000000000000;break;//8
    case 9: data_out=0b0000000000000;break;//9
    }
    return data_out;
  }  

123

Re: управление драйвером жк lc75823

http://forum.rcl-radio.ru/uploads/images/2024/03/a38c7163e19dfbb4618d9b35da636c3a.jpeg
Успешно)

124

Re: управление драйвером жк lc75823

На сегодня все, буду думать как выводить цифры.

125

Re: управление драйвером жк lc75823

ну что, есть успехи?