cancel
Showing results for 
Search instead for 
Did you mean: 

74HC595 8 Bit Shift Register with stm32f4discovery help

martinrobilliard9
Associate II
Posted on December 19, 2011 at 00:33

Hi, I am a complete novice to the stm32f4discovery, I have made a 8x8 RGB led matrix using 4

74HC595 8 Bit Shift Registers with only 3 wires going to my now fried arduino, from the old arduino pins I had the 74HC595 8 Bit Shift Registers connected like this; DS to datapin, ST_CP to latchpin, SH_cp to clockpin, what pins do I use on the stm32f4discovery? Are they pd8 (TX), pd9 (RX), pd10 (CK)? if anyone know please could you tell me I wouldn’t like to fry another board :

Thanks for any help

Marin.

5 REPLIES 5
Posted on December 19, 2011 at 01:20

You'll also need to connect a GND wire for this to work.

Do you plan to drive the pins in GPIO mode?

Would RX be appropriate? These 3 pins sound like outputs (Data, Clock, Latch).

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
martinrobilliard9
Associate II
Posted on December 19, 2011 at 01:39

hi, I had 5v & GND coming from the arduino too,  pins 8 10 11  were connted to the 74HC595 pin 8 was - clock, pins 10 and 11 were pwm from the arduino, just want to use the same outs from the stm32f4discovery but dont know which pins to use, I only ask because this stm32f4discovery is a replacement for my broken arduino and would like to use the rgb led matrix I had built for it.

the LEDs are multiplex'd

cheers 

Martin.

edit to add:

this is the same design I used, the video is not mine and belongs to the owner of it, I'm just using it to show you how I had my old arduino running the LED's

http://www.youtube.com/watch?v=j6nK33QI-So&context=C3adb5b2ADOEgsToPDskIQTPlKNFbxWwC4ySLV2DI-

I'm thinking about getting another arduino but thought I would give the stm32f4 a go, and try out 32bit

Posted on December 19, 2011 at 03:22

I asked if you were planing on using the pins as GPIOs because the USART3 peripheral is probably not going to get the clocking/latching working in the manner you want.

If you don't want to ''bit-bang'' the GPIO's in question, which would work btw, then using one of the SPI peripherals might be a better choice to make the hardware do the donkey work.

You could get the SPI to send four 8-bit bytes, or two 16-bit words, and after each group was sent (via DATA/MOSI + CLOCK) you could latch. This assumes you have the 4 8-bit shift registers daisy-chained end-on-end.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
martinrobilliard9
Associate II
Posted on December 19, 2011 at 17:17

Hi sorry for the delay, yes my plan was to use the GPIO. as the 74HC595 will be doing all the work.

Martin.

Posted on December 19, 2011 at 19:50

Hi sorry for the delay, yes my plan was to use the GPIO. as the 74HC595 will be doing all the work.

Actually the STM32 CPU will be doing a lot of the grinding.

So the you'll need to configure the pins as GPIO outputs, after enabling the clocks on the GPIO bank. You will then have to sequence/drive the pins in the prescribed order to get your serial stream of bits into the scan chain, and then latch them.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..