Understanding Firmware and automation

In summary: Test and Branch" instruction"Once the "Test" instruction is executed, the program will go to the "Branch" instruction, and depending on the result of the "Test" instruction, the "Loop" will either continue or end. Arduino language will have a similar instruction...It's called a "Test and Branch" instruction"and you'll have to figure out how to direct Mr Arduino's attention to that button.
  • #1
Tone L
73
7
Preface: I've done some reading and have minimal experience with micro controllers and circuit boards. Though it is a simple question, the internet has puzzled me, likely with the jargon I don't fully understand!

You can have an Arduino board or Raspberry PI and send it a program to perform functions like lighting a LED in sequence or turning on a digital display. However, this requires the user to send the circuit board 'instructions' each time by compiling and executing some code, right?

So let's consider you want to perform the similar task above but without sending a program each time.
For example, I have an ICB and it is wired to a button. I power the board and then push the button. This then rotates maybe a small DC motor. Can this be accomplished by storing these instructions in the micro controller? Which I presume is a categorized under 'firmware'?

This is surely a beginners question! Hope others who are curious out there find this post useful.
Cheers.
 
Engineering news on Phys.org
  • #2
Yes.
You have to train your brain to think like a computer program - one tiny step at a time..

Look into the "While..." instruction.
the thought process is "While (button not pushed) do nothing"
when somebody pushes the button the program goes on to the next step.

In old days of Basic i used "While inkey$ ≠ (a particular keyboard key)" .
"inkey$" tells the program to watch the keyboard for input.
That instruction made the program change what it was doing when i'd press that key.

Arduino language will have a similar instruction...
It's called a "Test and Branch" instruction"
and you'll have to figure out how to direct Mr Arduino's attention to that button.https://www.arduino.cc/reference/en/language/structure/control-structure/while/
 
  • #3
Tone L said:
Can this be accomplished by storing these instructions in the micro controller? Which I presume is a categorized under 'firmware'?
Yes. There are special cases when you have to download the code every time you power up the board, but usually it is just stored in a local Flash memory and it will be started automatically after every RESET or power up (if you set it so).
 
  • Like
Likes Tone L
  • #4
As pointed out- An arduino - you can download the code and test it. Install it in some physical application and provide a power supply, the program stay resident and will run.
 
  • Like
Likes Tone L
  • #5
Oh, forgot to mention. Firmware is the software providing low level control of the hardware.

In a PC we use upper level programs that run above the operating system, that operates over the BIOS... the BOIS is the firmware that automatically loads and takes care of the very basic Input and Output, thus the BOIS name = Basic Input/Output System.

You do not have this in a uC - since they are typically a dedicated application device, many if not most systems the Firmware is actually stored on the uC, but additional memory can be added for larger programs ( applications). So typically in a uC the Firmware IS the Application software - this is how an Arduino is set up.

In a Pi this is different -- a Pi is more of a computer system, with Firmware(pre-installed) -> LINUX (typ user installed) -> Application(user written) as the standard config. ( But it is possible for a hobbyist to "hack" their way down to the Firmware level)

Still - once set up a Pi (or a PC if you set it up this way) can "go to work" doing programmed tasks as you describe on power up.

So the relationship of automation and firmware is not set in stone.
 
  • Like
Likes hagopbul and Tone L
  • #6
jim hardy said:
In old days of Basic i used "While inkey$ ≠ (a particular keyboard key)" .
I just looked at my old Borland Trubo Basic (Basic compiler) reference book for the "While" statement. It had examples for using it in "Do Loops". e.g. "Do [While] ... Loop"
It also had the example of "Do [Until] ... Loop", but the book didn't show the "Until" statement. :oldconfused: Go figure.
 
  • Like
Likes hagopbul and jim hardy

1. What is firmware and why is it important?

Firmware is a type of software that is embedded into a hardware device. It is responsible for controlling the device's functions and operations. Firmware is important because it allows hardware devices to function properly and efficiently.

2. How is firmware different from other types of software?

Firmware is different from other types of software because it is permanently stored in a hardware device and cannot be easily modified or updated. It is also specific to a particular hardware device, unlike other software which can be used on multiple devices.

3. What is the role of automation in firmware development?

Automation plays a crucial role in firmware development by streamlining the process and reducing errors. It involves using tools and techniques to automatically test, build, and deploy firmware, making the development process more efficient and reliable.

4. How can firmware updates improve the performance of a device?

Firmware updates can improve the performance of a device by fixing bugs, adding new features, and enhancing the device's overall functionality. They can also address security vulnerabilities and improve compatibility with other devices.

5. What are the potential risks of updating firmware?

There are several potential risks of updating firmware, such as the possibility of the update failing or causing the device to malfunction. It is also possible for the update to introduce new bugs or compatibility issues. It is important to carefully follow instructions and backup important data before updating firmware to minimize these risks.

Similar threads

Replies
8
Views
2K
Replies
4
Views
1K
Replies
2
Views
1K
  • Electrical Engineering
Replies
12
Views
2K
Replies
6
Views
2K
  • Quantum Physics
Replies
16
Views
2K
  • Electrical Engineering
Replies
2
Views
2K
  • Electrical Engineering
Replies
4
Views
2K
  • Computing and Technology
Replies
10
Views
2K
Replies
6
Views
3K
Back
Top