I’m still learning the FEZ world, and C# as well. This is the most significant bit of work I have done so far on my FEZ Domino, and it’s largely a rework of something similar I have done in the past on an Arduino.
I initially looked at the code posted by ‘bstag’ but couldn’t get it to work, it looks like some parts may have been missed off in the cut&paste.
Anyway, here is my first release of a more complete 74HC595 interface class. It’s fairly well commented so you should be able to figure out what is going on. I plan to add more features in the future, and possibly expand it to include other shift registers (the TLC5940 springs immediately to mind).
** EDIT **
I’ve removed the code as something was completely mucking up the formatting, see below for links to the code.
As I mentioned, I’m still a learned with C#, so I welcome any and all input into the code.
I plan on creating a project within Google Code to maintain this at a future date, once I figure out how to use Google Code
It looks like the board software has mangled some of the documentation xml comments, and therefore possible other bits too. You can download a sample project that includes the interface class and the demo code here:
The community would really benefit from your code but you need to place it on the wiki. Otherwise it will be lost overtime
I looked at the wiki, but it didn’t seem to fit into any of the categories, not even close. What do you suggest?
Good point! Maybe add and do not categorize for now?
By the way, why did you take the digital pin approach instead of using SPI?
OK, I’ll look to add it to the Wiki tonight when I get home.
As to why I did it this way, that’s simple. It’s the way I did it on the Arduino, which I learned from sample code supplied in the learners kit that came with my Arduino board.
I’ll have a look at SPI some time, and maybe see if I can add it to the class.
OK, I’ve put a stub project in place…