Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Sparkfun Shift Register Breakout - 74HC595


Best Answer stotech, 19 November 2013 - 12:13 AM

serial in         =     pin 11

latch clock     =     pin 10

clock             =     pin13

/OE               =     Any Pin - optional

/reset            =     Any Pin - optional

gnd               =     gnd

vcc                =     +3.3v

 

/OE - set high [+3.3v] to disable outputs or low [gnd] to enable. Can just wire to gnd if you don't mind them being in random state when booting up.

 

/reset - set high to have chip enabled. pull low to reset it and high to enable it again. can just leave wired to 3.3v.

// We got 2 74HC595's in a chainIc74hc595 IcChain = new Ic74hc595(SPI_Devices.SPI1, Pins.GPIO_PIN_D10, 2);// Led loop back and forwardwhile (true){    for (int Counter = 0; Counter < IcChain.Pins.Length; ++Counter)    {        IcChain.Pins[Counter].Write(true);        Thread.Sleep(50);        IcChain.Pins[Counter].Write(false);    }    for (int Counter = IcChain.Pins.Length - 1; Counter > 0; --Counter)    {        IcChain.Pins[Counter].Write(true);        Thread.Sleep(50);        IcChain.Pins[Counter].Write(false);    }}

if you've hooked up the reset or OE pins you need to pull them high or low first depending on the pin. Insert something like this at line 3.

reset_pin.Write(true);OE_pin.Write(false);

Hope this helps. The code is only for 2 but I'm sure you'll figure out the rest. After wiring the first 1 on the left side you just chain em up like this.

 

Grant

Go to the full post


  • Please log in to reply
7 replies to this topic

#1 cce1911

cce1911

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • LocationGeorgia, USA

Posted 17 November 2013 - 08:45 PM

Can someone point me to an example of using this breakout board with the Netduino?

https://www.sparkfun.../products/10680

 

I would like to use the .Net Microframework Toolbox, but it's not obvious to me how to wire it up.

 

 



#2 stotech

stotech

    Advanced Member

  • Members
  • PipPipPip
  • 143 posts
  • LocationAustralia

Posted 19 November 2013 - 12:13 AM   Best Answer

serial in         =     pin 11

latch clock     =     pin 10

clock             =     pin13

/OE               =     Any Pin - optional

/reset            =     Any Pin - optional

gnd               =     gnd

vcc                =     +3.3v

 

/OE - set high [+3.3v] to disable outputs or low [gnd] to enable. Can just wire to gnd if you don't mind them being in random state when booting up.

 

/reset - set high to have chip enabled. pull low to reset it and high to enable it again. can just leave wired to 3.3v.

// We got 2 74HC595's in a chainIc74hc595 IcChain = new Ic74hc595(SPI_Devices.SPI1, Pins.GPIO_PIN_D10, 2);// Led loop back and forwardwhile (true){    for (int Counter = 0; Counter < IcChain.Pins.Length; ++Counter)    {        IcChain.Pins[Counter].Write(true);        Thread.Sleep(50);        IcChain.Pins[Counter].Write(false);    }    for (int Counter = IcChain.Pins.Length - 1; Counter > 0; --Counter)    {        IcChain.Pins[Counter].Write(true);        Thread.Sleep(50);        IcChain.Pins[Counter].Write(false);    }}

if you've hooked up the reset or OE pins you need to pull them high or low first depending on the pin. Insert something like this at line 3.

reset_pin.Write(true);OE_pin.Write(false);

Hope this helps. The code is only for 2 but I'm sure you'll figure out the rest. After wiring the first 1 on the left side you just chain em up like this.

 

Grant



#3 cce1911

cce1911

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • LocationGeorgia, USA

Posted 19 November 2013 - 02:38 AM

Thanks Grant, I'll check this out when I get back from my out-of-town trip!



#4 cce1911

cce1911

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • LocationGeorgia, USA

Posted 20 November 2013 - 02:48 PM

Grant,

Ok, I have wired SER_IN to pin 11

L_CLOCK to pin 10

/OE to gnd

/reset to Vcc

 

But there is one more pin on the breakout board, (CLOCK) that I'm not sure what to do with. Please see my wiring diagram. I would like to control each LED seperately.

 

 

Attached Files



#5 stotech

stotech

    Advanced Member

  • Members
  • PipPipPip
  • 143 posts
  • LocationAustralia

Posted 20 November 2013 - 09:32 PM

Whoop's.

 

That would be the SPI pin, Pin 13.

 

Sorry mate. Must have been late or something.

 

Grant



#6 cce1911

cce1911

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • LocationGeorgia, USA

Posted 20 November 2013 - 10:30 PM

Thanks for the reply Grant. Yes, I figured this out myself after you pointed me in the right direction.



#7 stotech

stotech

    Advanced Member

  • Members
  • PipPipPip
  • 143 posts
  • LocationAustralia

Posted 20 November 2013 - 10:34 PM

Hope you've got it working all right. It took me a day to figure out how to use the library when I started playing with these things.



#8 cce1911

cce1911

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • LocationGeorgia, USA

Posted 20 November 2013 - 10:40 PM

When I finally took the time to figure out how the breakout board was wired to the IC, it became more obvious how to wire it up. Thanks for all your help!

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.