Rule Sony Car Stereo Display with LC75829

Rule Sony Car Stereo Display with LC75829 © GPL3+

Learn how to control a display driven by an LC75829 General Purpose LCD driver.

  • 1,775 views
  • 0 comments
  • 8 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

About this project

Overview

This project is about a sad Sony CDX-GT450U head unit and a lot of reading.

I got a broken Sony head unit from my brother for teardown. I was curious what kind of driver chip is used in it and if it was "hackable." I hate that word, but I cannot express myself better, and it is also a kind of trend to say hacking :D. So I searched them old interwebs to find an Arduino guide for the driver chip for an easy win, but I could not find anything useful. I found the datasheet for LC75829PE and -PW, but the chip on the PCB did not have PE or PW on it.

Instructions

Here is the link to the datasheet:

http://www.onsemi.com/pub/Collateral/LC75829PE_PW-D.PDF

Dispite not having the PE or PW mark, I went on with the found pdf. I also had to find out the functions of the pins on the 20 pin connector. I found almost all the pins, most important ones are the chip pins. Here is a picture of the front panel:

On the picture the connector numbering is upside down, but clearly visible. The found pins:

  • USB GND
  • USB 5V
  • USB D-
  • USB D+
  • GND
  • Encoder
  • Jack connector
  • Jack connector
  • Jack connector
  • Encoder
  • Encoder
  • I don't know
  • I don't know
  • Infra receiver
  • Chip DI
  • Chip CE
  • Chip CL
  • Chip VDD
  • GND
  • GND

So if you only want to control the display, you only need 5 pins, DI, CE, CL, VDD and GND. Any of the GND pins is okay to use. You can also use the USB connector, the Jack connector, the rotary encoder or the infra reciever. I only used the display so far.

After studying the datasheet and trying a lot of combinations for the settings of the display, I managed to get some gibberish writing on the screen. That was the Eureka moment. I only had to find out how to turn the gibberish trash into something controllable. I had to find out the CCB address (it is in the datasheet), and I found that I need to drive it in 1/4 duty mode.

Code

The first code was not fast enough, so I had to use direct port manipulation.

byte data[321] = {1,0,0,0,0,0,1,0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1, 0,0,0,0, 0,0,0,1,0,0,0,1,0,0,0,0,0,0, 0,0,     1,0,0,0,0,0,1,0, 1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,     1,0,0,0,0,0,1,0, 1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1, 0,0,0,0,0,0,0,0, 0,0,0, 0,0,0, 0,0, 0,0,0, 0,0,0, 1,0,          1,0,0,0,0,0,1,0, 1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1, 0,0,0, 0,0,0, 0,0, 0,0,0, 0,0,0, 1,1};
void PrintData(){
 tick = 1;
 comehere:
 if(data[tick-1] == 0){
   PORTB = PORTB & B11111011; // DATA DOWN
   PORTB = PORTB | B00000001; // CLK UP
 }
 else{
   PORTB = PORTB | B00000100; // DATA UP
   PORTB = PORTB | B00000001; // CLK UP
 }
 delayMicroseconds(1);
 if(tick == 8 || tick == 88 || tick == 168 || tick == 248){
   PORTB = PORTB | B00000010; // CE UP
   delayMicroseconds(1);
 }
 if(tick == 80 || tick == 160 || tick == 240){
   PORTB = PORTB & B11111101; // CE DOWN
   delayMicroseconds(1);
 }
 PORTB = PORTB & B11111110; // CLK DOWN
 if(tick < 320){
   tick++;
   goto comehere;
 }
 PORTB = PORTB & B11111101; // CE DOWN
 delay(10);
}

The data array contains the address, the settings and the displayed data. I used an Arduino Uno clone, with the following pin setup:

// pin8 PB0
// pin9 PB1
// pin10 PB2
#define CLK 8
#define CE 9
#define DATA 10

If you use the same display you can use the code I wrote, otherwise you might have to study the datasheet and use different setting bits. Also you will have to test the segments one by one to find out which bit sets which segment.

Video

Code

LC75829 drive codeC/C++
It is ready to be used with an Uno, but you need to change the ports if you use other controller. The PrintData function is responsible for displaying the data to the screen. This is the place for you if you need to change the ports. With the Print function on this display you can write 12 characters.
// UNO
// pin8 PB0
// pin9 PB1
// pin10 PB2

// MEGA
// pin8 PH5
// pin9 PH6
// pin10 PB4

// 1
#define Aa 43
#define Ab 47
#define Ac 40
#define Ad 36
#define Ae 32
#define Af 35
#define Ag 34
#define Ah 41
#define Ai 38
#define Aj 42
#define Ak 37
#define Am 33
#define An 39
// 2
#define Ba 55
#define Bb 58
#define Bc 56
#define Bd 48
#define Be 44
#define Bf 46
#define Bg 45
#define Bh 57
#define Bi 53
#define Bj 54
#define Bk 52
#define Bm 49
#define Bn 50
// 3
#define Ca 35+60
#define Cb 35+67
#define Cc 35+65
#define Cd 35+57
#define Ce 35+53
#define Cf 35+55
#define Cg 35+54
#define Ch 35+66
#define Ci 35+62
#define Cj 35+63
#define Ck 35+61
#define Cm 35+58
#define Cn 35+59
// 4
#define Da 35+79
#define Db 35+87
#define Dc 35+85
#define Dd 35+77
#define De 35+73
#define Df 35+71
#define Dg 35+74
#define Dh 35+86
#define Di 35+82
#define Dj 35+83
#define Dk 35+81
#define Dm 35+78
#define Dn 35+75
// 5
#define Ea 35+96
#define Eb 35+103
#define Ec 35+101
#define Ed 35+93
#define Ee 35+89
#define Ef 35+91
#define Eg 35+90
#define Eh 35+102
#define Ei 35+98
#define Ej 35+99
#define Ek 35+97
#define Em 35+94
#define En 35+95
// 6
#define Fa 63+112
#define Fb 63+119
#define Fc 63+117
#define Fd 63+109
#define Fe 63+105
#define Ff 63+107
#define Fg 63+106
#define Fh 63+118
#define Fi 63+114
#define Fj 63+115
#define Fk 63+113
#define Fm 63+110
#define Fn 63+111
// 7
#define Ga 63+128
#define Gb 63+136
#define Gc 63+134
#define Gd 63+133
#define Ge 63+122
#define Gf 63+123
#define Gg 63+126
#define Gh 63+135
#define Gi 63+130
#define Gj 63+131
#define Gk 63+129
#define Gm 63+125
#define Gn 63+127
// 8
#define Ha 63+144
#define Hb 63+151
#define Hc 63+149
#define Hd 63+141
#define He 63+137
#define Hf 63+139
#define Hg 63+138
#define Hh 63+150
#define Hi 63+146
#define Hj 63+147
#define Hk 63+145
#define Hm 63+142
#define Hn 63+143
// 9
#define Ia 95+164
#define Ib 95+168
#define Ic 95+161
#define Id 95+157
#define Ie 95+153
#define If 95+156
#define Ig 95+155
#define Ih 95+162
#define Ii 95+159
#define Ij 95+163
#define Ik 95+158
#define Im 95+154
#define In 95+160
// 10
#define Ja 95+176
#define Jb 95+179
#define Jc 95+177
#define Jd 95+165
#define Je 95+166
#define Jf 95+172
#define Jg 95+170
#define Jh 95+178
#define Ji 95+174
#define Jj 95+175
#define Jk 95+173
#define Jm 95+169
#define Jn 95+171
// 11
#define Ka 95+188
#define Kb 95+196
#define Kc 95+194
#define Kd 95+185
#define Ke 95+181
#define Kf 95+183
#define Kg 95+182
#define Kh 95+195
#define Ki 95+190
#define Kj 95+191
#define Kk 95+189
#define Km 95+186
#define Kn 95+187
// 12
#define La 95+204
#define Lb 95+208
#define Lc 95+205
#define Ld 95+193
#define Le 95+197
#define Lf 95+200
#define Lg 95+199
#define Lh 95+206
#define Li 95+202
#define Lj 95+207
#define Lk 95+201
#define Lm 95+198
#define Ln 95+203

int aa[13] = {Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La};
int bb[13] = {Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb};
int cc[13] = {Ac,Bc,Cc,Dc,Ec,Fc,Gc,Hc,Ic,Jc,Kc,Lc};
int dd[13] = {Ad,Bd,Cd,Dd,Ed,Fd,Gd,Hd,Id,Jd,Kd,Ld};
int ee[13] = {Ae,Be,Ce,De,Ee,Fe,Ge,He,Ie,Je,Ke,Le};
int ff[13] = {Af,Bf,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0,0, 1,0,          1,0,0,0,0,0,1,0, 1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1, 0,0,0, 0,0,0, 0,0, 0,0,0, 0,0,0, 1,1};
//                                 1                                17       21         26         31         36                    46         51                                                                   53                61                    71                    81                    91                    101                                                                     105           111                   121                   131                   141                   151                                                                                   153               161                   171                   181                   191                   201                                                                                                                                                                                                 

#define CLK 8
#define CE 9
#define DATA 10

int tick = 0;

void setup() {
  pinMode(CLK, OUTPUT);
  pinMode(CE, OUTPUT);
  pinMode(DATA, OUTPUT);
  digitalWrite(CLK, 0);
  digitalWrite(CE, 0);
  digitalWrite(DATA, 0);
  delay(30);
  ClearDisplay();

}

void loop() {
  ClearDisplay();
  delay(50);
  FillDisplayOne();
  delay(50);
  ClearDisplayOne();
  delay(50);
  Print("ARDUINO     ");
  delay(1000);
}

void PrintData(){
  tick = 1;
  
  comehere:

  if(data[tick-1] == 0){
    PORTB = PORTB & B11111011; // DATA DOWN
    PORTB = PORTB | B00000001; // CLK UP
  }
  else{
    PORTB = PORTB | B00000100; // DATA UP
    PORTB = PORTB | B00000001; // CLK UP
  }
  delayMicroseconds(1);
  if(tick == 8 || tick == 88 || tick == 168 || tick == 248){
    PORTB = PORTB | B00000010; // CE UP
    delayMicroseconds(1);
  }

  if(tick == 80 || tick == 160 || tick == 240){
    PORTB = PORTB & B11111101; // CE DOWN
    delayMicroseconds(1);
  }
  
  PORTB = PORTB & B11111110; // CLK DOWN
  
  if(tick < 320){
    tick++;
    goto comehere;
  }
  
  PORTB = PORTB & B11111101; // CE DOWN
  delay(10);
}

void FillDisplay(){
  for(int j = 24; j <= 59; j++){
    data[j] = 1;
    //PrintData();
  }
  for(int j = 88; j <= 139; j++){
    data[j] = 1;
    //PrintData();
  }
  for(int j = 168; j <= 215; j++){
    data[j] = 1;
    //PrintData();
  }
  for(int j = 248; j <= 303; j++){
    data[j] = 1;
    //PrintData();
  }
  PrintData();
}

void FillDisplayOne(){
  for(int j = 24; j <= 59; j++){
    data[j] = 1;
    PrintData();
  }
  for(int j = 88; j <= 139; j++){
    data[j] = 1;
    PrintData();
  }
  for(int j = 168; j <= 215; j++){
    data[j] = 1;
    PrintData();
  }
  for(int j = 248; j <= 303; j++){
    data[j] = 1;
    PrintData();
  }
  //PrintData();
}

void ClearDisplay(){
  for(int j = 24; j <= 59; j++){
    data[j] = 0;
    //PrintData();
  }
  for(int j = 88; j <= 139; j++){
    data[j] = 0;
    //PrintData();
  }
  for(int j = 168; j <= 215; j++){
    data[j] = 0;
    //PrintData();
  }
  for(int j = 248; j <= 303; j++){
    data[j] = 0;
    //PrintData();
  }
  PrintData();
}

void ClearDisplayOne(){
  for(int j = 24; j <= 59; j++){
    data[j] = 0;
    PrintData();
  }
  for(int j = 88; j <= 139; j++){
    data[j] = 0;
    PrintData();
  }
  for(int j = 168; j <= 215; j++){
    data[j] = 0;
    PrintData();
  }
  for(int j = 248; j <= 303; j++){
    data[j] = 0;
    PrintData();
  }
  //PrintData();
}

void Print(char toprint[13]){ // must be 12 characters
    for(int j = 24; j <= 59; j++){
    data[j] = 0;
  }
  for(int j = 88; j <= 139; j++){
    data[j] = 0;
  }
  for(int j = 168; j <= 215; j++){
    data[j] = 0;
  }
  for(int j = 248; j <= 303; j++){
    data[j] = 0;
  }
  for(int j = 0; j <= 11; j++){
    if(toprint[j] == 'A' || toprint[j] == 'a'){
      AA(j);
      BB(j);
      CC(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == 'B' || toprint[j] == 'b'){
      AA(j);
      BB(j);
      CC(j);
      DD(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == 'C' || toprint[j] == 'c'){
      AA(j);
      DD(j);
      EE(j);
      FF(j);
    }
    if(toprint[j] == 'D' || toprint[j] == 'd'){
      BB(j);
      CC(j);
      DD(j);
      EE(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == 'E' || toprint[j] == 'e'){
      AA(j);
      DD(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == 'F' || toprint[j] == 'f'){
      AA(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == 'G' || toprint[j] == 'g'){
      AA(j);
      CC(j);
      DD(j);
      EE(j);
      FF(j);
      HH(j);
    }
    if(toprint[j] == 'H' || toprint[j] == 'h'){
      BB(j);
      CC(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == 'I' || toprint[j] == 'i'){
      II(j);
    }
    if(toprint[j] == 'J' || toprint[j] == 'j'){
      BB(j);
      CC(j);
      DD(j);
      EE(j);
    }
    if(toprint[j] == 'K' || toprint[j] == 'k'){
      EE(j);
      FF(j);
      GG(j);
      JJ(j);
      KK(j);
    }
    if(toprint[j] == 'L' || toprint[j] == 'l'){
      DD(j);
      EE(j);
      FF(j);
    }
    if(toprint[j] == 'M' || toprint[j] == 'm'){
      BB(j);
      CC(j);
      EE(j);
      FF(j);
      JJ(j);
      NN(j);
    }
    if(toprint[j] == 'N' || toprint[j] == 'n'){
      BB(j);
      CC(j);
      EE(j);
      FF(j);
      KK(j);
      NN(j);
    }
    if(toprint[j] == 'O' || toprint[j] == 'o'){
      AA(j);
      BB(j);
      CC(j);
      DD(j);
      EE(j);
      FF(j);
    }
    if(toprint[j] == 'P' || toprint[j] == 'p'){
      AA(j);
      BB(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == 'Q' || toprint[j] == 'q'){
      AA(j);
      BB(j);
      CC(j);
      DD(j);
      EE(j);
      FF(j);
      KK(j);
    }
    if(toprint[j] == 'R' || toprint[j] == 'r'){
      AA(j);
      BB(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
      KK(j);
    }
    if(toprint[j] == 'S' || toprint[j] == 's'){
      AA(j);
      CC(j);
      DD(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == 'T' || toprint[j] == 't'){
      AA(j);
      II(j);
    }
    if(toprint[j] == 'U' || toprint[j] == 'u'){
      BB(j);
      CC(j);
      DD(j);
      EE(j);
      FF(j);
    }
    if(toprint[j] == 'V' || toprint[j] == 'v'){
      EE(j);
      FF(j);
      JJ(j);
      MM(j);
    }
    if(toprint[j] == 'W' || toprint[j] == 'w'){
      BB(j);
      CC(j);
      EE(j);
      FF(j);
      KK(j);
      MM(j);
    }
    if(toprint[j] == 'X' || toprint[j] == 'x'){
      JJ(j);
      KK(j);
      MM(j);
      NN(j);
    }
    if(toprint[j] == 'Y' || toprint[j] == 'y'){
      BB(j);
      CC(j);
      DD(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == 'Z' || toprint[j] == 'z'){
      AA(j);
      DD(j);
      JJ(j);
      MM(j);
    }
    if(toprint[j] == '0'){
      AA(j);
      BB(j);
      CC(j);
      DD(j);
      EE(j);
      FF(j);
    }
    if(toprint[j] == '1'){
      BB(j);
      CC(j);
    }
    if(toprint[j] == '2'){
      AA(j);
      BB(j);
      DD(j);
      EE(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == '3'){
      AA(j);
      BB(j);
      CC(j);
      DD(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == '4'){
      BB(j);
      CC(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == '5'){
      AA(j);
      CC(j);
      DD(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == '6'){
      AA(j);
      CC(j);
      DD(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == '7'){
      AA(j);
      BB(j);
      CC(j);
    }
    if(toprint[j] == '8'){
      AA(j);
      BB(j);
      CC(j);
      DD(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == '9'){
      AA(j);
      BB(j);
      CC(j);
      DD(j);
      FF(j);
      GG(j);
      HH(j);
    }
    if(toprint[j] == ' '){
    }
    
    /*
    
    if(toprint[j] == ''){
      AA(j);
      BB(j);
      CC(j);
      DD(j);
      EE(j);
      FF(j);
      GG(j);
      HH(j);
      II(j);
      JJ(j);
      KK(j);
      MM(j);
      NN(j);
    }
    
     */
  }
  PrintData();
}

void AA(int x){
  data[aa[x]] = 1;
}

void BB(int x){
  data[bb[x]] = 1;
}

void CC(int x){
  data[cc[x]] = 1;
}

void DD(int x){
  data[dd[x]] = 1;
}

void EE(int x){
  data[ee[x]] = 1;
}

void FF(int x){
  data[ff[x]] = 1;
}

void GG(int x){
  data[gg[x]] = 1;
}

void HH(int x){
  data[hh[x]] = 1;
}

void II(int x){
  data[ii[x]] = 1;
}

void JJ(int x){
  data[jj[x]] = 1;
}

void KK(int x){
  data[kk[x]] = 1;
}

void MM(int x){
  data[mm[x]] = 1;
}

void NN(int x){
  data[nn[x]] = 1;
}

void Setbit(int x){
  data[x] = 1;
}

void Resetbit(int x){
  data[x] = 0;
}

Comments

Similar projects you might like

GPS Location Display With GPS And TFT Display Shields

Project tutorial by Boian Mitov

  • 8,802 views
  • 5 comments
  • 23 respects

Crazy Arduino Hose Display

Project showcase by hwhardsoft

  • 20,376 views
  • 5 comments
  • 68 respects

Turn your RC Car to Bluetooth RC car

Project tutorial by Prajjwal Nag

  • 11,984 views
  • 1 comment
  • 11 respects

Programmable Pocket Power Supply with OLED Display

Project tutorial by Shahariar

  • 6,325 views
  • 6 comments
  • 28 respects

Lightpipe 7-Segment Display

Project tutorial by Brian Lough

  • 5,374 views
  • 4 comments
  • 21 respects
Add projectSign up / Login