[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 118: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 118: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 118: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 118: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 118: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 118: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 118: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 118: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 118: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead CareersNG • View topic - EMBEDDED SYSTEM DESIGN
CareersNG
Career Development for Nigerians ... A Knowledge Sharing Forum!
EMBEDDED SYSTEM DESIGN What is an embedded system ? Embedded system is any system that can be controlled by a computer(or microprocessor). The computer (or processor) must be inside the embedded system before it can control it. Note: If u have any contribution or question on any topic discussed u can send it to this forum. If u want to enjoy and understand this topic fully, u will need the following materials because this is a PRACTICAL CLASS where u can practice all the topic discussed at your home. Yes,U can do it. 1 COMPUTER SYSTEM (Pentium 3 and above). 2 Microchip MPLAB IDE - is free, u can download it from www.microchip.com 3. Proteus VSM (virtual system modeling), the most advanced simulation system for embedded applications. U can use this software to test your source code before u program(burn) it into your chip. U can download the student/evaluation version of the simulation software from www.proteuslite.com . 4. CCS Compiler [for C/C++ source code compilation] - u can download the 30 days trial version[free] from www.ccsinfo.com 5. Microchip ICD2 (In-circuit debugger) [OPTIONAL because of the price-N30,000++ or N7000 for cloned version (that’s the type am using - trust Chinese they can copy technology like photocopying machine, before I forget, I need a Chinese Language interpreter because I have some materials in Chinese Lang.)] 6 MICROCONTROLLERS [like PIC16F84A (cost N700),STC89C51(N300)] and some resistors and capacitors YES back to the main issue! MICROCONTROLLER What is a microcontroller ? A microcontroller is a computer on a single chip. A computer is an electronic system that can be programmed to automatically carry out a specific task. This task can be as simple as writing a letter using a word processor or as complex as controlling an orbiting spacecraft. The complexity of a computer system depends on the enormity of the task it is assigned. A computer assigned to control a car’s windscreen will be a very simple computer indeed.
COMPUTER ARCHITECTURE (wetin dey inside computer sef, na human brain abi na juju?) All computers share a common architecture which is shown below:
THE CENTRAL PROCESSING UNIT The central processing unit is the heart of the computer and is also known as the CPU. The CPU basically performs arithmetic operations as well as manipulating the memory. The set of all the operations a particular CPU can perform is referred to as its instruction set. A CPU is programmed by arranging these instructions in sequence to achieve the desired outcome; similar to the way you use a calculator to calculate simple interest for example. CPUs usually come in a single chip and are known as microprocessors. A good example of a microprocessor is the Pentium processor used in most personal computers. MEMORY The memory is where instructions to be executed are stored. Data to be manipulated as well as the results of processing are also stored in the memory. The CPU can carry out two kinds of operations on the memory: Reading and Writing. Writing is when the CPU stores data to the memory and reading is when the CPU retrieves data from the memory. Memories come in different capacities and the capacity is measured in bytes, kilobytes and megabytes etc. A byte is the space required to store one character such as the letter ‘A’. A byte is also equivalent to 8 binary digits i.e. 8 bits. Each location in the memory has a unique address. The CPU ‘chooses’ the address before asserting the read or write signal to indicate which memory location it wants to read or write. Think of the memory as a matrix, then the address corresponds to the matrix index and the memory content corresponds to the matrix elements. There are two types of memory namely: ROM and RAM. ROM stands for read-only-memory and is so called because the contents are permanent and cannot be changed by the CPU. The contents are either manufactured into them or are burnt into them in an irreversible write operation. RAM stands for random-access-memory and is a kind of memory that can be written to and read from. It is also volatile, meaning, unlike ROM, it doesn’t retain its contents when it loses power. INPUT AND OUTPUT These are the devices that connect the computer to the outside world. It is the means through which we communicate instructions to the computer as well as receive results of the operations performed by the computer. Examples are keypads and displays Also Sensors and actuators, e.g. Temperature sensor and relay respectively THE BUS ( not ABC motors bus that carry people from Lagos to Abuja, but this bus carry information from CPU to memory or to input/output(IO) ports (this port is not used for cooking but it is just a group of input and output pins of the microcontroller) The lines that carry data between the microprocessor and memory and I/O devices are called Buses. There are three types of Buses: Address, Data and Control Buses Address bus is used to carry addresses Data bus is used to carry data Control bus is used to carry control signals like read or write MICROCONTROLLER When the CPU, memory and I/O ports are all integrated into a single chip(IC-Intergrated circuit), it is referred to as a Microcontroller. Different Microcontroller families exists today made by different manufacturers E.g. AVR from Atmel, Pic from Microchip, Psoc from Cypress,8051 from Philips
USES OF MICROCONTROLLER UNITS (MCUs). (they are uncountable.) U can use MCUs to design security systems, digital clock, inverters, gsm, calculator, in short anything if u know how to use them. Which U will learn from this forum. Do u know there is MCUs in almost everything around u, starting from your handset,TV,CD,etc. PIC MICROCONTROLLER UNIT – PIC MCU PIC stands for Peripheral Interface Controller from MICROCHIP TECHNOLOGY. I think we have enough theory for now, let’s start the real practical thing. Before u start this section ensure that u have installed the following software in your PC. 1. MPLAB IDE 2. PROTEUS 3. CCS Compiler– if u want to use C language programming
PROJECT 1 – LIGHTING OF LEDs ........stay tuned I will be right back.
abeg how i go take add circuits and diagram to this topic?????????
yes back to the topic...
I hope by now u must have installed ur MPLAB,PROTEUS,CCS(PIC C)complier. Do u know that microcontrollers(MCUs for short) are zombie.U remember Fela's song: zombie ooo zombie, zombie no dey go unless u tell am to go,zombie. If u buy a brand new MCU,that MCU is just an empty black box with many legs like milipede. It cannot do anything in a circuit unless u command it to do something(if u know its language)by writing its source code.source code simply means a group of instructions or commands. Yes MCUs are intelligent zombies.
Welcome to the PIC FUNclass. These pages will take you form the basic structure of the device, right through to programming methods and techniques. U can download the datasheet of PIC16F84A from Microchips' web site. www.microchip.com or www.datasheetcatalog.com
To start, let us take a look at the PIC.
Microchip PIC 16F84 Microcontroller Microchip manufacture a series of microcontrollers called PIC. There are many different flavours available, some basic low memory types, going right up through to ones that have Analogue - To- Digital converters and even PWM built in. I am going to concentrate on the 16F84 PIC. Once you have learnt how to program one type of PIC, learning the rest is easy. There are several ways of programming the PIC - using BASIC, C, or Assembly Language. We are going to show you the Assembly(and C) Language. Don't be put off by this. There are only 35 instructions to learn, and it is the cheapest way to program the PICs, as you do not need any extra software other than the freebies.
The 16F84 Pins Below is a diagram showing the pin-outs of the PIC 16F84. We will go through each pin, explaining what each is used for.
RA0 To RA4 RA is a bidirectional port. That is, it can be configured as an input or an output. The number following RA is the bit number (0 to 4). So, we have one 5-bit directional port where each bit can be configured as Input or Output.
RB0 To RB7 RB is a second bidirectional port. It behaves in exactly the same way as RA, except there are 8 - bits involved.
VSS And VDD These are the power supply pins. VDD is the positive supply, and VSS is the negative supply, or 0V. The maximum supply voltage that you can use is 6V, and the minimum is 2V OSC1/CLK IN And OSC2/CLKOUT These pins is where we connect an external clock, so that the microcontroller has some kind of timing. MCLR This pin is used to erase the memory locations inside the PIC (i.e. when we want to re-program it). In normal use it is connected to the positive supply rail. INT This is an input pin which can be monitored. If the pin goes high, we can cause the program to restart, stop or any other single function we desire. We won't be using this one much. T0CK1 This is another clock input, which operates an internal timer. It operates in isolation to the main clock. Again, we won't be using this one much either.
How To Program The PIC OK, so you haven't been put off so far. Now, you want to know how to program the PIC, but apart from learning the assembly code instructions, how do you go about actually programming the information in? Well, there are two ways - the easy way, and the DIY way. The easy way is to buy a PIC programmer/Debugger (around N30,000+ or N7000), which will connect to your PC and you can program your PIC using the software provided. The DIY way is to build your own programmer (cheapest is just under N1000) and use free software from the Internet and program it that way.
Either method will do, as they both result in the same thing - program a PIC. The next thing you will need is an assembler. This converts the program that you write into a format that the PIC understands. The best one around is from Microchip themselves, called MPLAB. It is windows based, and includes an editor, simulator, and assembler. This is the de-facto software, as it is written by the manufacturers of the PIC, and above all it is FREE!
BEFORE THE PROGRAMMING LETS LOOK AT THE 35 INSTRUCTIONS THAT ALL PICs OBEY
The first instruction you will need to know is how to put a value into a file.
You must load a value (from 00 to FF) (00 to 255 in numerical terms) into the working register W. Then move the value from W into the file. This takes two instructions. They are MOVLW and MOVWF.
The first instruction is MOVLW. This means MOVe Literal (a number) into W. We have chosen the hexadecimal number 6F. It is written as 6Fh to show it is a Hexadecimal number. 6F is moved into W. This is how numbers get "plucked out of the air" and placed into a program. 6F has the decimal value of 111. We could select ANY value - it's just an example of how to put a value into a program. The second instruction MOVWF means MOVe W to file F. We have chosen file 1A (the files start at 0C and go to 4F). In the second instruction, the value in W (6F) is moved to file 1A. File 1A now contains the value 6F.
The next instruction you may need to know is something like "incrementing a file." This is: INCF 1A,1 This means: INCrement File 1A and put the result in the file. (this is the instruction normally used in a program - there is one other variation INCF 1A,0 but it is rarely used).
The next thing you may want to do is move the value 70h to Port B. Port B is an input/output port. The file for Port B is 06. We must move 70h to W then move the value in W to File 06. It will then appear on the output. If LEDs are connected to Port B, three will illuminate: 0111 000. The word "move" should actually be "copy" as the original contents of a file are not altered. In other words, they are available to "copy" to another file, if needed. The instruction MOVF 1A,0 moves the contents of file 1A to W. The next instruction is MOVWF 06. This moves the value in W (70h) to File 06
File 06 is the output port (also the input port) and the lines corresponding to 70h will be active (HIGH).
The instructions we have covered will create a very simple program. But before they can be "read by a micro," a SetUp routine must be added to set up PortB as an output. The SetUp routine consists of a few instructions:
BSF 03,5 MOVLW 00 MOVWF 06 BCF 03,5 ;Go to Bank 1 ;Load W with 0000 0000 ;Make PortB output ;Go to Bank 0 - the program memory area.
Adding these two sets of instructions together will turn on the LEDs (a few other minor instructions are also needed). That's all there is to beginning programming.
MOVLW 6Fh MOVWF 1A INCF 1A,1 MOVF 1A,0 MOVWF 06 ;Load W with 6F ;Copy W to file 1A ;Increment file 1A ;Copy file 1A to W ;Move the value in W (6F) to Port B.
This is the beginning to understanding PIC instructions. There are about 35 instructions and each one can be read and remembered quite easily.
hey my browsing time don finish ooo, i will come back if i buy more ticket. yes thats remind me of "your-freedom (free) browser". I beg if anyone know how to configure the thing make him tell me becos i have downloaded all there softwares but there is enough 123.456.7.bla.bla in the configuration.
Am trying to upload some circuits but this site said that..."The extension pdf is not allowed." I have also tried MS-Word but the same (.doc is not allowed). What type of file or document that can be attached here?????????
Mr. CareersNG_Admin i sent the project1 circuit to careersng admin's mailbox for u to attach it to this forum but i have not seen it. why? If u have not seen the mail post ur current email here
Hey! Mr Careersng_Admin, I asked u how to upload my circuits to this forum and i have not received a working answer from u. If u feel that am not doing it (attachment) the right way, send ur email address: I will send them to ur mailbox so that u can attach and post them here. Note that these materials am trying to offload here is not a copied work, it is original from me. Just to share embedded system design ideas with embedded minds. My embedded system design textbook will be out very soon. Stay tunned....
A big apology for this sir! i have actually been trying to get it done. but it seams you sent a pdf file by email which its difficult to extract the picture. can you pls send a document file feel free to contact careersng_info@careersng.com also pls list all important references to this documents.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum