Way of programming for complex Embedded products[SOLVED]

Thread Starter

Pushkar1

Joined Apr 5, 2021
414
I don't have any idea the way of programming for complex product. I think program is written in traditional way for a simple product whereas programmer writes his own kernel or modified existing kernel code for a complex product.

simple embedded products :
Temperature monitoring, message display on LCD, water level alarm, fire detector, room light controllers, password based door locking system, Digital clock .. and many more are

The process of developing such a product is very simple. I will use 8bit MCU for this type of product and I will write program in traditional way. All tasks will be completed in one big loop

Complex embedded products :
wireless routers, webcams, gps navigators, smart touch screen, satellite TV receiver, digital camera.. And many more are the example of complex embedded products in real world.

I think it would be right to choose a 32bit MCU for such a complex product. Like ARM processor because it is faster and memory size is bigger.

I hope the experience person will give me clarity to understand way of programming for complex products
 

BobTPH

Joined Jun 5, 2013
4,046
Learning to program complex applications is what people go to school for four or more years to learn. We cannot teach that in a forum post.

Bob
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
414
We cannot teach that in a forum post.
@BobTPH You're taking my question in a different direction. I haven't asked if anyone can teach me programming. I have explained everything in detail what I understand and what I don't understand . I understand the programming method for simple embedded product. like if i want to make a digital clock i will write all the code inside big loop.

I don't have any idea the way of programming for complex product

(wireless routers, webcams, gps navigators, smart touch screen, satellite TV receiver, digital camer)

All above products are Complex products and In my opinion we should use existing kernel source code or write kernel program for such products. Because if you write program with traditional method, then the system will be slow.

Now here is my direct question do you agree with me
 
Last edited:

BobTPH

Joined Jun 5, 2013
4,046
Okay, you evaluate the problem you have to solve. Use your knowledge and experience first to determine what you know and what you do not know. You ask for clarification from the customer if you don’t understand what is required. You do research if you don’t have all the necessary knowledge. You then use what you already know and what you have learned in the process to make decisions about how you will structure the project, what tools you will use, and which parts you must write yourself. Then you make a high level design. Have it reviewed by colleagues and the customer, make appropriate changes…

I could go on forever, but it would not help you at that this point in your learning. If you continue studying and develop some products, starting simple and growing to more complex, in about 10 years you should have some idea.

Bob
 

Papabravo

Joined Feb 24, 2006
17,291
If you're asking for a method to approach a complex problem, then the simplest one is: "divide and conquer". This process does not yield quick results, but it is reliable.
You divide the complex problem into sub problems and you attack the sub problems in any convenient order. I usually choose the sub problem that I know the least about. Cracking the tough nut at the beginning makes the rest of the problems seem easy by comparison.
 

trebla

Joined Jun 29, 2019
470
I don't have any idea the way of programming for complex product.
Usually, a complex system is built from simple tasks. To make different simple tasks work together takes most effort from sysytem designer. Designer must consider messaging format between tasks, method for resource (time, hardware ports, memory etc) sharing between tasks, power consumption, processing speed etc. Then is possible to choose between different MCU architectures. Even 8-bit MCU can drive small webserver for control and monitoring multiple loads and sensors if predicted traffic is low.
 

Thread Starter

Pushkar1

Joined Apr 5, 2021
414
I could go on forever, but it would not help you at that this point in your learning. If you continue studying and develop some products, starting simple and growing to more complex, in about 10 years you should have some idea.

Bob
I did research before asking question. I have come to the conclusion based on my knowledge and experience that when the complexity of the system increases then we should use operating system/kernel.

If someone asks me,

Do you need an operating system when making a digital clock, my answer is no. Because it is not a complex system

Do you need an operating system when making a fire alarm, my answer is no. Because it is not a complex system

Do you need an operating system when making a WiFi router, my answer is yes. Because it is a complex system

Do you need an operating system when making a air traffic controller, my answer is yes. Because it is a complex system

I wanted someone experienced person to confirm that what I'm thinking is correct.
 

BobTPH

Joined Jun 5, 2013
4,046
The question would be what kind of services do you need. I am currently working on lighting controller that serves a web site and controls an RGB strip. It does not use an operating system. The WIFI and TCP/IP are handled by the WIFI module (ATWINC 1510) and the library provided by Microchip.

Edit: My code runs stand alone on the host processor (PIC24) and polls for http messages, while timer interrupt causes update of the strip.

Bob
 
Last edited:

nsaspook

Joined Aug 27, 2009
8,904
Most of the embedded problems are "Complicated", lots of individual problems with limited interaction between them. They can usually be solved piece by piece with direct cause and effect even if the compute resource requirement is large. Complex problems are different. Most are non-linear, dynamic ,with less defined and distinguishable cause-and-effect pathways. For these types of systems an OS is usually a requirement to handle the complex and changing resource and computing requirements on the fly.
 

Papabravo

Joined Feb 24, 2006
17,291
Not having a historical perspective is damaging to your ability to evaluate things. The tools we had 50 years ago (ca. 1970) seem to be equivalent to knives and stone axes, and yet we managed to create interesting and useful devices that actually did real work and made many activities easier. In 2021 we have a vast array of tools and resources that we did not have back them, but the class of systems that we can now implement is much broader. The decision to use or not to use an OS has both costs and benefits. The difference in memory cost and availability has made it much less costly to contemplate the use of an OS.

In those heady days there was a saying that: "nobody ever got fired for buying IBM". They were a much bigger factor in those days than they are now. Today one might opine that: "nobody will get fired for using FreeRTOS", because the price is right. Money however is not the only cost. Time to market may be the determining factor. A freshout would be in a very poor position to make that call, the decision would belong to one of the grizzled veterans. The freshout must be alert to being bulldozed by the marketing types into taking on a project that has zero chance of successful completion.
 

GetDeviceInfo

Joined Jun 7, 2009
1,920
(wireless routers, webcams, gps navigators, smart touch screen, satellite TV receiver, digital camer)

All above products are Complex products and In my opinion we should use existing kernel source code or write kernel program for such products. Because if you write program with traditional method, then the system will be slow.

Now here is my direct question do you agree with me
Yes. Not because it might be slow, but because it may not be financially viable.
 

nsaspook

Joined Aug 27, 2009
8,904
Nobody paid more dearly than the US Military which was renting IBM 360/20 systems for decades past their useful lifetimes.
https://www.nytimes.com/2019/10/24/us/nuclear-weapons-floppy-disks.html
The report said that the Strategic Automated Command and Control System ran on an IBM Series/1 computer — a piece of hardware that dates to the 1970s — and used eight-inch floppy disks to manage weapons like intercontinental ballistic missiles, nuclear bombers and tanker support aircraft.

The report warned that the Pentagon was one of the several government agencies whose computer systems relied on “outdated software languages and hardware parts that are unsupported,” some of which were “at least 50 years old.”
...
But a “60 Minutes” report from 2014 pointed out a perhaps unexpected upside of relying on such old technology. Because the systems are not connected to the internet, they are exceptionally secure: Hackers can’t break into a floppy disk.
On my final system (not this weapons system) that used eight-inch floppy disks I wrote a set of utilities in FORTRAN to transfer 80 char data from paper cards to the floppy via RS232 port for General Dynamics.
 
Last edited:

Thread Starter

Pushkar1

Joined Apr 5, 2021
414
Operating system is usually needed if communication and/or resource sharing becomes complex
I was searching for situations on the internet in which communication and/or resource sharing becomes complex

I found ANPR in below link
https://platerecognizer.com/anpr-for-india/

Automatic Number Plate Recognition

The critical timing involved in reading the number plate of moving cars, speed measurements, and other parts involved

It's my guess that Operating system can be useful in such a project but not necessary
 
Top