A couple of weeks ago, at the TechEd 2007 sessions in Barcelona I was giving with Dave Baker of Microsoft, I promised that I'd be putting up the sample code that we used. Apologies for the delay folks, but they are now here: http://www.robmiles.com/storage/teched-2007/TechEd%20Demos.zip
If you are into the .NET Micro Framework (and if you aren't, you should be) then take a look at their blog. There is some really good stuff on there about hardware interfacing. I'm not just linking to it because it mentions me. Oh no.