UAA2022 to drive a 16 segment

Hi guys, I was wondering if anyone here has experience with the UAA2022 LED driver.

I have a few questions;

  1. Will a PWM output on the Arduino work for controlling the brightness via the CO pin?

  2. Can someone please explain the VDR pin? is it comparable with the latchclock or output enable on a HC595?

  3. Regarding code, can I treat this the same as a HC595? Or is there anything i need to consider or do diferently?

I will be using it to run a 16 segment alphanumeric display, and I would like to control brightness using a PWM output via the CO pin if possible.

Here is a copy of the datasheet

Can anyone help? Even just a few snippets of code would be a huge help.

Please have a little patience..

I have no experience with the specific chip, but I took a good look at the datasheet. Indeed, usage of this chip is highly similar to using a HC595 shift register.

  1. Yes you can. Add a cap to ground if you experience flickering
  2. Indeed, it is comparable to the latch pin in on the HC595

Any reason you're not using the something like the TM1637?

Thanks for the reply, sorry if I seemed impatient I was just worried it would get pushed too far back and no one would see it...

I chose the chip because i need to drive a single digit 16 segment display. I was planning to use 2 HC 595s as 2 segments in the display aren’t needed, but I don’t have a lot of room and i would need to add a whole bunch of resistors.

I noticed the UAA2022 when browsing online and it seemed like a good choice as the resistors aren’t necessary, and It has a pin for the brightness control, and can accommodate all 16 segments.

In my schematic I have Data in, VDR, CLK, and CO all connected to digital pins on the Arduino. CO I plan to simply run with PWM.

would it work if I just took some code for a HC595 and assigned the VDR pin to Latch Clock ( the other pins are the same), or am I missing something?

Anyway I have already designed and ordered the PCB for it, and ordered the chip, so I’m kind of committed now

Hi guys, im a bit stuck on thin and would appriciate some help.

I have everything for my project working, i just need a helping hand to iron out the last bug.
Im not 100% sure if its a hardware problem or a software problem but here goes…

I have the UAA2022 wired up to the 16 segment as follows:
A pinout of the 16 segment can be found here

Pin 1 - D2
Pin 2 - M
Pin 3 - N
Pin 4 - D1
Pin 5 - E
Pin 6 - P
Pin 8 - K
Pin 9 - B
Pin 10 - A2
Pin 11 - J
12 - H
13 - A1
14 - G
15 - F
23 - C
24 - L

I am using shiftout, and it seems to be working fine for the UA2022.
Heres the problem… for some reason segment’s B and K are illuminated on the same bit.
Am i doing something wrong, or is there something i’m missing?
The bit that activates K and B together is the last bit in the second byte.

Here is the code:

//Input from X and Y poti's for gear position
int x_axis = A4;
int y_axis = A5;


//Outputs for UAA2022 display driver
int data_output = 7;
int vdr_latch = 10;
int cloc = 8;



//assign a number to R and N for neutral and reverse
const byte N = 0;
const byte R = 7;


// The following tables between //**// and //**// are altered for calibration and personal preference





const unsigned int Up    = 3; // voltage Y Axis between 3rd and neutral gearstick position
const unsigned int Down  = 2; // Vlotage Y Axis between 4th and neutral gearstick position
const unsigned int Left  = 2; // voltage X Axis between 1st and 3rd gearstick position
const unsigned int Right = 3; // Voltage x Axis between 3rd and 5th gearstick position









void setup() {
pinMode(A0, INPUT);
pinMode(A4, INPUT);
pinMode(A5, INPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);

}






void displayGear(int gear){

 if(gear==N)
  digitalWrite(vdr_latch,LOW); //ground vdr_latch and hold low for as long as you are transmitting
  //shiftout only supports one byte, so the 16 bits needed for display driver are split into 2 bytes
  //The second byte is sent first.
    shiftOut(data_output,cloc,LSBFIRST,B10000110);
    shiftOut(data_output,cloc,LSBFIRST,B10000110);
    //return the latch pin high to signal chi0 that it no longer needs data_output to listen for information
    digitalWrite(vdr_latch,HIGH); //pull the vdr_latch clock to save the data

  if(gear==1)
  digitalWrite(vdr_latch,LOW);
 digitalWrite (cloc,HIGH);
    shiftOut(data_output,cloc,MSBFIRST,B01000000);
    shiftOut(data_output,cloc,MSBFIRST,B00000001);
    digitalWrite(vdr_latch,HIGH);

if(gear==2)
  digitalWrite(vdr_latch,LOW); 

    shiftOut(data_output,cloc,MSBFIRST,B10010011);
    shiftOut(data_output,cloc,MSBFIRST,B10010011);
    digitalWrite(vdr_latch,HIGH); 

 if(gear==3)
  digitalWrite(vdr_latch,LOW); 

    shiftOut(data_output,cloc,MSBFIRST,B01010010);
    shiftOut(data_output,cloc,MSBFIRST,B10010011);
    digitalWrite(vdr_latch,HIGH);

 if(gear==4)
  digitalWrite(vdr_latch,LOW);

    shiftOut(data_output,cloc,MSBFIRST,B01000000);
    shiftOut(data_output,cloc,MSBFIRST,B11000001);
    digitalWrite(vdr_latch,HIGH);

 if(gear==5)
  digitalWrite(vdr_latch,LOW);

    shiftOut(data_output,cloc,MSBFIRST,B01010010);
    shiftOut(data_output,cloc,MSBFIRST,B11010010);
    digitalWrite(vdr_latch,HIGH);

 if(gear==R)
  digitalWrite(vdr_latch,LOW); 
    shiftOut(data_output,cloc,MSBFIRST,B00100001);
    shiftOut(data_output,cloc,MSBFIRST,B11010011);
    digitalWrite(vdr_latch,HIGH);   

}



void loop(){



  // read the input from x axis poti.
  int x_input = analogRead(x_axis);
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  float x_position = x_input * (5.0 / 1023.0);
  
  // repeat for y axis
  int y_input = analogRead(y_axis);
  float y_position = y_input * (5.0 / 1023.0);

if (y_position < Up && y_position > Down){
    //Neutral
    displayGear(N);
    }
else if (x_position < Left && y_position > Up){
    //1st gear
    displayGear(1);
    }
else if (x_position < Left && y_position < Down){
   //2nd gear
      displayGear(2);
    }
else if (x_position > Left && x_position < Right && y_position > Up){
   //3rd gear
      displayGear(3);
    }
else if (x_position > Left && x_position < Right && y_position < Down){
   //4th gear
      displayGear(4);
    }
else if (x_position > Right && y_position > Up){
   //5th gear
      displayGear(5);
    }
else if (x_position > Right && y_position < Down){
   //Reverse gear
      displayGear(R);
    }
}

I could really use some pointers :confused:

Common cathode display with sink only driver is not going to work.
Leo..

Display is common annode. The driver is specifically designed to run a 16 segment common annode.

Project works, apart from the problem listed above.

I think the driver is defective, as there is one bit that does nothing and one bit that triggers 2 outputs simutainiously. There was a mishap on the breadboard at one point and i think i may have damaged the IC.

A new driver is on the way, upon arrival i will update the results for all those (very very few) who are interested.

In the meantime, if anyone has any constructive input regarding the code or hardware, im all ears.