Go Down

Topic: STLED316S problem reading key data (Read 907 times) previous topic - next topic

robotman777

I am using an STLED316S to drive a bunch of leds and read some keys.

The led part works perfectly. I have no trouble configuring the driver and addressing all the led digits/segments, setting birghtness etc.

The issue I am having is with the key scan section. For the purpose of debugging I tied the KEY1 and KEY2 lines high. This should mean (afaik) that the data register for the keyboard should read as if all buttons are being pressed. I should then be able to shift in two bytes of data from the STLED316s that would each equal 0xFF.

Instead I am reading for both registers:  B10000001 

This makes no sense to me.

I am using the Arduino internal pullup when I use the data pin for reading but I have also tried an external input.

Right now I am having trouble isolating whether it is a coding or hardware issue.

I was wondering if anyone has had any experience dealing with this IC?

pixa

Hi inteliljel,

I have just got a problem with Display Part. I only get manage the Digit-Led 0, not Digit1-6, Could you help me?
Which were the commnads for example to turn on Digit2 Segments 5-6??
Many thanks
Best

Force

Hi,
did you only connect the pins to Vdd or also with the resistor to GND? I think without the GND connection there is no current flow to detect for the ST chip so this wont work.
You could do like this with a keydetection that detects the voltage level on the key pins like this chip www.austriamicrosystems.com/AS1115 but on the ST chip I guess you need the resistor to GND to get it working. (Unfortunately the ST datasheet doesnt explain in detail how it works, so it is just a guess)
Additionally be careful for too high capacities on the key lines, this needs time to discharge before detection works.


For the DIgits not working: See page 22 section 8.3.1 of the ST datasheet

Go Up