Originally posted by Atul Asthana
View Post
Currently I write all my code in C++ because modularizing everything in objects makes it more readable and easier to maintain. You have to be careful not to overuse C++ features because it can rapidly expand memory usage. I also use RTOS because a metal detector is fundamentally a real-time embedded system. With RTOS, you can further modularize tasks; typically I run only two tasks: a UI task and a DSP task. If you write your own task manager, you have to manually juggle everything going on and that gets harder as you add more complexity, like a display, a keypad, audio, wireless, etc. RTOS makes all this much simpler, which is why I brought it up earlier.
I suggest you define everything you want the software to do. Split it in to DSP and UI functions. Ferinstance, how will you read the ADC and what will you do with the data, and how often? What signals will you need and how will you create them? How much RAM will be needed? On the UI side, will you have pots and/or a keypad? Display? How often do you want to update the audio, and how will it be generated? All this & more.


Leave a comment: