Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,082 members, 7,807,235 topics. Date: Wednesday, 24 April 2024 at 11:26 AM

EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed - Science/Technology - Nairaland

Nairaland Forum / Science/Technology / EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed (4137 Views)

Embedded Systems Tutorial For Beginners:experiment 3( Led Chaser And Rgb Led) / EMBEDDED SYSTEMS Tutorial For Beginners:#include <module4.h> Experiments 1 & 2 / Embedded System Tutorial #include<module2.h> :what Is A Microcontroller? (2) (3) (4)

(1) (Reply) (Go Down)

EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by guassian: 7:15am On Mar 14, 2015
MODULE 3: SOFTWARE AND HARDWARE TOOLS NEEDED

INTRODUCTION
Welcome again to my tutorials. Sorry for taking too long for me to post, it was due to some technical issues. Today I will be covering the basic hardware and software tools needed to start an embedded system project using a PIC microcontroller. Remember I said in the last tutorial that I will limit this tutorial to the use of PIC MCUs not because others are not good, but because it is popular here in Nigeria and its very easy to use.
I will be listing the tools needed and explaining the importance and why you actually need them. This is actually for beginners. Intermediate embedded developer and professional, I still have you in mind. Let me finish with the basic, and then we start discussing some complex embedded circuit and also sharing ideas.
If you are new to embedded systems and to this series of tutorial i will advice you read my previous tutorial on nairaland https://www.nairaland.com/2181302/embedded-system-tutorial-include-module2.h or start from the introduction https://www.nairaland.com/2175195/embedded-systems-future-electronics-computer.

I actually prepared images after each subtopics but i find it difficult to insert image along side with text. so you will see the images at the end of the post

SOFTWARE TOOLS

SCHEMATIC DESIGN TOOLS:

This is a circuit designing and simulating software environment. Actually, electronics design has gone beyond drawing schematics with your pencil and ruler or drawing with Microsoft word or AutoCAD or Corel draw. Though you might still need all these tools for further design of the mechanical structure of finished product or you might need a little graphics to prepare presentation for seminars or exhibition. Schematic design software helps you to easily create your circuit because it has many libraries of commonly used components standard symbols and has auto features which will aid you to connect all the components together neatly. Many of these schematic design tools now have simulation and animation features which enable you to virtually test your circuit and see how it works. As debuggers is to a programmer which allows them test their code gradually as the build and add lines and before finally exporting it as finished application, so a simulator is to an electronics designer and it is very helpful especially to a beginner. Practical Electronics is not really like programming that will give you syntax error, semantic error or any other type of error when not written properly; In electronics, if the circuit is designed and/or connected recklessly, can blow up components, cause fire thereby wasting money and putting lives and properties in danger.
Some professional schematic design and simulation software comes with many feature and has many tools like multimeters, signal generators, oscilloscope, test probe etc. this to a great extent helps a lot of circuit designers to easily model circuit and see how it works before implementation. There are many schematic design and simulator software that you can get easily online such as eagle, Orcad, proteus, tina, multisim, livewire etc. All these are expensive softwares which comes in trial versions but thanks to some hackers who create cracks for all these softwares and make an average hobbyist enjoy the full features of these softwares. Out of all these softwares, you might ask a question on which one is the best. Well, all are good to in their own capacity but personally the ones I like and have used is proteus, livewire and Tina.
These three has their own merits and demerits but some are just far above average on the scale of comparison. Comparing this three:

LIVEWIRE: this is a very good software which is not complex and it is very easy to use and flexible. It has many testing tools such as multimeters, oscilloscope etc. It is very easy to use such that u can figure things out yourself without the prior knowledge of schematic design. The IDE is easy to install and most livewire software you see online are portable software (they don’t need to install on your hard drive). The simulation animation is superb, plotting of graph is very easy, it has a function to see current as it moves in the circuit. The demerit of livewire is that it doesn’t have enough component library to cater for the growing needs of circuit designers. It cannot simulate embedded systems circuit so you will barely need it for the sake of this tutorial.

TINA: This also is a very powerful software that I respect and give kudos to them. This software is very good in the area of analog electronics and analysis such as AC analysis DC analysis, symbolic analysis which generate formulas for you to mathematically calculate voltages and other properties of in your circuit, Fourier analysis etc. As a student you need to get this software, it will be useful for you to solve complex electrical network and circuit theorems problems. I stand to be corrected, Tina too cannot be used to simulate microcontroller project.

PROTEUS: this is the best schematic software of all time. It has thousands of components and it is very professional in nature. It can be used to simulate microcontroller and microprocessor. It has inbuilt assemblers and it can be integrated with many compilers. It is the best embedded schematic and simulation tool I have ever seen. It has many functions more than you need to start embedded system. As we all know that no system ever created is 100% perfect, proteus too has many short comings and that is in the area of COMPONENT MODELS or libraries or supported devices. There are still so many devices you might want to use but wont get it on proteus, but I don’t actually blame them directly because thousands of components are created everyday and if they should include all of them in the model, it will be too cumbersome so they put the frequently used once and however, where that problem is actually solved is that you can create your own model and add it to the proteus DLL files but these models are not for beginners or intermediate or even masters, simple models are for professional while very complex ones are for emeritus.
This is the download link for proteus 8
http://dc263.4shared.com/download/o2QOjJ3Kba/proteus_8_full.rar?tsid=20150312-213840-cae30fea&lgfp=2000


SPICE: The full meaning is Simulation Program with Integrated Circuit Emphasis. It is mostly used to simulate analog circuit and it is ancient in nature and are not frequently used as the world of technology going digital. It is the “most worstest” (if there is any word like that) simulation tool a hobbyist or engineer can use in these modern day and unfortunately it is what most universities has been using since the 80s and are still using, they haven’t changed their curriculum. I stand to be corrected, spice is a piece of crap; it cannot be used to simulate even a very complex analog circuit. It cannot be used to simulate complex digital circuit, there is no multimeters, oscilloscope, it is not graphical based but a command line based (analogous to using command prompt in a computer to open a file instead of the click of a button). I can’t exhaust the demerits. Lets move on, I don’t want to bore you with this, you can search online for more information about it and see for yourself.
WHY SIMULATION
Many hobbyist do projects without simulation not that they don’t know that the software exist, they even use them just to design circuit but don’t see the need of simulation. Listed below are the reasons why you need simulation:
1. For easy development of circuits from the scratch.
2. It helps an engineer who has little practical knowledge to design and test his design without the intervention of a technician or having to buy expensive components.
3. It helps an engineer to easily determine the effect of variation of component values.
4. It reduces the risk of electric shock and fire caused by curious beginner hobbyist.
5. It makes circuit design easy, cheap and time efficient because you have ready-made multimeters, oscilloscope, signal generator and other tools.
6. It helps you to debug and test your embedded software in the virtual hardware on the simulation environment. This will make embedded system development easy because you might need to edit a complex code up to 100 times before you get it working perfectly.
7. It also aids teaching and lecturing.

How I wish many our university and polytechnic lecturers knows how to use simulation tool, circuit theory explanation and calculation would have been a piece of cake but its never too late. If you are still in an undergraduate and were not thought simulation, you can walk up to you lecturers or HODs and challenge them politely (or get you’re a*s kicked). But you as a student can take it as a challenge to learn it yourself, this will help you a lot especially if your area of interest is electronics.

WHERE SIMULATION WOULD NOT WORK
Simulation has its own limitations. One of the disadvantages is that is makes student lazy and it assumes an ideal environment. Take for example a resistor and capacitor which in real world has 5%- 10% tolerance due to its properties changing with temperature humidity and other factors, the simulation assumes a 0% tolerance. There is no Electromagnetic interference in simulation which is a major problem in the real world circuit.
A circuit can be assumed to be working perfectly on simulation because it assumes many ideal condition and use default values, but when such circuit is implemented and there is problem can go a long way to frustrate the beginners. So it is always a best practice that after a circuit is simulated, it should also be experimented on breadboard to see the real life working.
Simulation will also not work in some cases because the actual real world cannot be fully represented by a computer. In such case, an additional circuit or device can be added to the simulator via computer USB port or serial to get real world analog data. Take for example, in the design of a fire sensor which uses smoke, heat and flame sensing circuitry; you cannot virtually start a fire on the system except there is a model that does that. A solution to this is to physically build a fire sensing circuit and connect it via the USB or serial port or parallel port to the simulation software. Another example is a fingerprint related project, how on earth can you simulate that? It needs biodata(fingerprints) which will be difficult to model.

SOFTWARE DEVELOPMENT TOOLS
Software development tools are computer programs, and they usually run on personal computers, that allow the programmer (or system developer) to create, modify, and test applications programs. Some common software development tools are:

Text Editors
A text editor is used to create or edit software programs and text files. The Windows operating system comes with a text editor program called Notepad. Using Notepad, we can create a new program file, modify an existing file, or display or print the contents of a file. It is important to realize that programs used for word processing, such as Microsoft Word, cannot be used for this purpose, since they embed word formatting characters such as bold, italic, and underline within the text. Most assemblers and compilers come with built-in text editors, making it possible to create a program and then assemble or compile it without having to exit from the editor. These editors provide additional features as well, such as automatic keyword highlighting, syntax checking, parenthesis matching, and comment line identification. Different parts of a program can be shown in different colors to make the program more readable (e.g., comments in one color and keywords in another). Such features help to eliminate syntax errors during the programming stage, thus speeding up the development process.

Assemblers and Compilers
Assemblers generate executable code from assembly language programs which is a low level language, and that generated code can then be loaded into the flash program memory of a the microcontroller. Compilers generates executable code from high-level language programs by first of all converting the “English language” related code to low level language and later generate an executable code with the file extension ”.hex”. that means all compilers comes with an inbuilt assembler. Some compilers have the feature to allow developers write in both low level and high level on the same source code. The compilers used most often for PIC microcontrollers are BASIC, C, and PASCAL. So which one is good? Writing with assembly language or high level. I will leave this to some guru on this Nairaland who has done justice to that. That guy is something else… He is really like me, we have almost same thought on this issue and i agree with him totally.

he wrote and i quote


Microcontroller programming knowledge is best to start with assembly language, but for easy and quick knowledge, C is better. Reason is because with C,u don't have to controll the microcontroller directly with mnemonics but all u have to do is to write statements for the C compiler and it will generate the equivalent assembly language for the microcontroller.
So C its just a servant for u.
E.g creating a 1 secon delay in c is just:
Delay_ms(1000);
While in assembly, u will have to write at least 10 lines and do a lot of calculation before u can acieve that.

I stand to be challenged and corrected by all assembly language freeks out there. I coded in assembly for a year and I know what I am saying. So to those that says C is for lazy people, its not about lazyness but about knowing what you are doing and using the easy and fast method to achieve it. And the beauty of intelligent C compilers is that if there are registers u cannot access with C, u can write assembly code in line with C using #asm.

Even with C that is regarded as "code-servant" when using preinstalled functions, looping, iteration etc, u can develop an embedded application e.g password acces system for as long as a whole day, now imagine using assembly language that u are to do the whole job yourself. Show me what u can do in assembly language that I can't do in C apart from the ram optimisation and reduction of hex file.

If u are a newbie I will advice u use to learn assembly language just for a short period of time so that u won't be an illitrate in that aspect. But the koko is C language. And also use CCS compiler for PIC microcontroller. Its very easy, intelligent and has a lot of preinstalled peripheral and memory drivers.

So if u wanna learn microcontroller progamming, Start from how numbers are being represented in hex,bin,dec then how to set ports as input or output, then writing logic state to port, on a LED,then learn to use delay,flash a led, then how to create loops, while loop, do while loop, for loop, then how to create a christmas light led chaser, then how to read from input ports, then how to create traffic light with delays, then how to use 7 segment display and also to cascade to give u more digits, and how to multiplex, then how to write to lcd display and how to read from 4x4 keypay etc.

The ccs compiler has help file or manual which u can read to get all the syntax and functions availabe. And u can check example programs to guide u. Know that when u start, u will get a lot of errors and sometimes everything might look frustrating but continue and don't give up. The more u learn and practice syntax, the less error u get.

U also need to install a proteus simulation software that will enable u to design the circuit virtually and run your program on it to see how it works before u actually implement it physically. This will help you save a lot of time and component used when experimenting. Cos u don't need to buy anything. Unlike doing it physically and blowing up your components due to errors.

I hope this is useful information to atleast one person that needs it.

copied from https://www.nairaland.com/1550279/engineering-students-chatroom/6

To add to what he said, back in the dark ages of microprocessors, software development was done exclusively in the specific assembly language of the specific device. These assembly languages were character based ‘mnemonic’ substitutions for the numerical machine language codes. Instead of writing something like: 0x12 0x07 0xA4 0x8F to get the device to load a value into a memory location, you could write something like: MOV 22 MYBUFFER+7. The assembler would translate that statement into the machine language for you. I’ve written code in machine language (as a learning experiment) and believe me when I tell you that assembly language is a major step up in productivity. But a device’s assembly language is tied to the device and the way the device works. They are hard to master, and become obsolete for you the moment you change microcontroller families. They are specific purpose languages that work only on specific microprocessors. C is a general-purpose programming language that can work on any microprocessor that has a C compiler written for it. C abstracts the concepts of what a computer does and provides a text based logical and readable way to get computers to do what they do. Once you learn C, you can move easily between microcontroller families, write software much faster, and create code that is much easier to understand and maintain.
Assembly language is used very useful in applications where processing speed is critical, where each registers of the MCU must be controlled precisely and the microcontroller must respond to external and internal events in the shortest possible time. However assembly language programs are not easy to maintain but High-level languages like C C++ are on the other hand, are easier to learn, and complex programs can be developed and tested in a much shorter time. All experiments in this tutorial limited to the C language using CCS compiler. Many different C language compilers are available for developing PIC microcontroller-based programs. Some of the popular ones are:
1. CCS C (http://www.ccsinfo.com)
2. Hi-Tech C (http://htsoft.com)
3. C18 C (http://www.microchip.com)
4. mikroC C (http://www.mikroe.com)
5. Wiz-C C (http://www.fored.co.uk)
Although most C compilers are essentially the same, each one has its own additions or modifications to the standard language.


This is the download link for CCS C Compiler. you can also get others from www.4shared.com
http://dc535.4shared.com/download/jqtu4IBGba/ccs_pic_c_compiler_pcwdh_4114.rar?tsid=20150312-213902-153fcdab&lgfp=2000

1 Like

Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by Savotech: 4:00pm On Mar 16, 2015
Bravo, i dey feel u bro...
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by Savotech: 5:10pm On Mar 16, 2015
Hardware tools nko?
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by guassian: 10:40pm On Mar 17, 2015
@savotech and whole house, i am so sorry. I dont really know why NL keep deleting my post. i have tried several time to post the 2nd part which is the hardware tools but i am always banned and the post deleted. i am new in nairaland and i dont know what i am doing wrong.

But in the meantime I have attached the continuation as a word document at the bottom of this post.

Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by guassian: 12:29pm On Mar 18, 2015
Mistake in the word document, the site to get basic electronics construction tutorial is www.electronicsclub.info
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by guassian: 7:29am On Mar 27, 2015
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by ade2008(m): 1:57pm On Mar 27, 2015
please compile all these information as an eBook for people to download .so that we can consult it while working offline. thanks
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by guassian: 9:19am On Mar 28, 2015
Ok, Good. Probably when i finish the tutorial for beginners cos i want to create an avenue for questions.
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by Fulaman198(m): 4:14pm On Mar 28, 2015
I'm really impressed with this tutorial. The only thing is that men like me and him most likely don't have time for women in our lives because we are constantly thinking of/about engineering concepts
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by Genea(f): 7:38am On Mar 29, 2015
Pls who can help me hack my twitter account,forgot my password and no access to the email
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by Fulaman198(m): 7:45am On Mar 29, 2015
Genea:
Pls who can help me hack my twitter account,forgot my password and no access to the email

How do we even know it's yours. Besides, that kind of hacking is unethical.
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by Genea(f): 7:52am On Mar 29, 2015
Fulaman198:


How do we even know it's yours. Besides, that kind of hacking is unethical.
wat wil i do wit someone's own,wen av nt even managed mine wella,pls just help me out,its being a long time av logged in2 it dats y i 4gt d password
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by Fulaman198(m): 8:07am On Mar 29, 2015
Genea:
wat wil i do wit someone's own,wen av nt even managed mine wella,pls just help me out,its being a long time av logged in2 it dats y i 4gt d password

Even though you have cute puffy cheeks, sorry I can't help you out sad
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by Genea(f): 8:15am On Mar 29, 2015
Fulaman198:


Even though you have cute puffy cheeks, sorry I can't help you out sad
y
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by dcole73: 4:39pm On Sep 24, 2015
Hello,
Need an oscilloscope?
For those engineers in Lagos hoping to own an oscilloscope, you should read this.

I am presently offering to order some oscilloscopes. Please view this link and contact me if interested.

https://www.nairaland.com/2622043/need-oscilloscope-please-see-order
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by dcole73: 7:53am On Oct 02, 2015
Got oscilloscope for sale.

Hantek DSO5072P digital storage oscilloscope,
70 MHz, dual channel, 1GSa/s sample rate, 40k record length,
7" TFT LCD display.

Comes complete with two probes and a PC installation CD.
N73000


Sold Out ...

Sold Out ...
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by manmidtexy(m): 12:50pm On May 13, 2016
Nice one...
Savotech:
Bravo, i dey feel u bro...
Re: EMBEDDED SYSTEMS Tutorial:#include <module3.h>software And Hardware Tool Needed by Godw1n(m): 12:46pm On Nov 16, 2019
I just started following bro... thanks so much I have been moving from module to module
.hope it won't stop on the way

(1) (Reply)

Port To Glo From MTN, Etisalat, Airtel- How To Port Network Lines / Badoo Registration – Www.badoo.com – Sign Up / How To Recover Your Lost 2go Password For Free

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 66
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.