Software for Embedded System Design and Development

| 0 comments |
Software for Embedded system design and development requires features that helps in creating as much as possible accurate system prototype from the designs specification(s). A typical embedded system requires from the hardware point of view- microcontroller(s), microprocessor(s), ADCs, DACs, DSPs, analog and passive components, digital components and possibly FPGA devices. Program for the microcontroller and microprocessor are required from the software point of view.

So software for embedded system design requires support for hardware components and interconnect and also support for program development.

A microcontroller or a microprocessor is at the heart of any embedded system so software should support wide variety of microcontroller/microprocessor available in the market, at least the popular ones. Besides the processors, additional parts required to co-work with the processors are required. These are sensors, transducers, passive and active analog components and digital components.

But besides these hardware components support, the software for embedded system design should have feature of programming the microcontroller/microprocessor. Creating optimized program for the embedded system is as much important as the design of the hardware architecture. There are many software for development program for microcontroller and microprocessor. Generally, compilers and assembler software are optimized for individual microprocessor and microcontrollers such as Keil for 8051 based microcontroller or MPLAB for PIC and so on. So to use the microcontroller one must buy them and learn them individually. This creates a curve in learning.

Now an example of a Software called Proteus is illustrated.

Proteus is a interactive Simulation Software for analog and digital design. Moreover,an added special feature of Proteus is that microcontrollers from wide variety of vendors can be simulated in real time. Those microcontrollers can be placed in the ISIS schematic editor, interconnected with peripheral device(s) and simulated to see the working of the microcontroller in real time. Of course, the microcontroller won’t do anything without a program writing to it. So proteus has facility to write, compile, debug and load program into the microcontroller. In short this is achieved by writing C program or assembly program and uploading the .hex,.exe or .asm file created by compiler or assembler program to the microcontroller on the schematics. Once you have done that, click the Run button and you have the microcontroller based embedded system running. It is also interactive simulation because you can have interactive push button or a keypad or others on the schematic connected to the microcontroller and when you press the switches or keys the outputs from microcontroller behaves according to the inputs.

Let’s illustrate with an example.

You start Proteus program and then you create a new project. Next you place the desired microcontroller onto the schematic ISIS editor. In this illustration example AT89C2051 microcontroller has been used. After placing the microcontroller, we can place desired devices to the microcontroller.

The following figure shows examples with single LED, multiple LEDs and a 7 Segment display connected to the port of the AT89C2051 microcontroller.
A single led is connected to the Port 1 of the microcontroller.



LEDs connected to the Port 1 of the microcontroller.


A 7 Segment display connected to the Port 1 of the microcontroller.



Now the software part will be explained.

Embedded System Design is not only about placing microcontroller in a schematic editor. The software must also be incorporate programming facilities so that the program written for the microcontroller can be verified and debugged.

With software such as Proteus, it allows a system designer to create program in C language and assembly language. With it’s own build in compiler and assembler it is pretty straight forward to write program and debug and verify it.

But the software is not limited to only developing it with its own compiler and assembler but also with other vendor software such as Keil for 8051 microcontrollers or PICC for PIC. IF you have the Keil or PICC program for example you can specify it at the time you start writing program, from within Proteus.

Following figure shows software development for the microcontroller using Keil compiler in Proteus.


Thus Proteus provides a essential feature of having both hardware and embedded software development support one might expect for Embedded System Design and Development. More tutorials on Interactive Microcontroller Simulation using Proteus using C language with Keil Compiler can be found in this blog- http://appliedelectronicsengineering.blogspot.com
Read More..

Half Wave and Full Wave Rectifier Simulation

| 0 comments |

Power Companies supplies an average rms AC voltage of 120V at a frequency of 60Hz to the civilian homes. This line voltage has to down converted to DC voltage required by electronics equipment. Transformers together with rectifiers is used in the electronics equipment for this purpose. Transformers only downconverts the magnitudes, that is, the signal at the output of the transformer or the secondary winding is still an AC signal with lower magnitude and the frequency is the same. This lowered AC signal is then converted to a subsequently converted to DC by full wave rectifier. Also after the full wave rectifier is a filter that smooths the noise DC signal from the full wave rectifier.

The voltage required at the rectifier side can be calculated using a formula that relates voltages, the inductance and turn ratio. This is given below-
[frac{V_2}{V_1}=frac{N_2}{N_1}=sqrt{frac{L_2}{L_1}}]
If we require a voltage of 50V at the secondary then V2=50 and V1=120V. If we take primary inductor value as L1=10mH then the formula above gives L2=1.73mH.

Using these values we can stimulate how the AC signal conversion happens with the transfomer design. Shown below is a schematic for simulation for the verification of operation of transformer action in Orcad capture.
In the above schematic, the AC source signal enters the transformer with the calculated inductor values above. The resistors of 0.2ohm are there to model the small resistance values of the inductor. The K linear part is required in Orcad capture, and with this part we can specify the strength of the coupling. Here the coupling strength is 0.9, so 90% is coupled from the primary to secondary and 10% is lost in the air core(say). Orcad capture also requires a dc path to ground. This is provided by a high resistance wire of 1Gohm path.

Now a simulation of this circuit gives us a waveform graph as shown above.


The graph shows the voltage at the primary side in red and the voltage at the secondary side in green. We observe that the circuit did reduce the voltage but not down to 50V. The observed voltage is 41 to 42V. This is because of the coupling strength provided as 0.9. If we put the strength as 1 then the voltage does convert to 50V exactly. Also the down converted voltage is still an AC signal.

Lets change the coupling strength to 0.999 so that we get a 50V at the secondary circuit.


Now re stimulate the circuit gives us the following waveform graph.


The signal at the secondary has become larger to 50V.

Next we will add a diode to the secondary circuit to see its consequence.


Read More..

2 to 1 multiplexer verilog code using conditional operator Verilog tutorial

| 0 comments |
This verilog tutorial shows how a 2 to 1 multiplexer can be designed in verilog using conditional operator"?". This way of implementing a circuit in verilog is called behavioral modelling. A multiplexer can also be modelled using strucural modelling which was illustrated in earlier blog post 2 to 1 multiplexer Verilog Code


Verilog code for 2 to 1 multiplexer using Conditional Operator

module mux2x1(a, b, sel, z);
    input a, b, sel;
    output z;
   
    assign z = sel? a:b;
   
endmodule

The input to the multiplexer is a and b. sel is the selector signal and z is the output. assign statement is used to assign input a or b to output z according to value of sel signal.

If sel is logic 0 then z = b and if sel is logic 1 then z = a.


Compilation and Simulation Result:

The code was compiled and simulated using verilog Software and the simulation trace is shown below:



Related Simulation:

See also VHDL code for the 2 to 1 multiplexer:

VHDL code for 2 to 1 multiplexer using when, select, if, case statements and structural model

Read also 2 to 1 multiplexer simulation in Proteus Professional:

4x1 and 2x1 multiplexer circuit simulation
Read More..

Kontak

| 0 comments |
______________________________________________________
 teukuiwan
_______________________________________________________

Teuku_Mirwan
________________________________________________________
085270858522
____________________________
infoteukuiwan@gmail.com
_______________________________________________________
PIN : Teuku Mirwan Sahputra
  
Read More..

How on build your own Transformers Robots Robots Androids and Animations

| 0 comments |
This summary is not available. Please click here to view the post.
Read More..

A Frightening Experience

| 0 comments |

This happened while I was gone to Ohio for summer vacation last year. I decided to be brave and go on another coaster for the second time in my life. I find that funny. Ive decided to write a narrative from the top of my head about the experience. I know there are times when we all get scared to do the unimagined, but we have to face that fear and overcome it. Cedar Point is an awesome place to go with family and friends.

An experience riding a rollercoaster with big, frightening drops made me think twice about riding another coaster. When I first stood in line, it was very long, but I ended up on the coaster in less than an hour. After I had stood in line as long as I did, I was excited about riding the rollercoaster. However, When I finally got my change to take my seat, I wanted to get off. Instead, I decided that I was going to stay on it. Finally, the ride left the station, and I was excited. I sat in the seat, and the first drop came; I scream. This ride scared me as it went up and down the wood tracks, In seconds, the ride was over, and I hopped out of my seat. Although it was frightened from the ride, it turned out to be a fun experience for me.

Read More..

How to convert between data types in VHDL

| 0 comments |
There are basically 4 data types you will encounter in vhdl programming. They are std_logic_vector, unsigned, signed and integers. Normally you would define the interface or ports as std_logic_vector. But while you create hardware that does certain function you need to convert the std_logic_vector to unsigned, signed or integer and back from these to std_logic_vector. The std_logic_vector are simply binary bits which have no information about the mathematical form such as signed or unsigned integer.

Thus we often need to convert the incoming binary bits to unsigned, signed integers. For example if the input bits are numbers on which we want to perform arithmetic operation then we want to convert these input binary bits to unsigned or signed integer and then we can use the mathematical operators.
Mathematical operators like +, -, * and / can be used in the concurrent or sequential statements.

Consider for example that your are designing an arithmetic hardware that takes as inputs two signals a and b of data type std_logic_vector.

If x is a std_logic_vector data type then to convert it to unsigned or signed use-
unsigned(x)
signed(x)

If x is unsigned or signed data type then to convert it to std_logic_vector use-
std_logic_vector(x)

If x is an unsigned or signed then to convert unsigned or signed to integer then use-
to_integer(x)

If x is an integer then you can convert it to unsigned or signed use-
to_unsigned(x,size)
to_signed(x,size)

Read More..