Tag: firmware

Quickly Prototype Embedded Projects

Quick prototypingIt’s always challenging for us to manage embedded projects when we have small resources. The key to do it is to choose what to do when and our experience is here to rescue us out of difficult situations. The procedure in this post is for typical microcontroller based projects with little to average complexity. This scheme assumes that you have at least some experience with such projects and you have at least one relevant hardware development kit or a previously designed hardware which has some features common with your new project. It’s not about soldering DIP-only components on veroboard rather its a professional way for relatively experienced designers. Off-course there may be better ways to execute such a project. You can suggest if you like.

  • Designs your hardware: Normally we work on development kits. If you are using a reference design, which normally happens and is a standard practice now a days, try to design around it. In this way you are basically re-using the effort made by the vendor to bring up something working. It will save lots of development time. Adjust the hardware according to your special needs. This may be the schematic change, components packages change, or perhaps one or two extra peripherals addition. When you are done and satisfied with the hardware, send it to the PCB fab. The PCB fab takes its time. (continue reading…)
Share

Writing Better Embedded Firmware

Co-operative multitasking I think this is the most simple, organized and suitable way to write code for real-time embedded systems. This is simple state machine based model which responds well in real-time. In this case I am using PIC32MX340F512L MCU, you can adopt this code for your favorite microcontroller.

First we write a simple main function where other functions will be called:

// main.c file
// add pic32 lib
#include
 
// prototype the functions
void blinky_init(void);
void blinky(void);
void button_init(void);
void button(void);
 
int main (void)
{
	// initialize the apps
	blinky_init();
	button_init();
	// ....
 
	// run the app(s)
	while (1)
	{
		blinky();
		button();
		// ....
	}
}

In above code snippet we have added processor related libraries, declared the prototypes of the functions which we are going to use and then started the main function. In the main function, we have first initialized the peripherals which we are going to use. In this case only two types, an LED and a push button. The main operations of the peripherals are handled in the blinky(); and button(); functions. Now we look at these functions: (continue reading…)

Share

Embedded Systems for Electronics Engineers

Embedded systems is a very interesting field which needs to deal with software as well as hardware at the same time. To write proper software it is necessary to understand the underlying hardware. Also software knowledge is a must to actually perform useful tasks. Often software engineers only write the software for embedded devices which we call firmware. They do it because they are taught and trained to do so. On the other hand, hardware or electronics engineers are more inclined towards the “hardware” which include analog and digital circuit design, PCB design, troubleshooting, hardware installation and support. Writing code is not their primary job as taught in university courses. However, they have a great advantage over software engineers that they understand the hardware architecture better. They know how the processor has to interact with the analog circuitry and how it will affect the overall performance. Often there are things that can be done either through hardware or software. For example an application requires a trigger over a certain voltage input. Now is it feasible to use a fixed voltage comparator in the hardware or to read the analog value and define the threshold in the software? Only a person familiar with the actual analog signal and its behavior can decide what to do. That is why electronic engineers with strong firmware/software skills are preferred.

However, sometimes hardware skills are relatively irrelevant; for instance embedded Linux development. In this case software engineers have clear advantage as the very knowledge of every register and flag bits is not necessary. However, as I learned through my experience, if you are learning embedded Linux for the first time, it does not make you very different from the software guys as even they come up to a newer field except somebody is a Linux guru. An electronics engineer still has great chance to learn Linux during his course of career.

As the time is passing by, more and more products carry intelligence deeply embedded in them. Small, low-cost, power efficient microcontrollers are widely used to make things smarter. Every household product carries a small electronics running a little RTOS or pseudo code carrying that “little intelligence” to make them so. Therefore electronics engineers with strong background of hardware development must also invest some time and effort to learn writing firmware and should master C language as it is de-facto standard in embedded world. I remember when I was at University and used to pay special attention to the my C language course. This was because I liked coding. This effort paid me back in my professional career as I have been coding in C for more than seven years now. All in all, embedded systems is a great career for electronics engineers. However, they need to pay special attention to firmware as well as getting familiar with embedded Linux.

Share

Clever Design Process

In the world of embedded systems designing, there are some main design objectives which are desired by client as well as design house. These are almost universal:

  • The design meets the user requirements
  • The end-product is low-cost
  • Minimum time in development process
  • Minimum development cost

To meet these requirements in current competitive environment, the designer must be smart enough. There are several techniques which effectively reduce time and cost of development while managing to fulfill all user requirements.

  1. Lock the requirements before starting the design: carefully read-out the exact client requirements. It often happens that non-technical managers take the requirements from client and pass on to the designer. When the designer comes up with the final prototype, he comes to know that client was looking for something else, huh! This has happened to me several times. So if management doesn’t mind, try to interact with the client at the very early stage of project to get the exact picture.
  2. Re-use previous designs: Try to reuse what you already have and used in other designs. You better know the pros and cons of your previous designs and try to the best options you have. This may include schematic parts, the components and layout libraries etc.
  3. Use available and tested firmware components: Often firmware libraries are available for every vendor of main MCU that you are going to use. If there are no exclusive requirements otherwise, use the available code. It is tested and trusted.
  4. At least initial design should be on a tested hardware:  This may be a development kit or a PCB of previous design (Keep the royalty thing in mind haan..). Now a days, demo kits are cheap, tailor-able to some extent and have some great features. If you don’t have kit(s), you can also take help from reference design of the vendor. Every vendor has ref-designs of almost all hot topic in industry. Like Zigbee is a hot field today and every vendor like TI, Atmel, Microchip etc. have their demo boards and firmware stacks to download and develop upon.

There may be other things besides mentioned above, what is your experience?

Share

4×3 Keypad Scan

Very simple 4×3 Keypad scanning routine. You can adjust the delays according keypad de-bouncing effect. This routine was tested on PIC18F97J60 MCU and standard telephone receiver keypad.

Download Files:

Share

Embedded Systems and Embedded Systems Developers

Although modern day technologies have now converged practically into embedded systems still there are people among us who still question what an embedded system is?

The field of embedded systems is a unique combination of softwar and hardware where the whole intelligence of the system is confined into the firmware of hardware residing indide hardware itself. Now what is firmware? Firmware is the software or intelligence portion of the systems which resides in the hardware, takes directions from hardware peripherals, processes  information, takes decisions and issues control signals to actuate outputs. The formost effrot in designing embedded systems is to reduce the physical footprint of the system to fit it into the space and weight constrained applications. Another design goal is to keep the cost as low as possible. The advantage of embedding the intelligence into the small hardware is to make efficient and cost effective systems, basically, to make small ordinary things much more smarter than before.

The example of embedded systems are everywhere which we use on daily bases like cell phones, the control in washing machine, tv and tv remote etc. One distinctive difference between general purpose computers and embedded computers is that they are application specific. Also the embedded systens are “all in one” systems based on small computer, peripherals, sensors, indicators, actuators and everything necessary to carryout a specific task, to fulfil a certain objective.

Becuase of their nature, the embedded systems designers must understand both software as well as hardware. only electronics engineer can not design good embeded systems and a software-only guy is incompatible with this field. There are two models of job models followed by companies mainly based on their resources. The large companies have specialist of hardware and software so the engineers need not to design everything. This does not mean that they don’t need to be familiar with each other’s domain as they need to coordinate with each other constantly and regularly. In small companies, the same guy has to do everything. the hardware as well as the firmware (embedded software). Also there are many other things which need to done like casing designs or at least considerable effort in determining the right enclosure of the product and its overall shape.

All in all embedded systems is an interesting field but it is demanding at the same time.

Share

  • Follow

  • Just a Moment Please

    Did you find what you were looking for on this website?






  • Disclaimer

    The information on this website is based on my personal views which may differ from my employer(s). The free material here to download is the work I have done in my free time and, though may seem resembling, does not belong to my current or previous employer(s). It is solely my own intellectual property.
  • Copyright © Electrodesigns.net 2011-12
    iDream theme by Templates Next | Powered by WordPress