I’m nearly brand new to micro controller programming, though I’ve done work with some embedded systems, and a bunch of database and front end development. I heard something about the .net Micro framework on a http://www.dotnetrocks.com episode where they were reviewing previous episodes. That got me on Google and a Scott Hanselman blog entry, and eventually to the Fez Panda, which I think I got the last one at the low entry price.
PWM has always been something I have wanted to play with. I have a pile of LED’s laying around from a previous project so when I received my new Panda I promptly started up a project with LED’s. (I’ve documented that project here: http://www.microframeworkprojects.com/index.php?title=PWM_LED_with_Threads) So then I thought, what next. There has got to be something I can do with this thing that is more useful than lighting leds with PWM.
…I have it. I’ll lay out what I am working with, what I want to do , and see if this sound possible as well as get input on the design.
From 1000 feet, I have a car, and I have a piggy back custom (www.moates.net) microcontroller that sits on the engine control computer providing custom engine control, and complete logging of engine computer data. Currently to log data from this microcontroller, I have to connect a laptop with a USB cable and use some software that sends a request to the microcontroller, which then starts sending back “live” data.
Thus my goal for this new Fez Panda project is to take the place of the PC Software, PC, and USB cable and talk directly to the control microcontroller via TTL or RS-232 to send data requests and then receive data. Then write the received data to an SD card where it can be later reviewed. And as a bonus, I would like to read a couple sensors (1-5vdc, or 4-20ma) and have software that processes those signals and based on some rules drives a relay.
And the eventual goal would be to have this black box, that can log the data, monitor some sensors, and interpret the data logged + sensor data to display information in numerical or graphs on a touch screen!
Before I get to far into the first phase of this. I need to consider some architecture issues in creating software like this. To start with, is there any reason to think that the .net Micro Framework, or the usBiz chip set simply can’t do this?
I can connect to a TTL interface on the micro-controller. It is a 5v, serial TTL interface and must be driven at 921.6baud.
My thought was that I would be setting up multiple threads. One thread handling the TTL work. One thread for the SD card work and then the main thread to rule them all. Do I need to consider lower level access for the TTL work?
Any ideas, opinions welcome.