Programming technique for Systems [SOLVED]

Thread Starter

Pushkar1

Joined Apr 5, 2021
407
I have prepared programming technique list for embedded systems

1) Traditional programming
2) State Machine
3) Scheduling
4) Operating System
5) AI & Machine learning.
6) Socket Programming
7) Reserved for other

I have collected a list of some embedded systems from the internet My main objective is that I want to understand each and every technology which technology is suitable for this project.

Anti-lock braking system, Temperature monitoring system, Printer, Digital clock Pacemaker, video game consoles, digital cameras, water level alarm, microwave ovens, washing machines, wireless routers, webcams, fire detector, Aircraft control system, ATMs, self driving car, Home security systems, Card swipe machines, Smart watch, Ultrasound scanners, Car navigation system.

As far as I know the operating system used for ATM and machine learning & AI self driving car.

There are many systems in which the traditional method will be useful and there are some systems in which the traditional method is not useful. For which of these projects operating system machine learning & AI would be suitable?
 
Last edited:

KeithWalker

Joined Jul 10, 2017
2,034
I do not understand your programming technique list. Each of the examples is unique. Each has its own requirements and limitations which will define the best solution.
The logical way to do it is:
1. Define the function of the embedded system.
2. Break down the function into logical tasks.
3. Define the inter-dependency of the tasks (inputs and outputs).
4. Pick a suitable hardware (and software if necessary) platform.
5. Develop each task as a module and test it.
6. Test the inter-reaction between the modules.
7. Test the complete assembly of modules when connected to the rest of the system.

The tools and techniques needed to achieve this will depend on the requirements of the system and the hardware that is chosen.
 
Last edited:

Thread Starter

Pushkar1

Joined Apr 5, 2021
407
I do not understand your programming technique list.

The tools needed to achieve this will depend on the requirements of the system and the hardware that is chosen.
The list of embedded systems that I have shown are real world applications and you must have seen this many times. A one program is written for each system. I am interested in knowing which programming technique would have been used when the program was written for system.

For example there is a temperature monitoring system, I will select the first option traditional programming from my list for it.

For Anti-lock braking system Program can also be written with traditional programming technique but it seems to me that this is not a good option. From the sources given on the internet, I can find that the operating system is a good option for it.

I am just guessing that if you would like to develop program for such a system, which option would you use from my list?
 

JohnInTX

Joined Jun 26, 2012
4,597
I am just guessing that if you would like to develop program for such a system, which option would you use from my list?
Your problem, as I see it, is that you are looking for a simple answer to a complex problem. There is no cookbook or tabbed binder that says 'flip here for ABS'. Broadly speaking, there are 2 main parts to do this kind of work.

1) You must first acquire a broad array of software tools and a deep understanding of what they can do. This means to acquire skills in reducing any problem to its component parts and being able to describe a procedure for solving the problem.
Have a deep knowledge of software techniques, program design and flow, data structures, timing, interrupts, numerical methods, input/output methods, communicaiton methods, concurrent programming techniques etc. Add in a working knowledge of several hardware platforms, PIC, ARM, rPI etc, Know your language. Know your compiler, IDE and how to use them to write and debug your code. Know how to use hardware tools: DMM, oscilloscope, logic analyzer, communication protocol analyzers etc.

2) When you have all of that at your fingertips you can approach the second part - actually applying those many tools to a particular task, ABS, sonar, whatever. To do that, you have to learn something about the science and engineering of the particular task. For sonar, you learn about peizo transducers, wave propagation in a medium, real time issues. For ABS, real time wheel rotation sensing, brake pedal sensing, CAN protocols, vehicle dynamics and the like. When you have learned about the target task, have identified the issues specific to each and have all of those varied software tools in your kit, then you'll know automatically which tools, processor, operating system etc. to use to solve the overall problem.

I don't know of any other way to do it and am pretty sure that looking for a simple 'if A then B' approach to those varied applications will ultimately be futile.
Good luck!
 
Last edited:
I'm not going to pretend to know the differences between all the techniques, but I had to agree it is going to be more of a matter of the underlying hardware than how you want to make it work. At my level of understanding (hobby mostly) I would use a separate micrcontroller to monitor each each wheel, have some state variables to define if the sensor shows movement now, showed movement last time through the loop, if in fact the driver is trying to brake, and whether or not the valve is already being influenced by the program. Interrupts to record timing , reset timers, and activate vavles if needed. Any type of "socket" would be just to pass data between the controllers to keep everything on the same page, and to the upstream ECUs know what is happening.

Someone else on the other hand may have a better option where the ABS timing, cycling, and what not is already handled in hardware and all the program has to do is pick data now and again to send out for other controllers to act on.

While each technique has a place and purpose, to try to define a system based on the program is going to cause more problems than good.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
407
Your problem, as I see it, is that you are looking for a simple answer to a complex problem. There is no cookbook or tabbed binder that says 'flip here for ABS'. Broadly speaking, there are 2 main parts to do this kind of work.

I don't know of any other way to do it and am pretty sure that looking for a simple 'if A then B' approach to those varied applications will ultimately be futile.
Good luck!
May be my question is misunderstood. I didn't ask how do I design hardware or write code for a system. I believe that if you write program for simple or complex systems, you choose one of the options on my list.

1) Traditional programming
2) State Machine
3) Scheduling
4) Operating System
5) AI & Machine learning.
6) Socket Programming
7) Reserved for other

Program can be written in traditional way for simple or complex system but we have to decide which one will be suitable for the system.

If you created simple or complex projects, have you used any method other than the ones listed? I'm sure you wouldn't have done this
 

KeithWalker

Joined Jul 10, 2017
2,034
I have used other methods. Before they became traditional ways of programming, I used visual programming including HP-Vee and Labview. I also developed a mouse operated graphical interface for a system using HP Basic back in the 80s.
The point is that you use whatever is most appropriate and available at the time, considering the requirements and limitations of the desired result. You can't limit your resources to a pre-prepared list because technology is changing so rapidly that you will probably be using an obsolete and inappropriate solution..
 

JohnInTX

Joined Jun 26, 2012
4,597
If you created simple or complex projects, have you used any method other than the ones listed?
I have used other methods. Before they became traditional ways of programming, I used visual programming including HP-Vee and Labview. I also developed a mouse operated graphical interface for a system using HP Basic back in the 80s.
The point is that you use whatever is most appropriate and available at the time, considering the requirements and limitations of the desired result. You can't limit your resources to a pre-prepared list because technology is changing so rapidly that you will probably be using an obsolete and inappropriate solution..
+1
I do not think it is practical to pre-assign a particular method to a given application. I've worked in maybe half of the application areas that @Pushkar1 listed above and have used ALL of the software methods listed and more. Virtually all of my work uses several of the listed techniques for every application. A list of every applicable method that I and others have used over the years would be as long as it would be pointless. I suppose you could generate a matrix of software techniques and methods vs. applications but I think that would be equally useless. As before, the way to know what to do is to develop a skill set that you are very competent in using and apply that to what you have learned about the specific task. When you find that a task needs something that you don't know, then research and learn as needed.

That's really all I can offer.
Good luck!
 

MrChips

Joined Oct 2, 2009
24,612
On any given day I have to tackle many different jobs around the house. I may never know what tools are required to tackle each job. Hence I carry around with me a tool caddy with every imaginable kind of tool.

The bottom line is you need to acquire experience on many different kinds of tasks. Then you will know what is the right tool for the job.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
407
Thank you i agree with your thoughts It seemed to me that the way I am trying to solve the problem was the right way but now I think I was wrong. Obviously you are more experienced person than me and any suggestion you give will be good for me.
 
Top