cancel
Showing results for 
Search instead for 
Did you mean: 

STLED316S

punmack
Associate II
Posted on April 10, 2013 at 00:55

I would like some clear instructionsthat inform me how to communicate with the STLED316S.

I have the STEVAL-ICB003V board,viewing the communications on a logic analyzer, and attempting toduplicate the setup does not work.

I am connected to the STLED316S with auC, can get only DIG1_LED to illuminate.

It there is someone at ST that knowshow to point to a memory location and write control values, please doshare.

An example that tells how to set theSTB line low while pointing to a memory location + page file would beuseful.

Example, write to STLED316S to setnumber of digits, then set to send series of values to each digit fordisplay.

In addition, I am using 3.3V for theserial communications, I am powering the STLED316S with 5V, andpulling DIN/DOUT up with 3.3V. Is this the proper method?

16 REPLIES 16
Posted on April 10, 2013 at 01:21

Not sure this is the appropriate forum for this question, you might have better luck with the STM8 forum, or contacting your local ST rep or FAE for support on this.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
punmack
Associate II
Posted on April 10, 2013 at 16:17

Thank you Clive,

do the ST applications engineers that are familiar with ST products answer questions?  Or is it up the the end user to figure this stuff out and then help others?

Posted on April 10, 2013 at 16:27

This is a user forum, ST engineering resources are usually requested through traditional channels, and qualified by business opportunity.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
punmack
Associate II
Posted on April 10, 2013 at 16:46

Thanks again Clive, you have been very helpful.

''This is a user forum''  

Then it is up to us as field engineers to make ST products work. See following comments:

''ST engineering resources are usually requested through traditional channels, and qualified by business opportunity.''

I am grateful that ST has provided me what the have.  I have exhausted the resources you pervasively mentioned, and this is a final effort to get a product to market. 

dthedens23
Associate II
Posted on April 10, 2013 at 18:43

Well, you are in trouble.  This is where you should fall back on your engineering training.

The LED part is a 5V part. Luckily I think it will work if I read table 5.1 correctly.  But it is not my job that is on the line.

This looks like a SPI interface without a chip select.  it uses STB to signal the direction of shift register DIN/DOUT.

So send a command.  STB low, send SPI byte, read dummy SPI byte, if a response from device is needed then add,  STB high, send dummy byte, receive response.  Attach Logic Analyser or scope to pins to verify waveforms shown in 9.1, 9.2

pretty straight forward engineering work.

punmack
Associate II
Posted on April 10, 2013 at 19:03

Thanks you for some constructive comments.

I have a logic analyzer connected, I using SPI protocol.  I depend on the datasheet as an engineer.  I did not design the device. 

''So send a command.  STB low, send SPI byte, read dummy SPI byte,''

Can you tell me by reading the datasheet why sending command 0xB0, STB high/low, 0x05, 0x20, 0x1C, 0xB6 -- Sets the values on EVAL board Display U4 (DIG2 pin) seg-c, L, S, S? Note, place break points to see display update.

The most confusing thing about the above series of commands an an engineer that has been trained, it that datasheet page 19 states the MSB8 = Unused.  Thus, one that has experience in application of the scientific method would surmise that replacing the command 0xB0 with 0x30 should obtain the same result?  Well then hypothesis put to test, display is blanked?????????????????????????????????????????????????????????????????

 
punmack
Associate II
Posted on April 10, 2013 at 21:25

punmack
Associate II
Posted on April 10, 2013 at 21:37

I attempted to insert a logic analyzer .png file last post, looks like I failed.

For others that may come to this post, and want to know what little I know:

Lift the pins off of the board for the STLED316S and wire to uC of you choice.

I am using SPI and a data rate the same as 9600 baud.

The following will illuminate all of the 7-segment LED displays with the characters:

DIG2 = segment-c

DIG3= L

DIG4= S

DIG5= L

Here is the sequence of writes to the device:

0xB1 cycle STB high low

0x00

0x20

0x1C

0xB6

0X1C 

Good luck and thanks for the friendly comments from the community!

dthedens23
Associate II
Posted on April 10, 2013 at 22:14

Can't tell since I have no waveforms.

RM0090 figure 272 shows msb to lsb timing for CPHA=1 and CHPA=0

316S section 8.1 shows msb to lsb timing.

show me that SPI is set up correct.

are you sure you want to send command 0xB0 when there is no msb/lsb swapping? 

The figure below shows the “reception�? by STLED316S for command/data write sequence. 

The STB must be low for 1 µs before the first and last clock rise. The minimum time the STB 

must remain low is 9 µs. 

The maximum clock frequency is 1 MHz with a duty cycle of 50%. Data set-up and hold time 

must be 100 ns.