Sunday, October 6, 2019

Blacks Leisure Group Plc Case Study Example | Topics and Well Written Essays - 2500 words

Blacks Leisure Group Plc - Case Study Example Black’s leisure Group Plc is one of the leading retail outdoor and board wear group in United Kingdom. The company carries all its operations under two categories: The Outdoor Group and the Boardwear Division. The Outdoor Group comprises Millets and Blacks, the largest outdoor retailers in the UK, and Freespirit and Mambo, the leading retail chains in the newly emerging UK boardwear market. The Boardwear Division comprises the wholesale and retail arms of the O'Neill brand, one of the world's leading names in boardwear. The Group has the exclusive distribution rights to the brand for the UK. In brief, the company operates more than 450 stores under seven companies- owned and managed retail chains. 1. A macro-environmental and competitive audit The UK Boardwear market has been growing strongly in recent years and is estimated to be worth around  £400m at retail prices. Blacks Leisure is market leader in this fast growing market segment through its O’Neill and Free Spir it businesses. The main competitors for Blacks Leisure Group is Debenhams, JJB Sports, Snow & Rock and Halfords. With an increase in the number of consumers of the broad wear market, the competition has been growing tremendously. A large number of new entrants are seen entering this market in the past few years. However, Blacks Leisure still continues to dominate the market with its large range of products and a large number of outlets. PEST Analysis: PEST analysis is concerned with the environmental influences on a business. The acronym stands for the Political, Economic, Social and Technological issues that could affect the strategic development of a business. Identifying PEST influences is a useful way of summarizing the external environment in which a business operates. Although the PEST analyses rely on past events and experience, it can be used as a forecast of the future (Wilson and Gilligan, 1998). Political factors The political environment is good. The government is stable and reliable, even if Britain fails to achieve total agreement with some EU policies from time to time. At present no EU directives are known which will have a direct effect on the UK sports or outdoor wear retail industry in the near future. Due to the EU membership a trend can be seen towards stricter environmental protection legislation. This may have a direct or indirect effect on Blacks Leisure Plc or its suppliers. Economic factors Looking at the economic environment, it is somewhat tricky since on one hand there is the strong sterling compared to the Euro. Euroland encourages imports and endeavors to hold domestic prices at an attractive level. But on the other hand it is difficult for UK to be competitive outside its boundaries because of the high pound sterling exchange rate against the Euro. As Blacks Leisure Group sells about 92% in the UK marketplace, this may currently only have a limited effect, but could be more important in the future when thinking globally. Social factors In the present world scenario it is being observed that the people retire earlier these days, and are working for shorter hours as well. Average working hours per week have decreased over the last 20 years. As a result people have more spare time. This means they have time to compare prices in the High Street and the quality of goods and services from retailers. As a result they are spending more time comparing different sellers. Another issue these days is the "Green environmental issues". A large number of people are getting concern over the environment and thus are getting in the depth of the production cycle of products. Blacks Leisure is taking different steps to assure people that they operate as an eco-friendly environment. Technological factors Another issue is the speed of technological transfers which also has an impact on the industry - it is not comparable with the fast growing internet business - but nevertheless it

Saturday, October 5, 2019

Adam Smith & UK Income Taxation Essay Example | Topics and Well Written Essays - 4500 words

Adam Smith & UK Income Taxation - Essay Example 42). According to Smith, the first maxim is that â€Å"the subjects of every state ought to contribute toward the support of government, as nearly as possible, in proportion to their respective abilities, that is in proportion to the revenue which they respectively enjoy under the protection of the state† (Smith 1784, p. 639). According to Smith, â€Å"observation or neglect of this maxim consists in what is called the equality or inequality of taxation† (Smith 1786, p. 639). For Smith, the second maxim is that â€Å"the tax which each individual is bound to pay ought to be certain, and not arbitrary† (1784, p. 639). For Smith, this means that â€Å"the time of payment, the manner of payment, the quantity to be paid, ought all to be clear and plain to the contributor, and to every other persons† (1784, p. 639). For Smith, the second maxim is necessary because â€Å"otherwise, every person subject to the tax is put more or less in the power of the tax-gathered, who can either aggravate the tax upon any obnoxious contributor, or extort, by the terror of such aggravation, some present or perquisite to himself† (1784, p. 639-640). Smith emphasized that uncertainty of taxation â€Å"encourages insolence and favours the corruption of an order of men who are naturally unpopular, even where they are neither insolent nor corrupt† (1784, p. 640). The third tax maxim of Adam Smith is that â€Å"every tax ought to be levied at the time, or in the manner, in which is it most likely or most likely to be convenient for the contributor to pay it† (1784, p. 640). Finally, Smith’s fourth maxim on taxes is that â€Å"every tax ought to be contrived as both to take out and to keep out of the pockets of the people as little as possible over and above what it brings into the public treasury of the state† (1784, p. 640). On the fourth maxim, Smith also noted four things. One, the tax levy may require a great number of officers whose salaries may eat the greater portion

Friday, October 4, 2019

The Great Depression Essay Example for Free

The Great Depression Essay A time of great hardship came to the people of Australia from 1929 to 1932. This time was known as the Great Depression were the economy of the state drops. Australia is not the only nation affected and many other nations as well. However, Australia is said to have been one of the most affect and hardest-hit country due to its high dependence on exports. â€Å"Australia’s dependence o n the world market left her extraordinarily vulnerable to world market fluctuations† (Spenceley, p. 14). Since the Great Depression was a time of crisis not only for Australia but for the whole world, Australia was affected greater than other nations. As a result, more and more people loss their jobs. By that time, even the women and youth tried to find ways to earn money. It was a time of hardship, hunger and conflict. Even before the time of the Great depression unemployment rate in Australia is high reaching around 10%. At the time the stock market crash at Wall Street in October 1929, the unemployment rate rocketed reaching 20%. The unemployment rate reaches its peak in the year 1932 were 32% Australians were jobless (culture.gov.au, n.d.). It is said that the fall on export prices, sales, overseas loans and residential construction lead to the Great Depression. Still, economist is debating on the ultimate cause that triggered the event. The Great Depression created a devastating effect on the Australian economy. This also led to many illegal or rather unusual ways of making money including gambling and prostitution. Even the minors, man or woman take part in making money. Mostly young men were involved in small gambling and young women in amateur prostitution. Education was also greatly affected since most children were forced to leave school at the age of thirteen or fourteen. The time of the Great Depression was hard particularly for working women since they are required to do the house chores with their exhausted body. Job was easier that time for young workers but it was short lived, until they reach the age of sixteen to twenty one. During those times, the abilities of the government were questioned by many Australian citizens and many organizations gained popularity through their acts showing their dissatisfaction to the government. In order to bring new investment, the country relied heavily on borrowing money from different countries and the monetary policy of the country was controlled by privately owned banks. The government also had to sell off gold reserves whenever the banks refuse to extend the overdrafts of the country. Still, unemployment continued to increase as the government instituted employment projects. Until now, many factors that triggered the Great Depression that is present. Thus, those hard times are not just in vain since we, the new generation, were able to learn from the past and incorporate the steps that our forefathers used during those hard times. Today, in cases of crisis and unemployment due to the fall of company’s we go back to the basic goal for working, just as in the time of the Great Depression, to provide food and necessities for our family. Reference   Spenceley, G.   (1981). The Depression Decade. Thomas Nelson, Australia. The Great Depression (n.d). Available online from culture.gov.au

Thursday, October 3, 2019

The C Programming Language And Its History

The C Programming Language And Its History Introduction In this Assignment, I shall be going through the stages and milestones, which lead to the development of two successful programming languages, C++ and Java. The programming language C influenced greatly C++, and therefore I felt it was necessary to delve deeply in this programming language as well. This assignment also includes the decisions taken by their respective creators and the reasoning behind them. The C Programming Language Between 1969 and 1973, the programming language C was under development at Bell Labs, by Dennis Ritchie. [1] During the same period, the operating system UNIX was under development as well.[1] In this section, I make most of my references to texts written by Dennis Ritchie himself in the book â€Å"History of Programming Languages†.[2] Prehistory Before C, during the late 60s, Bell Labs were passing through difficult times, mainly due to the fact that the development of the Multics project was halted because the beneficial use of the GE-645 Multics machine would not be available on time and would be too costly.[4] However, during and after the disposal of the machine, an â€Å"informal team†, lead by Ken Thompson, began to research and develop other alternatives.[4] Ken Thompson aimed in constructing a comfortable work environment by using any resources available to him.[4] His design involved implementing some similar ideas of Multics, such as â€Å"an explicit notion of a process as a locus of control, a tree-structured file system, a command interpreter as a user-level program, simple representation of text files, and generalized access to devices.†[4] However, Ken Thompson also excluded other certain aspects, including â€Å"unified access to memory and to files†.[4] Furthermore, instead of using PL/I which was the implementation language of Multics, Thompson and his team used another programming language known as BCPL.[4] Just like PL/I, BCPL was also a high-level language; a great advantage which Thompson did not want to let go due to its clarity and simplicity, unlike assembly language.[4] The B Programming Language In 1968, Ken Thompson was faced with a problem with the PDP-7, a machine for which he had no compatible software available.[4] Ken Thompson then created his own PDP-7 assembler, but it was in 1969, that Doug Mcllroy created the first high-level language for the system.[4] This language was an adaptation of the programming language known as TMG, which was created for the PDP-7 by R. M. McClure.[4] Dennis Ritchie describes TMG as â€Å"a language for writing compilers (more generally, TransMoGrifiers) in a top-down, recursive-descent style that combines context-free syntax notation with procedural elements†.[4] TMG had been used to create the compiler of PLI for Multics.[4] Ken Thompson then felt it was necessary for UNIX to have its own system programming language.[4] After a reluctant effort to use FORTRAN, Thompson later designed a new programming language named B.[4] The B programming language was developed mainly based on BCPL.[4] Moreover, Dennis Ritchie describes B as â⠂¬Å"BCPL squeezed into 8K bytes of memory and filtered through Thompsons brain†.[4] He then mentions that most probably, its name came about by representing a â€Å"contraction† of BCPL.[4] However, he might have chosen it as a dedication to his wife Bonnie.[4] Development was first completed by creating a TMG version of B, where Thompson then rewrote B in itself.[6] Dennis Ritchie recalls that during this stage of development, Ken Thompson found the memory limitation to be a great challenge, as â€Å"each language addition inflated the compiler to barely fit†.[6] However, each re-write, due to the beneficial feature, â€Å"reduced its size†.[6] Dennis Ritchie continues by mentioning an example.[6] He stated that, originally coming from ALGOL 60, B generalized assignment operators such that x =+ y was used to add x to y.[6] The operator was then corrected to spell x += y back in 1976.[6] Thompson was more innovative as he created new operators such as ++ and to increment and decrement.[6] The position of these operators, written as postfix or prefix, would determine whether the change in value would â€Å"occur before or after noting the value of the operand†.[6] Instead of producing machine code, the PDP-7s B compiler generated â€Å"threaded code†, in which the compilers output was made up â€Å"of a sequence of addresses of code fragments that perform the elementary operations†.[6] In the case for B, these operations worked on a straightforward stack.[6] However, due to the fact the PDP-7 machine was too small and slow, not much was written using B, â€Å"except for B itself†.[6] It only served them for experimental use. Re-writing UNIX on this machine proved to be too much of an expensive step.[6] Furthermore, Dennis Ritchie reports that at a stage, Ken Thompson expressed the â€Å"address space crunch by offering a virtual B† which made it possible for the interpreted program to take up more than 8k bytes.[6] This was done by â€Å"paging the code and data within the interpreter†.[6] However, it was then concluded that it would not be feasible enough and would result in being too slow â€Å"for the common utilities†.[6] Despite all this, some utilities were still written in B, such as an early version of the variable precision calculator known as dc.[6] Around this time, Dennis Ritchie also recalls working on an â€Å"ambitious† project, which mainly involved creating a genuine cross-compiler capable translating B to GE-635 machine instruction instead of thread code.[6] Dennis Ritchie then comments that this task was only possible due to the practicality and ease of the B language.[6] The Unix project had proven itself so well, that they managed to get a PDP-11 at Bell Labs.[6] By using the â€Å"the threaded technique† in order to run programs written in B on this machine, it was only necessary to write â€Å"the code fragments for the operators, and a simple assembler† in which the latter, Dennis Ritchie created himself.[6] The â€Å"first interesting program† to be tested on the PDP-11, before any operating system software, was dc.[6] Furthermore, around the same time, Ken Thompson managed to record the â€Å"UNIX kernel†, along with some simple commands written in PDP-11 assembly language.[6] Later in his paper, Dennis Ritchie mentions that apart from Bs advantage regarding its simplicity, it also had its problems mainly related to the PDP-11.[7] He states that the machines, on which Bell Labs initially used BCPL and also B, were â€Å"word-addressed†.[7] Furthermore, he continues by stating that these languages only handled one single data type, known as the â€Å"cell†, which would simply be â€Å"equated with the hardware machine word†.[7] However, with the introduction of the PDP-11, a manifold of â€Å"inadequacies of Bs semantic model† were clearly visible, one of which was that its character-handling mechanisms tracking back to few changes from BCPL, were incompetent.[7] For instance, Dennis Ritchie mentions that â€Å"using library procedures to spread packed strings into individual cells and then repack, or to access and replace individual characters† did feel strange and at times â€Å"even silly†, on a machine based on bytes.[7] Despite that the first model of the PDP-11 was not capable of calculating floating-point arithmetic, the producer did affirm that this feature would be available shortly.[7] By defining special operators, floating-point operators were added to BCPL in their Multics and GCOS compilers.[7] However, these operators were only possible on certain machines where â€Å"a single word was large enough to contain a floating-point number† and therefore could not be used on the 16-it PDP-11.[7] Another inadequacy was that B and BCPL suffered from overhead due to pointers.[7] This was because the languages basis, â€Å"by defining a pointer as an index in an array of words†, restricted pointers to be represented as â€Å"word indices†.[7] For each pointer reference, it generated â€Å"a run-time scale conversion† from the pointer to the corresponding byte address intended by the hardware.[7] Due to all of these reasons, Dennis Ritchie realised that it was necessary to develop a â€Å"typing scheme† to be able to handle characters and byte addressing, and also be prepared to work with the â€Å"coming floating-point hardware†.[7] At first, type safety and interface checking was not considered to be vital and therefore were introduced at a later date.[7] Besides the issues with the B language, B compilers threaded-code technique made programs run slower than the same programs written in assembly language.[7] NB and C In 1971, Dennis Ritchie started to expand the B language and called â€Å"the slightly extended language NB, for new B†.[7] Dennis Ritchie also states that since NB was used for a very short period, no documentation was done.[8] He continues by mentioning that he added a character type and also developed its compiler to produce PDP-11 machine code instructions.[8] Therefore, the compiler was capable of converting programs fast and small enough to contest with assembly language.[8] All in all, NB offered the simple types ‘int and ‘char, arrays of them, and also pointers to them.[8] The semantics of arrays found in B and BCPL stayed the same.[8] Furthermore, inside procedures, the language interpreted pointers and array variables to be identical.[8] Ritchie explains that â€Å"a pointer declaration created a cell differing from an array declaration only in that the programmer was expected to assign a referent, instead of letting the compiler allocate the space and i nitialise the cell†.[8] The values that were held in cells, linked by â€Å"array and pointer names†, were bytes of machine addresses relating to their respective memory location.[8] This was beneficial, as an â€Å"indirection† through a pointer required no â€Å"run-time overhead† to form the pointer from a word to â€Å"byte offset†.[8] However, the machine code for â€Å"array subscripting† and â€Å"pointer arithmetic† was dependant on the actual type of the array or pointer.[8] Dennis Ritchie states that although these semantics made it very easy to transition from B, problems eventually began cropping up mainly when he tried to â€Å"extend the type notation†.[8] He continues by explaining his difficulty in implementing â€Å"structured (record) types†.[8] At first, it seemed structures should link correspondingly onto memory in the machine.[8] However, the major issue was that for a structure containing an array, there was no ideal location to store the pointer containing the base of the array, or a practical way to initialise it. [8] The goal of Dennis Ritchie was that a structure would not just â€Å"characterise† an abstract object but also â€Å"describe a collection of bits that might be read from a directory†.[8] He describes the solution in achieving this goal as â€Å"the crucial jump in the evolutionary chain between type-less BCPL and typed C†.[8] Rather then having a â€Å"materialization of the pointer† located in memory, the pointer would be created only when the array name is refereed to in an expression.[8] Moreover, values of type array, once mentioned in an expression, would change its values to pointers to direct to the objects making up the array.[8] Despite the fact that the semantics of this new language had shiftily changed, most code written in B could still be used. Furthermore, this language also differed from its predecessors as it offered a â€Å"comprehensive type structure† and â€Å"expression in the syntax of declaration†.[8] After creating the â€Å"type system, the associated syntax, and the compiler†, Dennis Ritchie believed that this language deserved its own name, as when compared to NB, they were very distinctive.[8] Therefore, he called the programming Language C, â€Å" leaving open the question whether the name represented a progression through the alphabet or through the letters in BCPL†.[8] UNIX benefited greatly due to C. It made improving and maintaining UNIX very easy for any programmer who had an understanding of C. [1] Furthermore, it also made UNIX easily portable for newly developed computers. [1] This is mainly because it was unnecessary to convert the operating system to assemble language manually, but only required a C assembly compiler for that particular machine. [1] This compiler translates the code into machine code that the device understands. [1] C has gained a huge amount of success over the years and is still presently used in development. It is mainly known for its fast speed. [1] The C++ Programming Language The book â€Å"History of Programming Languages† also contains a paper written by Bjarne Stroustrup, the creator of C++.[9] In this paper, he narrates the history of the C++ programming language, focusing more on the ideas, limitation and â€Å"people that shaped the language†.[9] Prehistory More or less, Stroustrup begins his paper by stating that C++ was based on an â€Å"earlier version† of a programming language known as C with Classes.[10] However, before going into further detail, he begins discussing the prehistory of all this.[10] At Cambridge University, whilst working on his Ph.D that dealt with the study of different methods regarding the organization of software for a distributed system, Stroustrup focused on developing software â€Å"out of well-delimited modules† and also created experimental simulator â€Å"tool† in order to simulate â€Å"software running on a distributed system†.[10] This first version of the simulator was developed in Simula and ran on the Universitys IBM 360/165 mainframe.[10] It was very beneficial for Bjarne Stroustrup to use Simula, stating that: â€Å"the features of Simula were almost ideal for the purpose and I was particularly impressed by the way the concepts of the language helped me think about the problems in my application†.[10] Particularly, the behaviour of classes allowed Stroustrup to link directly the application of his ideas to the language constructs easily, especially due to the fact that classes in Simula are able to behave as co-routines.[10] He states that the use of class hierarchies enabled him to declare â€Å"variants of application level concepts†.[10] He continues by explaining further, through an example, that different types could be described as classes deriving from other classes.[10] The following are his exact words: â€Å"For example, different types of computers could be expressed as classes derived from class computer and different types of intermodule communication mechanisms could be expressed as class es derived from class IPC†.[10] Other benefits of Simula were its type scheme and the ability to detect type errors through its compiler.[10] The detection of a type error was either caused by some â€Å"silly† mistake, or due to some â€Å"conceptual flaw† in the design, in which both cases, especially the latter, helped Stroustrup greatly.[10] He had not experienced such beneficial use with other â€Å"more primitive strong type systems†.[10] Furthermore, referring to his simulator, when the program increased in size, due to Simulas class, co-routine and precise type checking mechanisms, flaws and errors would not grow alongside.[10] On the other hand, the implementation of Simula did not â€Å"scale in the same way† and nearly resulted in creating a disastrous program.[10] Stroustrup concluded that Simula was ideal for writing small programs but suffered â€Å"inherently† for larger ones due to its poor run-time performance characteristics.[10] Today, Simula implementations have improved greatly, but at that time, in order to avoid terminating the project, Stroustrup rewrote the simulator in BCPL.[10] He found programming in BCPL a very â€Å"horrible† experience, mainly due to its lack of type checking and run-time help.[10] However, once the simulator was developed, the program ran competitively fast.[10] Once he graduated from Cambridge, Bjarne Stroustrup promised himself that he would never attempt to solve a problem with those impractical tools as he had â€Å"suffered while designing and implementing the simulator†.[10] However he did define what is a â€Å"suitable tool† for writing system programs, which was highly significant when he was developing C++. [10] In Stroustrups eyes, a â€Å"suitable tool† involved the following characteristics.[10] Firstly, it would have Simulas support for program organisation and thus include classes, the ability to form class hierarchies, concurrency mechanisms, and a good type-checking scheme relating to classes.[10] Secondly, it must also be capable of producing programs possessing similar speed as to BCPL programs, and also allow the combination of independently compiled units into a program.[10] Lastly, it must allow the ability to create highly portable implementations.[10] C with Classes The undertaking, which eventually lead to developing C++, began in 1979, when Bjarne Stroustrup tried to understand the UNIX kernel, in order to find out the limit that could be distributed over a network of computer via a local area network (LAN).[11] This work took place in the Computer Science Research Center of Bell Laboratories.[11] With little time, Stroustrup faced two sub-problems, namely, â€Å"how to analyse the network traffic that would result from the kernel distribution and how to modularize the kernel†.[11] They both required a way to describe the model structure of a complicated system and the communication trends of the modules, issues extremely similar to the kind that Stroustrup was eager to never have to face again without the suitable tools.[11] Therefore, by referring to the criteria he had stated upon leaving Cambridge, Bjarne Stroustrup began to develop his own suitable tool.[11] By October of 1979, he had a preprocessor called Cpre. [11] Cpre was able to add â€Å"Simula-like classes to C†, and in March of 1980 this processor had been upgraded to actually support one â€Å"real project and several experiments†.[11] Later that year, between April and October, Stroustrup mentions that he let go of the ideal of â€Å"thinking about a tool† but rather began â€Å"thinking about a language†, to develop what is known as C with Classes.[11] However, initially, he did not consider C with Classes to be an independent language but just an expansion to C for â€Å"expressing modularity and concurrency†.[11] C with classes did not support primitives for expression.[11] Instead it included a mix of inheritance and offered a way to define class member functions with â€Å"special meanings† understood by the preprocessor, which was used to develop the library that handled the required â€Å"styles† of concurrency. Stroustrup emphasises on the word â€Å"styles† and that it is written in plural.[11] He found it vital that numerous notations of concurrency are able to be expressed in the language.[11] Backed by colleagues, other C++ users and the C++ standards committee, to this day he still believes that this was the right decision.[11] He then continues on this topic by stating that there in â€Å"no one dominant model for concurrency support†, and making use of a library or a special purpose extension for support on a particular form of concurrency would not limit others in using different forms.[11] Therefore, â€Å"the language provided general mechanisms for organising programs rather than support for specific application areas†.[11] It was not only in this instance that Bjarne Stroustrup did not force programmers to use a particular style.[11] C is capable of computing numerous low-level operations, such as bit manipulation and choosing between different sizes of integers.[11] Furthermore, although C++ systematically eliminates the need to use such low-level operators due to safety, they are still available for programmers to use, as Bjarne Stroustrup did not wish to restrict them in any way.[11] In fact, quoting his exact words, he states â€Å"I strongly felt then, as I still do, that there is no one right way of writing every program, and a language designer has no business trying to force programmers to use a particular style.[11] The language designer does, on the other hand, have an obligation to encourage and support a variety of styles and practices that have proven effective and to provide language features and tools to help programmers avoid the well known traps and pitfalls†.[11] Bjarne Stroustrup continues his paper by explaining further the features available to C with class, a language considered to be a stepping stone in creating C++.[11] C with Classes does not differ greatly compared to C.[11] Due to the fact that a preprocessor was used to implement C with Classes, the language differs only in the newly added features.[11] He lists these features which are shown as below. Note that the last three features were implemented in 1981, whilst the others were implemented one year earlier.[11] â€Å"classes†[11] â€Å"derived classes†[11] â€Å"public/private access control†[11] â€Å"constructors and destructors†[11] â€Å"call and Return functions†[11] â€Å"friend Classes†[11] â€Å"type Checking and Conversion of Function arguments†[11] â€Å"inline functions†[11] â€Å"default arguments†[11] â€Å"overloading of the assignment operator†[11] One of the major features offered by C with Classes was the idea of classes.[12] Stroustrup describes a class as a â€Å"user-defined data type†, meaning that it is a custom data type created by the programmer.[12] He continues by stating that â€Å"a class specifies the type of the class members that define the representation of a variable of the type, specifies the set of operations that manipulate such objects and specifies the access users have to these members†.[12] In other words, it simply defines the attributes and methods of a data type, including their access rights.[12] At that time, Simula did not support local or global variables of class types, and therefore objects of classes had to be â€Å"allocated on the free store using the new operator†.[12] After developing his simulator earlier in Cambridge, he considered Simulas lack of support on variables of class types as a â€Å"major source of inefficiency† at run-time.[12] Moreover, after some time, Karel Babcisky, who worked at the Norwegian Computer Centre, published information on â€Å"Simula run-time performance† that backed Stroustrups thinking. For this reason, Stroustrup wanted to support local and global variables of class types.[12] The first version of C with Classes did not support â€Å"Inline Functions†, and therefore was not initially advantageous of the languages representation. Stroustrup, in his book, â€Å"The C++ Programming Language†, describes an inline specifier on a function as a â€Å"hint† to the compiler that it should try to create code for a call.[5] He introduced inline functions to avoid programmers â€Å"crossing a protection barrier† that otherwise would result in not allowing the classes to be used hide representation.[12] Another concept, which Stroustrup thought about deeply, was the linkage model. Stroustrup starts explaining this by stating that to a certain extent, the way compiled programs might link to one another, â€Å"determines the features the language can provide†.[12] At the time of implementing C with Classes and C++, he had taken certain decisions regarding this issue. Firstly, that â€Å"separate compilation should be possible with traditional C/FORTRAN UNIX/DOS style linkers†.[12] Secondly, type safety should be checked on linkages.[12] Thirdly, it is not necessary for a linkage to need some sort of database, but a database could be beneficial in order to straighten the intended implementation.[12] Lastly, â€Å"linkage to program fragments written in other languages such as C, assembler and FORTRAN should be easy and efficient†.[12] Bjarne Stroustrup also added static types to his language implementation.[12] By his experience with Simula and ALGOL 68, he considered this to be essential in supporting static types.[12] The only difficulty for him was how to implement it.[12] In order not to break C code, Stroustrup decided that he would allow the â€Å"call of an undeclared function† and not test type safety on such â€Å"undeclared functions†.[12] However, this was a gaping hole in the type system and a great effort was made to lessen the problems relating to this issue.[12] C with Classes had lost the capability to detect run-time errors caused by â€Å"simple type errors†.[12] Due to the fact that most programmers that worked with C were reliable on type checks available, finding simple errors was tedious when programming in C with Classes.[12] Thus, a great demand arose to strengthen C with Classs type system.[12] Eventually, in C++ the issue had been solved by â€Å"making a call of an undeclared function illegal†.[12] Derived classes were also another concept which Stroustrup implemented.[14] However, the C with Classes language did not support Simulas concept of virtual function until later with the introduction of C++.[14] Similar to Simulas prefix class notion and Smalltalks subclass concept, C++ also supported derived classes.[14] However, Stroustrup gave the names â€Å"derived class† and â€Å"base class†, mainly due to the fact that he, along with others, had difficulty in recalling what was â€Å"sub† and what was â€Å"super†.[14] Furthermore, a number of people believed it to be â€Å"counterintuitive† as a subclass usually â€Å"has more inform than its superclass†.[14] Although there was no support of virtual functions within C with Classes, derived classes were beneficial for creating new data structures based on older ones and linking operations with the resulting types.[14] However, programmers could have simply used an object of a derived c lass and consider its base class as â€Å"implementation details†.[14] Towards the middle of his paper, Stroustrup mentions the reasons why he chose the programming language C to extend on, rather than Pascal.[13] Although he points out that C is not the â€Å"cleanest language ever designed nor the easiest to use†, he selected C due to its flexibility, efficiency, availability and portability.[13] C++ Between 1982 and 1984, Stroustrup developed the popular programming language C++. Initially known as C84, it was later changed to C++ because C84 was described by Stroustrup as â€Å"ugly† and â€Å"institutional†. Compared to C with Classes, C++ includes major upgrades and new features. Listed by Stroustrup, these major additions include: â€Å"Virtual functions†[15] â€Å"Function name and operator overloading†[15] â€Å"References†[15] â€Å"Constants (const)†[15] â€Å"User-controlled free-store memory control†[15] â€Å"Improved type checking†[15] The ability to overload an operator was in demand by many.[16] Stroustrup too liked the concept, and to him, â€Å"Operator overloading looked neat.[16] Although, through his experience of ALGOL 68, he had an idea on how overloading â€Å"could be made to work†, at first he was â€Å"reluctant†, to add it to C++.[16] The reason for this was that Overloading was known to be hard to implement and therefore resulted in compilers increasing in size.[16] It was also known to be â€Å"inherently inefficient† and made code â€Å"incomprehensible†.[16] However, if this reputation proved to be incorrect, Bjarne Stroustrup, at that time, admitted that overloading would solve a lot of C++ user problems.[16] He was convinced that overloading would not result in inherent inefficiency.[16] Furthermore, he mentions that â€Å"overloading makes code obscure† and it would make their code appear â€Å"cleaner†.[16] He also observed the way Overloading would w ork with classes, and he prepared manual papers to show that the added complexity would not pose any problems.[16] Due to all these reasons, in addition to two hours of work in implementing overloading in C front for demonstrations, Stroustrup had convinced himself to include overloading to C ++.[16] Among other features, the concept of referencing was added to C++.[16] References were initially added to support overloading.[16] C passed arguments by value.[16] If passing an object by value would result in inefficiency, the programmer is able to pass a pointer.[16] However, overloading operators did not permit this strategy.[16] Therefore, due to the fact that C ++ supports both pointers and references, it does not need means for â€Å"distinguishing operations on the reference itself from operations on the object referred to†.[16] From the initial version of C ++ to the C++ currently available today, a lot of updates and versions were released.[17] Version 2.0 was a great improvement.[17] Amongst other features, it mainly introduced abstract classes and multiple inheritance.[17] Multiple inheritance allows users to have more than one direct base class.[17] However, Stroustrup did admit that adding multiple inheritance in version 2.0 was a mistake, as he felt that this concept was less important than adding â€Å"parametrized types†.[17] Parametrized types were later added in version 3.0.[17] The Java Programming Language The Java Programming Language was developed by a team Sun Microsystems engineers, led by James Gosling[3]. The project started in 1991 and was released in 1995.[3] Prehistory Back in the late 1970s, Bill Joy, the man who many still believe was the first to come up with the â€Å"idea of a programming language that later became Java†, wanted to create a language that would consist of the best features of MESA and C.[3] Having attempted to re-write UNIX in 1980, he realised that C++ was â€Å"inadequate† to accomplish this task.[3] He wanted a much more powerful tool that is able to write short and effective programs. [3]This longing started to become a reality in 1991, when Sun Microsystems began to develop a language induced by Joys idea.[3] The Suns project was initially known as the â€Å"Stealth Project† named by Scott McNealy.[3] It was during January of that year, when James Gosling, Mike Sheradin, Patrick Naughton and Bill Joy, along with others, organized a meeting in Aspen Colorado, to discuss their ideas for this project.[3] The main aim of the Stealth Project was to conduct research in the area of computers use in the  "consumer electronics market.[3] The major objective was to create a â€Å"smart† consumer electronic device that would accept instructions from a â€Å"handheld-romote-control-like device†.[3] In Goslings words, he states that â€Å"the goal was †¦ to build a system that would let us do a large, distributed, heterogeneous network of consumer electronic devices all talking to each-other†.[3] The Stealth Project later came to be known as the Green Project.[3] The work that was done by the team was divided as follows: Mike Sheradin worked on business development, Patrick Naughton focused mainly on the graphics system, whilst James Gosling took the task of finding the proper language to use for the project. [3]Before joining Sun in 1984, James Gosling created â€Å"the commercially unsuccessful NeWs windowing system as well as GOSMACS†.[3] As described by the site, GOSMACS was â€Å"a C language implementation of GNU EMACS.[3] Oak Programming Language The language James Gosling initially had chosen to use for Green Project was C++.[3] However, after some time working on it, he found it inadequate for the required task.[3] Therefore, he began adding extensions and changes to C++, which were described as the first building blocks in developing an independent language that would fit ideally to achieve the projects objectives.[3] Gosling named the language â€Å"Oak†, while he was staring at an oak tree though his office window.[3] However, some time after, the name was abolished mainly due to the fact that the name had already been in use for another programming language.[3] In fact Gosling stated that â€Å"the Java development team discovered that Oak was the name of a programming language that predated Suns language, so another name had to be chosen†.[3] It was later called Java. Gosling recounted that â€Å"its surprisingly difficult to find a good n

Wednesday, October 2, 2019

Comparing James Joyces Araby and Ernest Hemingways A Clean, Well-Ligh

Comparing James Joyce's Araby and Ernest Hemingway's A Clean, Well-Lighted Place As divergent as James Joyce's "Araby" and Ernest Hemingway's "A Clean, Well-Lighted Place" are in style, they handle many of the same themes. Both stories explore hope, anguish, faith, and despair. While "Araby" depicts a youth being set up for his first great disappointment, and "A Clean, Well-Lighted Place" shows two older men who have long ago settled for despair, both stories use a number of analogous symbols, and lap over each other thematically. At the beginning of "Araby", the narrator describes the street's lamps as lifting their "feeble lanterns" towards an "ever-changing violet" sky (227). The colour violet is both dark and rich. The sky, this deep, mysterious colour, and always mutating, suggests the expanse of unknown beyond mortal experience. The feeble lights which fail to lick the lowest tufts of cloud resemble the people who look out into the fog of unanswerable questions; who can never hope to find anything but the shapes one reads in, like hillside skywatchers. The narrator's character goes around looking up. First at Mangan's sister: from the shadow, from the floor, and from the subordinate position of an admirer. Then, more metaphorically, he looks up to an image he's built for himself; an expectation of beauty and treasures; an enthusiastic hope or hopeful enthusiasm that his pilgrimage to Araby will yield him if not the answer (to the question which manifests as a nameless longing), then the key to the answer. This answer is represented by Mangan's sister (whose name is not mentioned, as with the Hebrew G-d), whom the boy hopes to access through the gesture of his quest.1 At the end, the boy looks up again, like the l... ...othing in it. Hemingway's old man walks away from the bar with dignity, but with hope long vanished. The older waiter, another faithless man, is resigned to nothingness. His mockery of Christian prayer is not angry, but spoken with a smile and a sigh. However, as indicated by his insomnia, Nada is a cold bedfellow. Works Cited Hemingway, Ernest. "A Clean, Well-Lighted Place". Kirszner and Mandell 233. Joyce, James. "Araby". Kirszner and Mandell 226. Kirszner, Laurie, and Stephen Mandell, eds. Literature: Reading, Reacting, Writing. Compact Fourth Edition. New York: Harcourt College Publishers, 2000. 1This character may also stand as a sexual symbol. The bracelet she handles when she speaks of the convent may suggest that she is shackled to Catholic prudery. In any case, she still stands as "the desired", physically or metaphysically.

Rudolf Diesel :: Essays Papers

Rudolf Diesel Rudolf Diesel is the man I chose for my hi-fi because I like cars and car engines. Rudolf diesel invented the diesel engine. I also chose Rudolf Diesel because when I went to look for a person for my hi-fi he was a man who I thought that no one else would chose. I thought that Rudolf diesel would also be a man who would be interesting. I like mechanical things and not people who discovered some place or some boring invention. I want to be a mechanical engineer so Rudolf Diesel fits right in with what I want to be. That is why I chose Rudolf Diesel for my hi-fi. Some of the things that I would like to learn about Rudolf Diesel is how he came up with the idea of making a diesel engine. I would also like to know where he was from and how old he was when he first thought up the design of the engine. I would like to know about his life like if he was married or not. I would also like to know what his life was like, if he was rich or if he was poor. If he had children, how many and if they were also inventors. I would also like to know how many improvements people have made on his original design and if they still use his basic design in modern times. I don’t know much about him at all but that he invented the diesel engine and his name. I also know that he was born in 1858 and died in 1913, he was German, a mechanical engineer, and that he patented the Diesel engine. That is what I think that I know and want to know about Rudolf Diesel. Some of the things that I would like to find out would be what kind of training he had, did he invent any other things, and what school did he go to in Europe. I would also like to know who he worked with on the engine or did he do it by himself. I would also like to know why he invented the diesel engine when they already had the gasoline engine. I would also like to know what the first diesel engine looked like and how big was it.

Tuesday, October 1, 2019

Reid Based Prepaid Energy Mater

chapter 1 [pic] 1. 1 Objectives of the Study Prepaid energy meter are being used worldwide to improve the collection of funds for the energy used. Weather it is developed nation or developing nation all electricity boards are facing two major issues 1. Power Theft 2. Collection of funds In the existing system the above two problems are non predictable and time consuming process respectively. To overcome these things in the proposed system Cal cards has developed and implemented as RFID based pre-paid energy meter. Cal card take information management to new heights with RFID technology.Using the state of the art technology, we can now write data into the RFID tag electronically. Using dual Authentication, Stream Encryption and other security features we restrict access to un-authorized personnel for any particular information. In this project three units are important they are RFID Card, RFID Reader and Writer. Tags are programmable and they may be read or read/write i. e. the inform ation stored in the tag’s memory cannot be changed or can be updated as required. The reader powers the antenna to generate radio frequency waves to transmit a signal that activates the tag and allows data to come into or leave the tag’s memory.This card can be designed to hold all amount details including Name of the family head, ID number, resident address and amount has been recharged. chapter 2 [pic] 2. 1 Methodology of the study Methodology: This System assigns a unique card number for each house. A particular house person places the RFID card within 5cm distance from the RFID Reader. The RFID Reader reads down the time, date and for how much amount it was recharged. The success of recharge will be indicated on the LCD display with buzzer acknowledgement sound.The display also indicates the current energy utilization. The Interface software is responsible for energy utilization record processing and calculation amount for the utilized energy. 2. 2 EMBEDDED SYSTEM: Embedded System is a combination of hardware and software used to achieve a single specific task. An embedded system is a microcontroller-based, software driven, reliable, real-time control system, autonomous, or human or network interactive, operating on diverse physical variables and in diverse environments and sold into a competitive and cost conscious market.An embedded system is not a computer system that is used primarily for processing, not a software system on PC or UNIX, not a traditional business or scientific application. High-end embedded & lower end embedded systems. High-end embedded system – Generally 32, 64 Bit Controllers used with OS. Examples Personal Digital Assistant and Mobile phones etc . Lower end embedded systems – Generally 8,16 Bit Controllers used with an minimal operating systems and hardware layout designed for the specific purpose. Examples Small controllers and devices in our everyday life like Washing Machine, Microwave Ovens, where th ey are embedded in.SYSTEM DESIGN CALLS:[pic] THE EMBEDDED SYSTEM DESIGN CYCLE: [pic] â€Å"V Diagram† In this place we need to discuss the role of simulation software, real-time systems and data acquisition in dynamic test applications. Traditional testing is referred to as â€Å"static† testing where functionality of components is tested by providing known inputs and measuring outputs. Today there is more pressure to get products to market faster and reduce design cycle times. This has led to a need for â€Å"dynamic† testing where components are tested while in use with the entire system – either real or simulated.Because of cost and safety concerns, simulating the rest of the the system with real-time hardware is preferred to testing components in the actual real system. The diagram shown on this slide is the â€Å"V Diagram† that is often used to describe the development cycle. Originally developed to encapsulate the design process of software applications, many different versions of this diagram can be found to describe different product design cycles. Here we have shown one example of such a diagram representing the design cycle of embedded control applications common to automotive, aerospace and defense applications.In this diagram the general progression in time of the development stages is shown from left to right. Note however that this is often an iterative process and the actual development will not proceed linearly through these steps. The goal of rapid development is to make this cycle as efficient as possible by minimizing the iterations required for a design. If the x-axis of the diagram is thought of as time, the goal is to narrow the â€Å"V† as much as possible and thereby reduce development time. The y-axis of this diagram can be thought of as the level at which the system components are considered.Early on in the development, the requirements of the overall system must be considered. As the system is divided into sub-systems and components, the process becomes very low-level down to the point of loading code onto individual processors. Afterwards components are integrated and tested together until such time that the entire system can enter final production testing. Therefore the top of the diagram represents the high-level system view and the bottom of the diagram represents a very low-level view. Notes: †¢ V diagram describes lots of applications—derived from software development. Reason for shape, every phase of design requires a complimentary test phase. High-level to low-level view of application. †¢ This is a simplified version. †¢ Loop Back/ Iterative process, X-axis is time (sum up). Characteristics of Embedded System: †¢ An embedded system is any computer system hidden inside a product other than a computer †¢ There will encounter a number of difficulties when writing embedded system software in addition to those we encounter when we wr ite applications – Throughput – Our system may need to handle a lot of data in a short period of time. Response–Our system may need to react to events quickly – Testability–Setting up equipment to test embedded software can be difficult – Debugability–Without a screen or a keyboard, finding out what the software is doing wrong (other than not working) is a troublesome problem – Reliability – embedded systems must be able to handle any situation without human intervention – Memory space – Memory is limited on embedded systems, and you must make the software and the data fit into whatever memory exists – Program installation – you will need special tools to get your oftware into embedded systems – Power consumption – Portable systems must run on battery power, and the software in these systems must conserve power – Processor hogs – computing that requires large amount s of CPU time can complicate the response problem – Cost – Reducing the cost of the hardware is a concern in many embedded system projects; software often operates on hardware that is barely adequate for the job. †¢ Embedded systems have a microprocessor/ microcontroller and a memory. Some have a serial port or a network connection. They usually do not have keyboards, screens or disk drives.APPLICATIONS: 1. Military and aerospace embedded software applications 2. Communication Applications 3. Industrial automation and process control software CLASSIFICATION: †¢ Real Time Systems. †¢ RTS is one which has to respond to events within a specified deadline. †¢ A right answer after the dead line is a wrong answer RTS CLASSIFICATION: †¢ Hard Real Time Systems †¢ Soft Real Time System HARD REAL TIME SYSTEM: †¢ â€Å"Hard† real-time systems have very narrow response time. †¢ Example: Nuclear power system, Cardiac pacemaker. SOFT RE AL TIME SYSTEM: â€Å"Soft† real-time systems have reduced constrains on â€Å"lateness† but still must operate very quickly and repeatable. †¢ Example: Railway reservation system – takes a few extra seconds the data remains valid. LANGUAGES USED: †¢ C †¢ C++ †¢ Java †¢ Linux †¢ Ada †¢ Assembly MPLAB FEATURES: MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the development of embedded applications employing Microchip's PIC ® and dsPIC ® microcontrollers. MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the development of embedded applications employing Microchip's PIC ® and dsPIC ® microcontrollers.MPLAB IDE runs as a 32-bit application on MS Windows ®, is easy to use and includes a host of free software components for fast application development and super-charged debugging. MPLAB IDE also serves as a single, unified graphical user interface for additio nal Microchip and third party software and hardware development tools. Moving between tools is a snap, and upgrading from the free software simulator to hardware debug and programming tools is done in a flash because MPLAB IDE has the same user interface for all tools.MPLAB IDE’s SIM, high speed software simulator for PIC and dsPIC (Digital Signal Processing PIC Microcontroller) devices with peripheral simulation, complex stimulus injection and register logging. CHAPTER 3 [pic] 3. 1 Block Diagram of RFID PREPAID energy meter BLOCK DIAGRAM 3. 2 Description of the Block Diagram The AC main Block is the power supply which is of single phase 230V ac. This should be given to step down transformer to reduce the 230V ac voltage to low voltage. i. e. , to 6V or 12V ac this value depends on the transformer inner winding. The output of the transformer is given to the rectifier circuit.This rectifier converts ac voltage to dc voltage. But the voltage may consist of ripples or harmonics. To avoid these ripples the output of the rectifier is connected to filter. The filter thus removes the harmonics. This is the exact dc voltage of the given specification. But the controller operates at 5V dc and the relays and driver operates at 12V dc voltage. So we need a regulator to reduce the voltage. 7805 regulator produces 5V dc. The 7805 regulator produces 5V dc and this voltage is given to PIC micro controller and sensors. The outputs of the sensors are also given to PIC micro controller.LCD, Keypad unit, SMART CARD read and write unit are connected to the controller. The controller reads the SMART CARD data from SMART CARD reader. The controller displays the data on LCD, depends upon the energy consumption the amount will be reduced. [pic] 3. 3 circuit diagram of RFID PREPAID energy meter: [pic] 3. 4 Circuit Description POWER SUPPLY: Power supply unit consists of Step down transformer, Rectifier, Input filter, Regulator unit, Output filter. The Step down Transformer is us ed to step down the main supply voltage from 230V AC to lower value.This 230 AC voltage cannot be used directly, thus it is stepped down. The Transformer consists of primary and secondary coils. To reduce or step down the voltage, the transformer is designed to contain less number of turns in its secondary core. The output from the secondary coil is also AC waveform. Thus the conversion from AC to DC is essential. This conversion is achieved by using the Rectifier Circuit/Unit. The Rectifier circuit is used to convert the AC voltage into its corresponding DC voltage. There are Half-Wave, Full-Wave and bridge Rectifiers available for this specific function.The most important and simple device used in Rectifier circuit is the diode. The simple function of the diode is to conduct when forward biased and not to conduct in reverse bias. The Forward Bias is achieved by connecting the diode’s positive with positive of the battery and negative with battery’s negative. The effi cient circuit used is the Full wave Bridge rectifier circuit. The output voltage of the rectifier is in rippled form, the ripples from the obtained DC voltage are removed using other circuits available. The circuit used for removing the ripples is called Filter circuit.Capacitors are used as filter. The ripples from the DC voltage are removed and pure DC voltage is obtained. And also these capacitors are used to reduce the harmonics of the input voltage. The primary action performed by capacitor is charging and discharging. It charges in positive half cycle of the AC voltage and it will discharge in negative half cycle. Here we used 1000 µF capacitor. So it allows only AC voltage and does not allow the DC voltage. This filter is fixed before the regulator. Thus the output is free from ripples. Regulator regulates the output voltage to be always constant.The output voltage is maintained irrespective of the fluctuations in the input AC voltage. As and then the AC voltage changes, th e DC voltage also changes. Thus to avoid this Regulators are used. Also when the internal resistance of the power supply is greater than 30 ohms, the output gets affected. Thus this can be successfully reduced here. The regulators are mainly classified for low voltage and for high voltage. Here we used 7805 positive regulators. It reduces the 6V dc voltage to 5V dc Voltage. The Filter circuit is often fixed after the Regulator circuit. Capacitor is most often used as filter.The principle of the capacitor is to charge and discharge. It charges during the positive half cycle of the AC voltage and discharges during the negative half cycle. So it allows only AC voltage and does not allow the DC voltage. This filter is fixed after the Regulator circuit to filter any of the possibly found ripples in the output received finally. Here we used 0. 1 µF capacitor. The output at this stage is 5V and is given to the Microcontroller Microcontroller and sensors are operated at 5V dc voltage. The output of the 7805 regulator is connected to PIC 16f877A microcontroller. Controller CircuitThe PIC 16f877A microcontroller is a 40-pin IC. The first pin of the controller is MCLR pin and the 5V dc supply is given to this pin through 10K? resistor. This supply is also given to 11th pin directly. The 12th pin of the controller is grounded. A tank circuit consists of a 4 MHZ crystal oscillator and two 22pf capacitors is connected to 13th and 14th pins of the PIC. The circuit consists of MAX-232 IC. It is a 16-pin dual in package IC. The 11th and 12th pins of MAX-232 IC are connected to the 25th and 26th pins of the PIC microcontroller. These are receiver OUT and Transmitter IN pins respectively.LCD is connected to the RC0 to RD7 pins of the PIC microcontroller. 13th, 14th and 15th pins of the MAX-232 IC are connected to the smart card read Buffer. The Keypad unit connected to the RB0 to RB3 pins of the PIC micro controller. The keypad unit consists of 4 switches. One is for menu, sec ond is Exit, third one is for Clear and the other is for Day Increment. MAX-232 IC is used to convert the voltage from 5V to 10V and 10V to 5V. This IC is used to communicate with the PC. It also acts as voltage converter. The LCD used here is to display the Attendance details. [pic] 3. 5 CIRCUIT OPERATIONThe input of the circuit is taken from the main. It is a single phase 230V ac voltage. This 230 AC voltage cannot be used directly, thus it is stepped down. The Step down Transformer is used to step down the main supply voltage from 230V AC to lower value. Because the microcontroller and sensors are operated at +5V dc voltage and relays and drivers will be operate at +12V dc voltage. So first this 230C AC voltage should be stepped down and then it should be converted to dc. After converting to dc it is applied to controller, sensors, relays and drivers. In this project we used 230/12V step down transformer.In this circuit we used two regulators. 7805 regulator for producing 5V dc, and 7812 regulators for 12V dc voltage. The output of 7805 regulators is given to PIC microcontroller and three sensors. The output of the 7812 regulator is connected to driver IC and a Relay. The main parts of this project are smart card and PIC micro controller. The coding will be installed to microcontroller through PIC Flash micro systems compiler unit. The crystal oscillator is used to generate the clock pulses to the PIC micro controller. The speed of the microcontroller depends upon the value of the crystal oscillator.In this project we used the 4 MHz crystal oscillator. Whenever recharged smart card shown in front of the reader the data from card will be read and send to controller through reader. The controller confirms whether it is old or new card. After this it will automatically open the lock to use EB power supply. If the wrong card shown, controller activate the alarm. Depends on the energy consumption the amount will reduced by the controller, when its come to below zero the controller automatically cut down the EB power supply through driver unit. In the driver unit ULN2003 is used as driver to driver the 12v relay.We inserted the process into the controller through coding. Coding was developed in Embedded ‘C’ Language. CHAPTER 4 [pic] 4. 1 Hardware Requirements: 1. Power supply unit 2. Microcontroller 3. MAX-232 IC 4. LCD 5. Keypad Unit 4. 2 POWER SUPPLY UNIT: Circuit Diagram [pic] Power supply unit consists of following units i) Step down transformer ii) Rectifier unit iii) Input filter iv) Regulator unit v) Output filter 4. 3. 1 Stepdown transformer: The Step down Transformer is used to step down the main supply voltage from 230V AC to lower value. This 230 AC voltage cannot be used directly, thus it is stepped down.The Transformer consists of primary and secondary coils. To reduce or step down the voltage, the transformer is designed to contain less number of turns in its secondary core. The output from the secondary coil is a lso AC waveform. Thus the conversion from AC to DC is essential. This conversion is achieved by using the Rectifier Circuit/Unit. 4. 3. 2 Rectifier Unit: The Rectifier circuit is used to convert the AC voltage into its corresponding DC voltage. There are Half-Wave, Full-Wave and bridge Rectifiers available for this specific function. The most important and simple device used in Rectifier circuit is the diode.The simple function of the diode is to conduct when forward biased and not to conduct in reverse bias. The Forward Bias is achieved by connecting the diode’s positive with positive of the battery and negative with battery’s negative. The efficient circuit used is the Full wave Bridge rectifier circuit. The output voltage of the rectifier is in rippled form, the ripples from the obtained DC voltage are removed using other circuits available. The circuit used for removing the ripples is called Filter circuit. 4. 3. 3 Input Filter: Capacitors are used as filter.The ri pples from the DC voltage are removed and pure DC voltage is obtained. And also these capacitors are used to reduce the harmonics of the input voltage. The primary action performed by capacitor is charging and discharging. It charges in positive half cycle of the AC voltage and it will discharge in negative half cycle. So it allows only AC voltage and does not allow the DC voltage. This filter is fixed before the regulator. Thus the output is free from ripples. 4. 3. 4 Regulator unit: [pic] 7805 Regulator Regulator regulates the output voltage to be always constant.The output voltage is maintained irrespective of the fluctuations in the input AC voltage. As and then the AC voltage changes, the DC voltage also changes. Thus to avoid this Regulators are used. Also when the internal resistance of the power supply is greater than 30 ohms, the output gets affected. Thus this can be successfully reduced here. The regulators are mainly classified for low voltage and for high voltage. Furth er they can also be classified as: i) Positive regulator 1—> input pin 2—> ground pin 3—> output pin It regulates the positive voltage. ii) Negative regulator —> ground pin 2—> input pin 3—> output pin It regulates the negative voltage. 4. 3. 5 Output Filter: The Filter circuit is often fixed after the Regulator circuit. Capacitor is most often used as filter. The principle of the capacitor is to charge and discharge. It charges during the positive half cycle of the AC voltage and discharges during the negative half cycle. So it allows only AC voltage and does not allow the DC voltage. This filter is fixed after the Regulator circuit to filter any of the possibly found ripples in the output received finally. Here we used 0. 1 µF capacitor.The output at this stage is 5V and is given to the Microcontroller. 4. 4 MICRO CONTROLLER: A computer-on-a-chip is a variation of a microprocessor which combines the processor core (CPU), some memory, and I/O (input/output) lines, all on one chip. The computer-on-a-chip is called the microcomputer whose proper meaning is a computer using a (number of) microprocessor(s) as its CPUs, while the concept of the microcomputer is known to be a microcontroller. A microcontroller can be viewed as a set of digital logic circuits integrated on a single silicon chip. This chip is used for only specific applications. . 4. 1 ADVANTAGES OF USING A MICROCONTROLLER OVER MICROPROCESSOR: A designer will use a Microcontroller to 1. Gather input from various sensors 2. Process this input into a set of actions 3. Use the output mechanisms on the Microcontroller to do something useful 4. RAM and ROM are inbuilt in the MC. 5. Cheap compared to MP. 6. Multi machine control is possible simultaneously. Examples: 8051 (ATMAL), PIC (Microchip), Motorola (Motorola), ARM Processor, Applications: Cell phones, Computers, Robots, Interfacing to two pc’s. 4. 4. 2 Microcontroller Core Features: †¢ High-per formance RISC CPU. Only 35 single word instructions to learn. †¢ All single cycle instructions except for program branches which are two cycle. †¢ Operating speed: DC – 20 MHz clock input DC – 200 ns instruction cycle. †¢ Up to 8K x 14 words of FLASH Program Memory, Up to 368 x 8 bytes of Data Memory (RAM) Up to 256 x 8 bytes of EEPROM data memory. †¢ Pin out compatible to the PIC16C73B/74B/76/77 †¢ Interrupt capability (up to 14 sources) †¢ Eight level deep hardware stack †¢ Direct, indirect and relative addressing modes. †¢ Power-on Reset (POR). †¢ Power-up Timer (PWRT) and Oscillator Start-up Timer (OST). Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation. †¢ Programmable code-protection. †¢ Power saving SLEEP mode. †¢ Selectable oscillator options. †¢ Low-power, high-speed CMOS FLASH/EEPROM technology. †¢ Fully static design. †¢ In-Circuit Serial Programming (ICSP ) . †¢ Single 5V In-Circuit Serial Programming capability. †¢ In-Circuit Debugging via two pins. †¢ Processor read/write access to program memory. †¢ Wide operating voltage range: 2. 0V to 5. 5V. †¢ High Sink/Source Current: 25 mA. †¢ Commercial and Industrial temperature ranges. †¢ Low-power consumption.In this project we used PIC 16f877A microcontroller. PIC means Peripheral Interface Controller. The PIC family having different series. The series are 12- Series, 14- Series, 16- Series, 18- Series, and 24- Series. We used 16 Series PIC microcontroller. 3. PIC MICROCONTROLLER 16F877A 1. INTRODUCTION TO PIC MICROCONTROLLER 16F877A The PIC 16f877A microcontroller is a 40-pin IC. The first pin of the controller is MCLR pin and the 5V dc supply is given to this pin through 10K? resistor. This supply is also given to 11th pin directly. The 12th pin of the controller is grounded.A tank circuit consists of a 4 MHZ crystal oscillator and two 22pf capacitor s is connected to 13th and 14th pins of the PIC. 2. FEATURES OF PIC MICROCONTROLLER 16F877A †¢ Operating frequency: DC-20Mhz. †¢ Flash program memory (14 bit words):8K †¢ Data memory (in bytes): 368 †¢ EEPROM Data memory (in bytes):256 †¢ Interrupts: 15 †¢ I/o ports: A, B, C, D, E †¢ Timers: 3 †¢ Analog comparators: 2 †¢ Instructions: 35 4. 3. 3 pin diagram of pic 16f874a/877a: [pic] 4. 3. 4 FUNCTIONAL BLOCK DIAGRAM OF PIC 16F877A [pic] 4. 4 LCD Display: Liquid crystal display (LCD) has material which combines the properties of both liquid and crystals.They have a temperature range within which the molecules are almost as mobile as they would be in a liquid, but are grouped together in an order form similar to a crystal. LCD DISPLAY: [pic] More microcontroller devices are using ‘smart LCD' displays to output visual information. The following discussion covers the connection of a Hitachi LCD display to a PIC microcontroller. LCD disp lays designed around Hitachi's LCD HD44780 module, are inexpensive, easy to use, and it is even possible to produce a readout using the 8 x 80 pixels of the display.Hitachi LCD displays have a standard ASCII set of characters plus Japanese, Greek and mathematical symbols. For an 8-bit data bus, the display requires a +5V supply plus 11 I/O lines. For a 4-bit data bus it only requires the supply lines plus seven extra lines. When the LCD display is not enabled, data lines are tri-state which means they are in a state of high impedance (as though they are disconnected) and this means they do not interfere with the operation of the microcontroller when the display is not being addressed. The LCD also requires 3 â€Å"control† lines from the microcontroller. Enable (E) |This  line allows access to the display through R/W and RS lines. When this line is low, the LCD is disabled and | | |ignores signals from R/W and RS. When (E) line is high, the LCD checks the state of the two c ontrol lines and | | |responds accordingly. | |Read/Write (R/W) |This line determines the direction of data between the LCD and microcontroller. When it is low, data is written | | |to the LCD. When it is high, data is read from the LCD. |Register select (RS) |With the help of this line, the LCD interprets the type of data on data lines. When it is low, an instruction is | | |being written to the LCD. When it is high, a character is being written to the LCD. | Logic status on control lines: E  Ã‚  Ã‚  Ã‚   0 Access to LCD disabled 1 Access to LCD enabled R/W 0 Writing data to LCD 1 Reading data from LCD RS  Ã‚  Ã‚   0 Instruction 1 Character Writing data to the LCD is done in several steps: Set R/W bit to low Set RS bit to logic 0 or 1 (instruction or character) Set data to data lines (if it is writing) Set E line to highSet E line to low Read data from data lines (if it is reading). Reading data from the LCD is done in the same way, but control line R/W has to be high. When we send a high to the LCD, it will reset and wait for instructions. Typical instructions sent to LCD display after a reset are: turning on a display, turning on a cursor and writing characters from left to right. When the LCD is initialized, it is ready to continue receiving data or instructions. If it receives a character, it will write it on the display and move the cursor one space to the right. The Cursor marks the next location where a character will be written.When we want to write a string of characters, first we need to set up the starting address, and then send one character at a time. Characters that can be shown on the display are stored in data display (DD) RAM. The size of DDRAM is 80 bytes. |The LCD display also possesses 64 bytes of Character-Generator (CG)|[pic] | |RAM. This memory is used for characters defined by the user. Data | | |in CG RAM is represented as an 8-bit character bit-map.Each | | |character takes up 8 bytes of CG RAM, so the total number of | | |ch aracters, which the user can define, is eight. In order to read | | |in the character bit-map to the LCD display, we must first set the | | |CG RAM address to starting point (usually 0), and then write data | | |to the display.The definition of a ‘special' character is given in| | |the picture. | | Before we access DD RAM after defining a special character, the program must set the DD RAM address. Writing and reading data from any LCD memory is done from the last address which was set up using set-address instruction. Once the address of DD RAM is set, a new written character will be displayed at the appropriate place on the screen.Until now we discussed the operation of writing and reading to an LCD as if it were an ordinary memory. But this is not so. The LCD controller needs 40 to 120 microseconds (uS) for writing and reading. Other operations can take up to 5 mS. During that time, the microcontroller can not access the LCD, so a program needs to know when the LCD is bu sy. We can solve this in two ways. One way is to check the BUSY bit found on data line D7. This is not the best method because LCD's can get stuck, and program will then stay forever in a loop checking the BUSY bit. The other way is to introduce a delay in the program.The delay has to be long enough for the LCD to finish the operation in process. Instructions for writing to and reading from an LCD memory are shown in the previous table. At the beginning we mentioned that we needed 11 I/O lines to communicate with an LCD. However, we can communicate with an LCD through a 4-bit data bus. Thus we can reduce the total number of communication lines to seven. The wiring for connection via a 4-bit data bus is shown in the diagram below. In this example we use an LCD display with 2Ãâ€"16 characters, labeled LM16X212 by Japanese maker SHARP.The message ‘character' is written in the first row: and two special characters ‘~' and ‘}' are displayed. In the second row we have p roduced the word ‘mikroElektronika'. INTERFACING PIC MICROCONTROLLER TO LCD: [pic] 4. 5 DESIGN OF EMBEDDED SYSTEM Like every other system development design cycle embedded system too have a design cycle. The flow of the system will be like as given below. For any design cycle these will be the implementation steps. From the initial state of the project to the final fabrication the design considerations will be taken like the software consideration and the hardware components, sensor, input and output.The electronics usually uses either a microprocessor or a microcontroller. Some large or old systems use general-purpose mainframe computers or minicomputers. User Interfaces: User interfaces for embedded systems vary widely, and thus deserve some special comment. User interface is the ultimate aim for an embedded module as to the user to check the output with complete convenience. One standard interface, widely used in embedded systems, uses two buttons (the absolute minimum) to control a menu system (just to be clear, one button should be â€Å"next menu entry† the other button should be â€Å"select this menu entry†).Another basic trick is to minimize and simplify the type of output. Designs sometimes use a status light for each interface plug, or failure condition, to tell what failed. A cheap variation is to have two light bars with a printed matrix of errors that they select- the user can glue on the labels for the language that he speaks. For example, most small computer printers use lights labeled with stick-on labels that can be printed in any language. In some markets, these are delivered with several sets of labels, so customers can pick the most comfortable language.In many organizations, one person approves the user interface. Often this is a customer, the major distributor or someone directly responsible for selling the system. PLATFORM: There are many different CPU architectures used in embedded designs such as ARM, MIPS, Coldfir e/68k, PowerPC, X86, PIC, 8051, Atmel AVR, H8, SH, V850, FR-V, M32R etc. This in contrast to the desktop computer market, which as of this writing (2003) is limited to just a few competing architectures, mainly the Intel/AMD x86, and the Apple/Motorola/IBM PowerPC, used in the Apple Macintosh.With the growing acceptance of Java in this field, there is a tendency to even further eliminate the dependency on specific CPU/hardware (and OS) requirements. Standard PC/104 is a typical base for small, low-volume embedded and rugged zed system design. These often use DOS, Linux or an embedded real-time operating system such as QNX or Inferno. A common configuration for very-high-volume embedded systems is the system on a chip, an application-specific integrated circuit, for which the CPU was purchased as intellectual property to add to the IC's design.A related common scheme is to use a field-programmable gate array, and program it with all the logic, including the CPU. Most modern FPGAs are designed for this purpose. Tools: Like typical computer programmers, embedded system designers use compilers, assemblers, and debuggers to develop embedded system software. However, they also use a few tools that are unfamiliar to most programmers. Software tools can come from several sources: †¢ Software companies that specialize in the embedded market. †¢ Ported from the GNU software development tools.Sometimes, development tools for a personal computer can be used if the embedded processor is a close relative to a common PC processor. Embedded system designers also use a few software tools rarely used by typical computer programmers. One common tool is an â€Å"in-circuit emulator† (ICE) or, in more modern designs, an embedded debugger. This debugging tool is the fundamental trick used to develop embedded code. It replaces or plugs into the microprocessor, and provides facilities to quickly load and debug experimental code in the system. A small pod usually prov ides the special electronics to plug into the system.Often a personal computer with special software attaches to the pod to provide the debugging interface. Another common tool is a utility program (often home-grown) to add a checksum or CRC to a program, so it can check its program data before executing it. An embedded programmer that develops software for digital signal processing often has a math workbench such as MathCad or Mathematica to simulate the mathematics. Less common are utility programs to turn data files into code, so one can include any kind of data in a program. A few projects use Synchronous programming languages for extra reliability or digital signal processing.DEBUGGING: Debugging is usually performed with an in-circuit emulator, or some type of debugger that can interrupt the microcontroller's internal microcode. The microcode interrupt lets the debugger operate in hardware in which only the CPU works. The CPU-based debugger can be used to test and debug the el ectronics of the computer from the viewpoint of the CPU. This feature was pioneered on the PDP-11. As the complexity of embedded systems grows, higher level tools and operating systems are migrating into machinery where it makes sense.For example, cell phones, personal digital assistants and other consumer computers often need significant software that is purchased or provided by a person other than the manufacturer of the electronics. In these systems, an open programming environment such as Linux, OSGi or Embedded Java is required so that the third-party software provider can sell to a large market. OPERATING SYSTEM: Embedded systems often have no operating system, or a specialized embedded operating system (often a real-time operating system), or the programmer is assigned to port one of these to the new system.BUILT- IN SELF- TEST: Most embedded systems have some degree or amount of built-in self-test. There are several basic types. 1. Testing the computer. 2. Test of peripheral s. 3. Tests of power. 4. Communication tests. 5. Cabling tests. 6. Rigging tests. 7. Consumables test. 8. Operational test. 9. Safety test. START UP: All embedded systems have start-up code. Usually it disables interrupts, sets up the electronics, tests the computer (RAM, CPU and software), and then starts the application code. Many embedded systems recover from short-term power failures by restarting (without recent self-tests).Restart times under a tenth of a second are common. Many designers have found a few LEDs useful to indicate errors (they help troubleshooting). A common scheme is to have the electronics turn on all of the LED(s) at reset (thereby proving that power is applied and the LEDs themselves work), whereupon the software changes the LED pattern as the Power-On Self Test executes. After that, the software may blink the LED(s) or set up light patterns during normal operation to indicate program execution progress or errors. This serves to reassure most technicians/eng ineers and some users.An interesting exception is that on electric power meters and other items on the street, blinking lights are known to attract attention and vandalism. CHAPTER 5 [pic] 5. 1 Software Tools: 1. MPLAB 2. Protel 3. Propic 4. HI-Tech PIC C Compiler 5. 2 MPLAB Integration: MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the development of embedded applications employing Microchip's PIC micro and dsPIC microcontrollers. MPLAB IDE runs as a 32-bit application on MS Windows, is easy to use and includes a host of free software components for fast application development and super-charged debugging.MPLAB IDE also serves as a single, unified graphical user interface for additional Microchip and third party software and hardware development tools. Moving between tools is a snap, and upgrading from the free simulator to MPLAB ICD 2 or the MPLAB ICE emulator is done in a flash because MPLAB IDE has the same user interface for all tools. Choose MPLAB C18, the highly optimized compiler for the PIC18 series microcontrollers, or try the newest Microchip's language tools compiler, MPLAB C30, targeted at the high performance PIC24 and dsPIC digital signal controllers.Or, use one of the many products from third party language tools vendors. They integrate into MPLAB IDE to function transparently from the MPLAB project manager, editor and compiler. 5. 3 INTRODUCTION TO EMBEDDED ‘C’: Ex: Hitec – c, Keil – c HI-TECH Software makes industrial-strength software development tools and C compilers that help software developers write compact, efficient embedded processor code. For over two decades HI-TECH Software has delivered the industry's most reliable embedded software development tools and compilers for writing efficient and compact code to run on the most popular embedded processors.Used by tens of thousands of customers including General Motors, Whirlpool, Qualcomm, John Deere and many others, HI-TECH's reliable development tools and C compilers, combined with world-class support have helped serious embedded software programmers to create hundreds of breakthrough new solutions. Whichever embedded processor family you are targeting with your software, whether it is the ARM, PICC or 8051 series, HI-TECH tools and C compilers can help you write better code and bring it to market faster. HI-TECH PICC is a high-performance C compiler for the Microchip PIC micro 10/12/14/16/17 series of microcontrollers.HI-TECH PICC is an industrial-strength ANSI C compiler – not a subset implementation like some other PIC compilers. The PICC compiler implements full ISO/ANSI C, with the exception of recursion. All data types are supported including 24 and 32 bit IEEE standard floating point. HI-TECH PICC makes full use of specific PIC features and using an intelligent optimizer, can generate high-quality code easily rivaling hand-written assembler. Automatic handling of page and bank selection f rees the programmer from the trivial details of assembler code. 5. 4 Embedded C Compiler: ? ANSI C – full featured and portable Reliable – mature, field-proven technology ? Multiple C optimization levels ? An optimizing assembler ? Full linker, with overlaying of local variables to minimize RAM usage ? Comprehensive C library with all source code provided ? Includes support for 24-bit and 32-bit IEEE floating point and 32-bit long data types ? Mixed C and assembler programming ? Unlimited number of source files ? Listings showing generated assembler ? Compatible – integrates into the MPLAB IDE, MPLAB ICD and most 3rd-party development tools ? Runs on multiple platforms: Windows, Linux, UNIX, Mac OS X, Solaris Embedded Development Environment:PICC can be run entirely from the. This environment allows you to manage all of your PIC projects. You can compile, assemble and link your embedded application with a single step. Optionally, the compiler may be run directly from the command line, allowing you to compile, assemble and link using one command. This enables the compiler to be integrated into third party development environments, such as Microchip's MPLAB IDE. 5. 5 Embedded system tools: 5. 5. 1 Assembler: An assembler is a computer program for translating assembly language — essentially, a mnemonic representation of machine language — into object code.A cross assembler (see cross compiler) produces code for one type of processor, but runs on another. The computational step where an assembler is run is known as assembly time. Translating assembly instruction mnemonics into opcodes, assemblers provide the ability to use symbolic names for memory locations (saving tedious calculations and manually updating addresses when a program is slightly modified), and macro facilities for performing textual substitution — typically used to encode common short sequences of instructions to run inline instead of in a subroutine.Assemb lers are far simpler to write than compilers for high-level languages. Assembly language has several benefits: †¢ Speed: Assembly language programs are generally the fastest programs around. †¢ Space: Assembly language programs are often the smallest. †¢ Capability: You can do things in assembly which are difficult or impossible in High level languages. †¢ Knowledge: Your knowledge of assembly language will help you write better programs, even when using High level languages. An example of an assembler we use in our project is RAD 51. . 5. 2 Simulator: Simulator is a machine that simulates an environment for the purpose of training or research. We use a UMPS simulator for this purpose in our project. 5. 5. 3 UMPS: Universal microprocessor program simulator simulates a microcontroller with its external environment. UMPS is able to simulate external components connected to the microcontroller. Then, debug step is dramatically reduced. UMPS is not dedicated to only one microcontroller family, it can simulate all kind of microcontrollers.The main limitation is to have less than 64K-Bytes of RAM and ROM space and the good microcontroller library. UMPS provide all the facilities other low-cost simulator does not have. It offers the user to see the â€Å"real effect† of a program and a way to change the microcontroller family without changing IDE. UMPS provide a low-cost solution to the problems. UMPS is really the best solution to your evaluation. 5. 5. 4 UMPS key features: -The speed, UMPS can run as fast as 1/5 the real microcontroller speed. No need to wait 2 days to see the result of a LCD routine access.All the microcontroller parts are simulated, interrupts, communication protocol, parallel handshake, timer and so on. – UMPS have an integrated assembler/disassembler and debugger. It is able to accept an external assembler or compiler. It has a text editor which is not limited to 64K-bytes and shows keyword with color. It can a lso communicate with an external compiler to integrate all the debug facilities you need. – UMPS is universal, it can easily be extended to other microcontroller with a library. Ask us for toolkit development. – External resource simulation is not limited.It can be extended to your proper needs by writing your own DLL. – UMPS allows you to evaluate at the lowest cost the possibility to build a microcontroller project without any cable. – UMPS include a complete documentation on each microcontroller which describe special registers and each instruction 5. 5. 5 Compiler: A compiler is a program that reads a program in one language, the source language and translates into an equivalent program in another language, the target language. The translation process should also report the presence of errors in the source program. Source Program |> |  Compiler |> |Target Program | |   |   |v |   |   | |   |   |Error Messages |   |   | There are two parts of compilation. The analysis part breaks up the source program into constant piece and creates an intermediate representation of the source program. The synthesis part constructs the desired target program from the intermediate representation. 5. 5. 6 The cousins of the compiler are: 1. Preprocessor. 2.Assembler. 3. Loader and Link-editor. A naive approach to that front end might run the phases serially. 1. Lexical analyzer takes the source program as an input and produces a long string of tokens. 2. Syntax Analyzer takes an out of lexical analyzer and produces a large tree. Semantic analyzer takes the output of syntax analyzer and produces another tree. Similarly, intermediate code generator takes a tree as an input produced by semantic analyzer and produces  intermediate code 5. 5. 7 Phases of compiler: The compiler has a number of phases plus symbol table manager and an error handler.    |   |Input Source Program |   |   | |   |   |v |   |   | |   |   |Lexical Analyzer |   |   | |   |   |v |   |   | |   |   |Syntax Analyzer |   |   | |   |   |v |   |   | |Symbol Table Manager |   |Semantic Analyzer |   |  Error Handler | |   |   |v |   |   | |   |   |Intermediate Code |   |   | | | |Generator | | | |   |   |v |   |   | |   | Code Optimizer |   |   | |   |   |v |   |   | |   |   |Code Generator |   |   | |   |   |v |   |   | |   |   |Out Target Program |   |   | 5. 6 FABRICATION DETAILS The fabrication of one demonstration unit is carried out in the following sequence. ? Finalizing the total circuit diagram, listing out the components and sources of procurement. ? Procuring the components, testing the components and screening the components. ? Making layout, repairing the interconnection diagram as per the circuit diagram. Assembling the components as per the component layout and circuit diagram and soldering components. ? Integrating t he total unit, intertwining the unit and final testing the unit. CHAPTER 7 CONCLUSION The System RFID BASED ENERGY is developed and operated successfully in the laboratory. The prepaid energy meter was working properly and perfectly. The circuit having potential and current transformers which gives the power consumption in analog form. This is converted to digital and the converted one is again converted into KWH form i. e one unit. According to the tariff rates stored in the microcontroller, The consumed units and cost are displayed on the LCD. Future enhancements: Our project is just to caluculate the reading i. consumed power and caluculate the cost and then display the cost on the LCD. In future this circuit can also be used as a prepaid energy meter using a smart type arrangement. For we want to add a smart card reader and relay in extra. Due to this every customer has a smart card with some credits and after completing these credits we again go to EB and recharge the card. The energy meter reading can be send to the EB by implementing small kind of SCADA system, using this the readings can be straightly monitor by the EB. CODE: #include;pic. h; #include†lcd_16x4. c† __CONFIG(XT & WDTDIS & PWRTDIS & BORDIS & LVPDIS & WRTEN & DEBUGDIS & DUNPROT & UNPROTECT); void init(); oid ADC_VTG_CT(); void ADC_VTG_CT1(); void disp_meter(); void delay(); write_eeprom(unsigned char add,unsigned int data); unsigned int read_eeprom(unsigned char add); unsigned int i, j,bal,gsmcost, curt,vltg,crt,tmp,tmp1,k,fcrt,escp,cap_time,testeng,Engeeprom,tempvalue,ROTabv100=0,ROTupt100=0; bank2 unsigned char mill_count,tick1=0,h[15],rec=0; bank1 unsigned char sec, min,hr,check1,VHUDS,VTENS,VONES,CHUDS, CTENS, CONES,COLACK,COTENTH, ETHOD,EHUDS,ETENS,EONES,COTHOD,COHUDS,COTENS,COONES,EEONES,EETHOD,EETENS,EEHUDS,EELACK,EETENTH,unteeprom,unit,var=0,u11,u12,u13; unsigned char tm,tt,th,ctl; float cpwt1,cpwt2,Energy,Cost_engy,Cost; bit check_dev,card_present; ank2 unsigned char q t,msg,n,set1=0,set2=0,set3=0,set,set4=0,tab,cap,cap1,cap2,eeprom_erase_cnt; unsigned interrupt isr(void) { if(TMR1IF) { TMR1IF=0; mill_count++; //mill_count, scan_count, keypress, check, keyok,key if(mill_count;=25) { mill_count=0; sec++; if(sec;=59) { tick1=1; sec =0; ctl=1; min++; if(min;59) { min=0; hr++; if(hr;23) { hr=0; } } } }//mill_count }//TMR1IF if(RCIF==1) { h[rec]=RCREG; rec++; if(rec==12) { card_present=1; rec=0; } RCIF=0; } } void main() { init(); RC4=0; while(1) { lcd_move(0,0); lcd_puts(â€Å"Energy Meter†); RC4=0; if(card_present==1) { lcd_move(1,0); lcd_puts(â€Å"Recharged:†); if(h[9]==51) { lcd_move(1,10); lcd_puts(â€Å"Rs. 100†); or(j=0;j;=45000;j++); for(j=0;j;=45000;j++); gsmcost= 100; set1=1; card_present==0; lcd_clear(); } if(h[9]==56) { lcd_move(1,10); lcd_puts(â€Å"Rs. 50 â€Å"); for(j=0;j;=45000;j++); for(j=0;j;=45000;j++); gsmcost= 50; set1=1; card_present==0; lcd_clear(); } } while(set1==1) //&& SW==1) { //while(SW==1); lcd_mov e(0,0); lcd_puts(â€Å"Energy Meter†); COLACK =read_eeprom(0x00); COTENTH =read_eeprom(0x01); COTHOD =read_eeprom(0x02); COHUDS =read_eeprom(0x03); COTENS =read_eeprom(0x04); COONES =read_eeprom(0x05); Engeeprom = ((COLACK*100000)+(COTENTH*10000)+(COTHOD*1000)+(CHUDS *100)+(COTENS *10)+COONES); unteeprom =read_eeprom(0x06); ROTupt100 =read_eeprom(0x07);ROTabv100 =read_eeprom(0x08); disp_meter(); RC4=1; DelayMs(10); ADC_VTG_CT(); } while(set2) { lcd_move(0,0); //lcd_putn(check1); disp_meter(); ADC_VTG_CT1(); lcd_move(0,0); lcd_puts(â€Å"vtg:†); lcd_write(VHUDS+0x30); lcd_write(VTENS+0x30); lcd_write(VONES+0x30); lcd_move(0,8); lcd_puts(â€Å"crt:†); lcd_write(CHUDS+0x30); lcd_puts(â€Å". â€Å"); lcd_write(CTENS+0x30); lcd_write(CONES+0x30); RC4=1; DelayMs(10); if(curt) { tm = min – cap_time; //check1=1; if(min ; 58) { th++; } tt = (th*60)+tm; if(ctl==1) { ctl=0; //check1=2; Energy = ((vltg * curt *(float)tt)/100000); Energy = Energy*1000; testeng = (i nt)Energy; Energy = Energy/1000; Cost = Energy * cpwt1;Cost_engy = Cost + Cost_engy; bal = gsmcost – Cost_engy ; Cost_engy = Cost_engy*1000; Engeeprom = (int)Cost_engy; //bal = gsmcost – Engeeprom ; fcrt =bal; COLACK = fcrt/100000; fcrt=fcrt%100000; COTENTH=fcrt/10000; fcrt=fcrt%10000; COTHOD=fcrt/1000; fcrt=fcrt%1000; COHUDS=fcrt/100; fcrt=fcrt%100; COTENS=fcrt/10; fcrt=fcrt%10; COONES=fcrt; write_eeprom(0x00,COLACK); write_eeprom(0x01,COTENTH); write_eeprom(0x02,COTHOD); write_eeprom(0x03,COHUDS); write_eeprom(0x04,COTENS); write_eeprom(0x05,COONES); DelayMs(2); Cost_engy = Cost_engy/1000; if(Energy;0. 900) { Energy = 0; unit++; unteeprom = unit; write_eeprom(0x06,unteeprom); DelayMs(2); if(unit==100) { cpwt1 = cpwt2; nit = 0; } } } } else { set1=1; set2=0; lcd_clear(); } /*if(SW==1) { while(SW==1); RC4=0; set1=0; set2=0; lcd_clear(); } */ }//while(set2) }//while(1) }//main() void init() { TRISA = 0xFF; TRISB = 0xF0; TRISC = 0x80; PORTB = 0x00; ADCON1=0X82; GIE=PEIE= TMR1IE=RCIE=1; TMR1L=0X17; TMR1H=0XFC; SPBRG=25; BRGH=1; RCSTA=0X90; TXSTA=0X24; cpwt1 = . 4; Cost_engy = 0; unit = 0; unteeprom = 0; Engeeprom = 0; eeprom_erase_cnt=read_eeprom(0x10); if(eeprom_erase_cnt;5) { eeprom_erase_cnt=0; write_eeprom(0x10,0); write_eeprom(0x00,0); write_eeprom(0x01,0); write_eeprom(0x02,0); write_eeprom(0x03,0); write_eeprom(0x04,0); write_eeprom(0x05,0); } else { eprom_erase_cnt++; write_eeprom(0x10,eeprom_erase_cnt); } lcd_init(); //set1=1; T1CON=0X01; DelayMs(10); } void disp_meter() { if(set1) { lcd_move(1,0); lcd_puts(â€Å"U:†); lcd_putn(unteeprom); } if(set2) { fcrt =testeng; ETHOD=fcrt/1000; fcrt=fcrt%1000; EHUDS=fcrt/100; fcrt=fcrt%100; ETENS=fcrt/10; fcrt=fcrt%10; EONES=fcrt; lcd_move(1,0); lcd_puts(â€Å"E:†); lcd_write(ETHOD+0x30); lcd_puts(â€Å". â€Å"); lcd_write(EHUDS+0x30); lcd_write(ETENS+0x30); lcd_write(EONES+0x30); } lcd_move(1,8); lcd_puts(â€Å"C:†); if(COLACK) { lcd_write(COLACK+0x30); lcd_write(COTENTH+0x30); lcd_write(COTHOD+0x30); } else if(COTENTH) { lcd_write(COTENTH+0x30); lcd_write(COTHOD+0x30); //lcd_puts(â€Å". ); lcd_write(COHUDS+0x30); lcd_write(COTENS+0x30); //lcd_write(COONES+0x30); } else { lcd_write(COTHOD+0x30); lcd_puts(â€Å". â€Å"); lcd_write(COHUDS+0x30); lcd_write(COTENS+0x30); lcd_write(COONES+0x30); } /*********************AT COMMANDS********gsm energy meter coding********* if(tick1==1) { tick1=0; u11=unteeprom/100; u12=(unteeprom%100)/10; u13=unteeprom%10; sendtopc1(â€Å"AT†); TXREG=13; while(! TXREG); delay(); for(k=0; k