Difference between revisions of "0.Introduction to 8051"
Line 2: | Line 2: | ||
{{Box|type=l_red_light|text= | {{Box|type=l_red_light|text= | ||
As writing a C program starts with displaying a string hello world, | As writing a C program starts with displaying a string hello world, | ||
− | most of the times learning about microcontrollers/embedded systems starts with 8051. It was introduced long time back but it in terms of understanding basics of embedded systems it still stands to the test. We will keep these tutorials less of theory and more of interfacing. And this one thing we have been glued to embedded systems so long, it is exciting when you make these small chips run and make interesting things out of them.<br /> | + | most of the times learning about microcontrollers/embedded systems starts with 8051. It was introduced long time back, but it in terms of understanding basics of embedded systems; it still stands to the test. We will keep these tutorials less of theory and more of interfacing. And this one thing we have been glued to embedded systems so long, it is exciting when you make these small chips run and make interesting things out of them.<br /> |
− | We would be doing all the hardware sessions on ULTRA_X51, | + | We would be doing all the hardware sessions on [http://www.xplorelabz.com Xplore Labz] development boards like [http://xplorelabz.com/product_details.php?sel_prod=10 ULTRA_X51], [http://xplorelabz.com/product_details.php?sel_prod=6 Starter_X51], however the examples presented should work for any of the 8051 microcontroller platform or development boards.<br /> |
}} | }} | ||
+ | |||
== What makes them Powerful? == | == What makes them Powerful? == | ||
{{Box|type=l_red_light|text= | {{Box|type=l_red_light|text= |
Revision as of 12:50, 2 December 2013
Contents
Introduction to 8051
We would be doing all the hardware sessions on Xplore Labz development boards like ULTRA_X51, Starter_X51, however the examples presented should work for any of the 8051 microcontroller platform or development boards.
What makes them Powerful?
Programmable!
Speed:
What do you need to know to get started? Perquisites!
- Basic C programming.
- Basic understanding of electronics, we would try and clarify the basic concepts, as and when required during the tutorial.
- Justdo it! The most important thing is do the practical stuff as go through the tutorials. This will give you the much needed fuel and excitement when things really work. If they don’t you’ll learn more than what these tutorials teach and more the fun!
Features of 8051
8 bit controller:
It basically means the microcontroller handles data in sizes of 8 bits or simply a byte. In other words, the architecture of 8051 is 8-bit, meaning to say ALU, Input output Ports, most of the registers, internal bus is 8 bit, we will see more of this while discussing the architecture of the controller.
4KB of internal ROM and 128 bytes of RAM memory.
The programs that are written in C or assembly get converted to hex code when compiled. This file is flashed/written to the controller and resides in the ROM. Hence 4KB of ROM determines the size of hex file or eventually the code that the controller is able to store, fetch and execute. Well it may seem very little, indeed it is. But this would more than enough for simple interfaces and even some of the commercial applications. The RAM is the faster accessible volatile storage memory that gets erased when you turn off the controller. This is needed to store real time data, the data from peripherals or calculations that you do while the program is executing. Well 128 Bytes! Yes that’all we have!
Four 8 pin I/O ports (P0,P1,P2,P3).
- Each of the IO Pins can be configured as Input or Output. IO pins are basically used to read/write data to external peripherals and sensors
Two 16 timers/counters.
The unit can be configured as timer when it measures time internally and configured as counter when external events are to be counted.
One serial port (UART).
One of the oldest most widely used communication protocols. This is used to communicate with a computer or any peripheral which has a UART interface. The protocol is very simple to learn and implement.
- 8bit data bus and 16bit address bus hence can access 64k of external memory.
Interrupts
Interrupts basically are requests to stop current execution and serve a request, either from a internal unit of a Microcontroller or a external device. Interrupts are used with numerous external peripherals as well as internal features of a microcontroller. They come in very hand to break normal sequential flow of execution and switch to a different task or request.