SFI > 250 or bust!

This one has nothing to do with the regular ham radio stuff. But it is the main reason for me to have less time for the hobby. I really would get to know the development board and possibly use it in some ham radio homebrew projects. So be warned that the rest of this post does not feature any ham related moaning.

I started out with a few basic tricks:

  • The classic obligatory blinking LED.
  • Detect if a button has been pushed and light the LED accordingly.
  • Make an interrupt routine for this button in stead of polling it in a loop.
  • Use a potmeter and an ADC input to alter the LED’s blinking frequency.
  • Drive an alphanumeric LCD display.
  • Even play with the LED over the LAN (Internet anyone?)

No pictures since this is not really shocking material not ground breaking engineering.

Along the way I learned that there are many online samples although most of them in C#. No problem, I understand that enough to translate it to VB and if not there’s help on Developerfusion.com. I also learned that there is an active Netduino forum though it seems that there are more askers than answerers. I also learned that specific VB questions often remain unanswered and are a lot less read on the forum than general or C# related items. Again: I can live with that. It’s just that along the way, I got the feeling (just my personal opinion, no evidence or hard facts) that the key people behind the project and on the forum aren’t really keen on documenting or supporting the product in VB. And since VB support was only recently added in the Micro Framework by Microsoft, I got the feeling I’m on my own when it comes to using the Netduino board in Visual Basic. How I came to this conclusion?

For a project at school I want to use an RFID badge reader with the Netduino. I found a company kindly willing to donate an RFID reader and some tags. It communicates with the outside world through a command set over the I²C bus.  The Netduino board has native I²C on board so I was all set to go. You’d think. I spent countless hours trying to get something into / out of the RFID reader but I can’t get it to work. The reader detects the presence of a tag (LED lights up) and the ‘card detected’ output goes high. I use that as an interrupt for the Netduino to read the card in stead of endless polling of the reader. So the reader istelf seems to work.

The problem is that there are many unknowns in the equation. Do I send the right things to the reader? Do I use the I²C class right? Does the I²C bus actually work on my device? Does the current firmware and framework have a bug in the Visual Basic support for I²C? It drives me crazy and I can’t think of any software problem taking me so long to fix or to find a clever workaround. I guess there is no workaround here if I want to use the I²C bus. And so I posted my problems to the Netduino forum in the Visual Basic subdivision. People read the post but I don’t get any answers. I reposted it into the general Netduino department, yet again: no help offered. My postings got 232 and 165 views yet ZERO replies. See why I get that feeling I described above?

Now what? Leave it here? Yeah I wish I could move on. But I really want this project to start and get the show on the road. So I came up with this plan: get a simple PC controlled device that talks I²C and find a simple device to control. That way I would be able to test a few things staying in my comfort zone that is Windows programming with VB.Net. I found a cheap USB-to-I2C thing (here) and thought a simple real time clock would be the slave device.

After studying and some coding and calculating (binary, HEX, BDC – fun fun fun) I was able to talk to the USB device and soon after that I was talking to the RTC over I²C. I could set a date in the clock and read the time and date. I set the clock to my PC time and added 5 years to be sure I was reading from the RTC and not accidentally from the PC. That worked, so I knew the USB-to-I²C device worked and the RTC was OK. Then I ported the code and took it to the Netduino. This board does not have a real time clock so I used my code that does not work on the RFID reader to talk to the RTC. Sure enough: I could read out the RTC over the I²C bus with the Netduino. Which means its hardware is OK and I know how to communicate with the I²C classes in the micro FrameWork, and over USB with the PC. Time to tame the RFID reader once again.

To make a long story short: I can’t communicate with the reader, not with the Netduino and not with the USB-to-I²C device. Which means the RFID-problem boils down to this: either I just don’t know how to handle the reader, or the reader I kindly received was DOA. But at least I can now go back to the company and show them what I got and ask for some support.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.