Tuesday, October 15, 2019
Consensual Relationship Agreements Case Study Example | Topics and Well Written Essays - 1500 words
Consensual Relationship Agreements - Case Study Example Some people believe that workplace romantic relationships should be allowed and that employers should never try to inhibit them. Others, on the other hand, believe that these relationships should be inhibited and that the employees should not be allowed to express their feelings and emotions at work because this interferes with proper workplace ethics (Cohen, 2009). Consensual relationship agreement is a process that has been suggested for managing workplace relationships. A consensual relationship agreement is like a relationship contract where two individuals sign an agreement that explicitly reveals their personal and romantic relationships. As they sign the agreement, they agree to be in the relationship willingly and that their relationship will not affect their professionalism in the workplace. Advantages Consensual relationship agreements are extremely useful both to employees and the organization. Having employees sign this kind of agreement will be useful in making sure that any personal relationships in the workplace are well managed (Hellriegel, 2007). Employees will be sure that if the relationship takes a different course that it was meant, they will not be victimized by their partners by being sued for sexual harassment. A consensual relationship agreement will also help the employees to be sober about their professionalism and be able to separate their personal and professional life. Moreover, signing a consensual relationship agreement will be a better way of aiding the employees in having a relationship that they are not ashamed of and that has a better foundation. Consensual relationship agreements are no more of privacy intrusion than a marriage contract, especially considering that there is nothing for employees to be shameful about if their relationship is open and not based on negative foundations such as immorality or cheating other existing spouses. Employees can also benefit from the consensual relationship agreement because it will pro tect them from getting into relationships with people who are not serious about the relationship. All these factors indicate that the workplace will be improved and that the negative effects that come from personal relationships in the workplace will not be a problem. Argument Against Consensual relationship agreements also have negative impacts. For one reason, the use of consensual relationship agreements assumes that the relationships have a starting point. It is not easy to determine when and where a romantic relationship starts so that the parties involved can decide to sign the contract. While the whole idea of consensual relationship agreements is good because it is meant to make the workplace a better place and avoid confusions in the workplace, its implementation can only remain to be elusive. Studies show that employees resent being micromanaged even from a professional point of view, let alone from a personal point of view. Telling employees that they have to sign a contr act or an agreement in order for them to have a personal relationship is not as practical as it is theoretical. The spirit of consensual relationship agreements may be good, but how to implement is the problem. The other issue with consensual relationship agreements is that it fails to consider that relationships are volatile and always shifting. For instance, two people in a
Monday, October 14, 2019
Thinking Styles and Decision Making Essay Example for Free
Thinking Styles and Decision Making Essay Levels of thinking differed from one person to another. Each thinking style is influenced by our mainstream society, how we think and develop perception on the material things happening in the surroundings. There are a lot of thinking styles that came into being since the time of old ancestors to the recent modern developers of our age. There are twenty six thinking styles that was developed but we will concentrate our discussion on the three sub-divided types namely the Sensory focus, People focus, and Task focus. Other thinking styles are used in psychological workshops and research such as analyst thinking style, realist thinking style, idealist, synthesist, pragmatist and spiritually-guided thinking style (An Introduction to Thinking Styles,). à In 1995, original concept for the thinking styles was formulated by Fiona Beddoes-Jones to enhance professional and personal development (Thinking Styles,).à Thinking styles can help in dealing with different types of problems in the workplace, academe, family and relationships. The Three Different Thinking Styles à à à à à à à à à à à Before we proceed it is necessary to define the three levels of thinking styles. Sensory Focus examines things by receiving information through the senses and used the senses to perceive actual events. It is manifested in the visual, auditory, kinaesthetic and digital thinking. Watching, observing and looking pictures, diagrams, and visual imagery are the simple ways of expressing visual thinking while auditory requires the use of words and language, listening and conversing things. Kinaesthetic thinking is expressed through feelings, intuition, emotions, and physical movement and exercise as digital thinking entails the use of data, facts and statistics and the degree of data rationality. On the other hand, People Focus is how people perceived to relate with other people on their direct environment. It is focused on different levels of thinking such as internal and external thinking, self-referenced, altruistic, conforming, challenging, collaborative and competitive thinking. Internal thinking depends on own judgments and decisions and only consider self-knowledge as right and disregards feedback from other people. Some other people tend to dislike their own ideas and are not confident to explore many possible views and usually rely on other people or groups of people to give feedback on certain issues and problems. These people are external thinkers. Moreover, self referenced thinking is an approach of putting their own needs first and disregards the needs of others. In contrast, altruistic thinking involves responding to the needs of others and is willing to extend their help to other people. Conforming thinkers tends to keep away from confrontations and will certainly take a non-challenging methods, in contrast to challenging thinkers who definitely wanted to take confrontations, debates and experiments. Competitive thinkers would like to aspire for competitions and wants to gain victory from their own performance. Persons who wanted duties defined and detailed-oriented are Task Focus thinkers. They are conscious of the details especially in workplace where information is being transmitted through detailed facts and information. The Task Focus thinkers are strategic, creative, logical, options, procedural, towards, troubleshooting, proactive, reactive, simplicity, complexity, sameness, and different thinkers (Ltd., 2005). These thinking styles are distinct from each other but may sometimes closely connected together. Different patterns of these styles are being used as understanding and communicating with other people in surviving the daily response to work and life system. The amount of understanding different types of problems requires thinking styles that may influence critical thinking process. Such mentioned types of styles are good considerations in problem solving and decision making process. Sensory thinking style can help improve relationship with other people in the workplace, school, organizations, friends, and even families. Non-verbal communication somehow helps in understanding different personalities and the way you can approach them when facing a contradiction. Senses can transmit information and analyze things just by looking, observing, listening, feeling, intuitions, and physical movements. By looking at a critical situation using this kind of style, one can already define and identify the drawbacks. Most persons who donââ¬â¢t want confrontations tends to choose sensory focus in delivering and receiving information towards a given situation or crisis within a workplace. While others opted to choose interaction and personal touch to listen and confront problems this is somehow difficult in relating to contradictions with other people. However, it is very effective in most groups of people who are open-minded and problems can be solved instantaneously. Alternatively, task focus is a better way of coping up things since it is focused on goals and targets, detailed information, possibilities and alternatives in solving problems. These type of styles are distinct to each other and generally have an effect on critical thinking process and can possibly help the outcome of the decision making process. The positive upshot makes life more constructive by knowing which style you are most confident and at ease or difficult to cope up with in acknowledging, appreciating, expressing or solving things and difficulties. It brings people together and means more efficiency in duties, constancy in having good health, development of self-being, and gaining more friends and social groups. Reference An Introduction to Thinking Styles [Electronic Version]. Retrieved June 2, 2007 from http://www.earthtym.net/s-general.html. Ltd., T. C. F. C. (2005). Thnking Styles [Electronic Version]. Retrieved June 2, 2007 from http://www.consultingtools.com/media/thinkingstyles.pdf. Thinking Styles [Electronic Version]. Retrieved June 2, 2007 from http://www.cognitivefitness.co.uk/.
Sunday, October 13, 2019
Cultural Identities in China
Cultural Identities in China One of the oldest continuous civilizations in history and the dominant cultural center of East Asia is China, where the place full with flourishing philosophical, political, economic, artistic and scientific traditions. Moreover, China has opened up an intense cultural identity as a widespread civilization. In the last century, China has been struggled on the challenge of smiting a brand new identity in the world of nation-states and re-determines its cultural values in a modern world. The tension between tradition and modernity of Chinese has been turning to Confucius for possible ways to a latter-day social illness that related with commercialization and sudden economic growth inevitably spotlights by China. Chineses are subject to change their conservation and traditional values. In spite of their persuasiveness and persistence, the major Confucian orientations do not give any rise to a rigid, conform and closed system. China generates imperfect harmony but progress problematic. The increase of new modus of social organization and activities implied the new understanding on many of the traditional beliefs and organizational precondition. Overall, cultures will often adapt into their core elements appropriately. Now, the increase of a consumer society has defiance many of the Confucians philosophies. The emergence of a rich consumer class and the increase of prevalent culture has usher in a set of values constantly related with the concept of modern. Industrialization, urbanization, bureaucratization, democratization, universal education, mass-consumption and fast communication celebrates modernity. These ideas have been recruiting into latest Chinese society and become part of the Chinese cultural identity. Hence, Chinese cultural identity consist both traditional modernity. Any traditions must be comprehended as a chosen version of the former filtered from the desires, experience and current concerns. In the early of 20th Century, Chinas modernization project has left an imprint in the values of Chinese culture. Cultural identity in a specific filmic signification can help to lighten the problem of cultural identity have been claims through empirical. The main issue is not certainly attributable to the films Chinese identity, if this matter exists in most developing countries. Chinese characteristics and Chinese identity was actually brings up by the latter Chinese film where grounds the problem on a concrete Chinese soil. The classical Confucian principles were frowned upon the side of human desire and activities which related to money. An identity that has struggled to balance between tradition and modernity in the contest between Confucian moral tradition and mainland Chineses newly-discovered economic freedom in a post socialist society are captures well the indistinct and uneasy cultural identity of contemporary China. The diverse ideas are contend with one another for interpretative legitimacy is known as the subjective process to evaluate the cultural identity in a cinematic text. The exercise of identity identification will involves the allocation of special set of significances and the overture to involve or avoid the capacity diffusion of other significances. Chinas Enculturation Process According to A. Scott Moreau, enculturation can be seen as the learning of a culture through growing up in it. Enculturation is the process that begins from the moment of birth in which cultural rules and pathways, values and dreams, and pattern and regulations of life are set on from one generation to the next. People who live with their own culture will become enculturated as if they internalize their cultural pattern. There were clearly states that every human are born without culture. The cultural will exist as if the children have go through the enculturation process, because the children has internalized or drawn the environment of culture. Thus, the enculturation process will happen without any realization by the children. The children will learn and form their own self according to their own cultural, which this is another process of enculturation known as the active self-conscious process. Moreover, enculturation involves and brings up the indigenization. Christians enculturation believe that Chinese culture actually includes in the leadership and the incarnation of the Church among the circumstances of current social realities, whereby it indicated facing the political situation creatively in a brand new cultural setting. The Chinese once fit by the outliers, they can start to combine Chinese cultures, values, ideals, teachings and orientation of the gospel and church tradition. Chinas Assimilation Process The continuous of dynasties facilitated Chinas boundary firmly southward and the empire was stranded frequently by aggressions and migrations of northern savage. These people were recruited into Chinese culture through a process of assimilation and it was not irregular for the empire to be excluded by a dynasty of non-Chinese origin. Similarly, people who are out from the religion of Buddhism was adjusted and assimilated to Chinese traditions. In the Roman and other empires, assimilation was very less intensive. The cohesiveness and longevity of Chinese Empire are most important condition as the development of the Chinese bureaucracy and the creeping influence of its Confucian ideology everywhere in Chinese society. Confucianism, was originated as it was in the old Chinese traditions, learned from academies and trained in Chinese families, and finally increased by its own positions as the core disciplines of the civil service examinations, penetrated in Chinese society at all standards and shaped the cement that retained it together, during periods of political decomposition or the adjudication dynasty lost the Mandate of Heaven. Chinese culture, especially Confucianism was proved intensely that it radically penetrated in Vietnam, which China predominant for many centuries. Even surrounding countries such as Korea, where Korea was under Chinese predominant for only short time, as well as Japan, which was never be one of the Chinese Empire. In order to enrich their own societies in Chinese culture and institutions voluntarily, the predominant elites of these countries must be part adopted or adjusted in Chinese culture, even as if they against the Chinese political control. For the new era of East Asia today, this cultural legacy has proven and it will continued to be even more lasting than the previous empire that generates it.
Saturday, October 12, 2019
Love And Shakespeare Essay -- essays research papers
Love and Shakespeare The love theme in Shakespeare's Twelfth Night is confusing but at the same time entertaining. The love triangle involving Viola, disguised as Cesario, is in love with Orsino. Orsino is in love with Olivia. Olivia, however, loves Cesario. Orsino tries to woo Olivia with the language of love; however, his many attempts fail because the heart cannot be controlled. Orsino, a man in love with love itself, is on a mission to win the heart of his current object of affection, the Lady Olivia. She, however, has somewhat different plans as she envisions herself married to the lovely Cesario. Shakespeare's beautiful sonnets 18 and 73 describe the changes in season and the passages of time that correlate with the play's main theme and mood. In both sonnets and in the Twelfth Night introduce the issue of the effect of the weather. In Twelfth Night, a stormy sea has shipwrecked a vessel leaving the passengers scattered at sea. Viola, a Sea Captain, and some sailors believe that they are the only survivors of the wreck. The Captain believes that their being saved was only as fate would have it. Viola struggles with what to do with herself in a foreign country with no male companions. She, with the Captain's help, disguises herself as a boy so that she can protect her identity, support herself, and not be taken advantage of. The Captain agrees with her plan and convinces Duke Orsino that Viola, disguised as Cesario, is one of his noblest men. When the play ends, Viola i...
Friday, October 11, 2019
Culture and Health Attitudes
United States and China Health Attitudes PSYC3540 Culture, Ethnicity, and Diversity U05a1 Culture and Health Attitudes Capella University November, 2012 United States and China Health Attitudes Although every culture has different belief of being healthy, they all share the same definition. According to Mastsumoto and Juang (2013) healthy is defined as, ââ¬Å"a state of complete physical, mental, and social well-being not merely the absence of diseases or infirmityâ⬠(p. 180). Not only do it takes physically, mentally, and socially well-being but diseases free to be classified as healthy in all cultures.The United States and the China culture share many differences and similarities when it comes to the belief of being healthy. Recently, there was an interview between a twenty-five year old Chinese girl and me. This girl owned her own business. She was born and raised in China but moved to the United States when she turned twenty years old. She told me she learned that China and the United States share many differences and similarities toward being healthy. The Chinese girl told me in the interviewed in China, they mainly believe in the principle of yin and yang to be healthy.According to the Wikipedia Encyclopedia (2012), ââ¬Å"The concept of yin and yang is also applicable to the human body; for example, the upper part of the body and the back are assigned to yang which is cold foods, while the lower parts of the body are believed to have the yin character which is hot foods. Yin and yang characterization also extends to the various body functions, and ââ¬â more importantly ââ¬â to disease symptoms (e. g. , cold and heat sensations are assumed to be yin and yang symptoms, respectively). â⬠Yin and yang is what Chinese people use as a balance between good and bad health.They believe that imbalance of yin or yang is what leads to poor health. For example, if a person eats too much of yin, which might be spicy foods, they are told that the yin caused them to have poor health; this person sure drinks some herbal teas to balance him or her back to good health. Although China believes in good health, there are a lot of mental health people there. The Chinese girl also told me that there are a lot of people in China that have mental health problems ââ¬â over millions. Most of the mental health problems are due to depression.There are a lot of mental health patients in China that attempts suicide. According to Li, Philips, and Cohen (2012), ââ¬Å"More women attempt suicide than men. The most frequent causes of the attempts were interpersonal conflict (87%), psychological problems (33%), and conflict between others that affected the subject (27%)â⬠(para 1). The Chinese girl said the main cause of the women attempting suicide is due to interpersonal conflict, psychological problems, and conflict with the other people. There are no solutions for the mental health problems in China.Not only do they have mental health p roblems but also chronic diseases. China is known to have more chronic diseases than any other diseases. The Chinese girl told me they are known to have a high risk of cardiovascular diseases, chronic respiratory disease, and cancer. Summary chronic diseases now account for an estimated 80% of deaths and 70% of disability adjusted life-years lost in China (Longde, Lingzhi, Fan, Yamin, and Burton, 2005). The chronic diseases death and the disability adjusted life-years lost are very high in China.The chronic diseases are mostly related to high blood pressure and tobacco used. Most of these people that die from chronic diseases are middle-aged people. The Chinese girl talked about how the Chinese uses the yin and yang to diagnosis chronic diseases. She also stated they use herbal to try to cure these chronic diseases. I told the Chinese girl unlike China, the United States also have a theory they use to become healthy. I told her the United States believe in the influence of the biome dical model of health.The biomedical model of health is where the doctors look at parts of the body to figure out what is wrong with the body and fix it (Helman, 1991). An example of biomedical model of health would be a person going to the doctor because he or she is having chest pain. First, the doctor will do an x-ray on the chest. Secondly, the doctor will diagnosis from the x-ray of the person had a chest or a heart attack. Last, the doctor will give the person some medicine to cure his or her chest pain. Mental health is more common in the United States than in China.The Chinese girl stated that she read that over twenty million people in the United State have mental health (Manderscheid and Henderson, 2004); which is more than China. The age of mental health patients in the United States is over 18. Although, in the United Sates, most women suffer from mental health than men, mental is not due to depression of attempt suicide but depression of mood disorders. There is no cure for mental health problems in the United States. Not only is the United States common known for mental health problems but also diseases that lead to death.I told the girl in the interview that the United States three death diseases are heart disease, cancer, and stroke. Heart disease is the first leading death in the United States. Heart disease occurs mostly in men than women; it is mostly in older people (Fang, Kate, and Nora, 2011). Heart diseases are mostly could by smoking and not eating healthy. To cut the heart disease status, a person should exercise, do not smoke or quit smoking, and eat the right foods such as fruits and vegetables. Cancer is the second leading death in the United States.According to Klabunde, Brown, Ballard-Barbash, White, Thompson, Plescia, & King, (2012), ââ¬Å"Each year, approximately 350,000 persons are diagnosed with breast, cervical, or colorectal cancer in the United States, and nearly 100,000 die from these diseasesâ⬠(para. 1). There are over twenty-five percent of people in the United States diagnosed with cancer. The cause of most cancers is unknown. There is no cure of cancer. Stroke is the third leading death in the United States. Fang, Kate, M. and Mary (2012) stated that over fifty percent of the United States has been diagnosed with a stroke.Stroke is known to be cause by high blood pressure, stress, high cholesterol, and smoke. The cures to be stroke free is to exercise, eat healthy, and do not smoke. In conclusion, the interviewed between the Chinese girl and I was to help realize that there are a lot of differences and similarities of being healthy in each culture. China and the United States have theories of being healthy; they just have different theories ââ¬â China theory is called yin and yang while the United States theory is called biomedical model of health. Both China and the United States have mental problems; the United States just have more.Another example of the cultures similarities are th ey both have diseases that cause death such as heart disease and cancer. Reference Fang, J. , Kate, M. S. , & Nora, L. K. (2011). Prevalence of coronary heart disease ââ¬â united states, 2006-2010. (). Atlanta, United States, Atlanta: U. S. Center for Disease Control. Retrieved from http://search. proquest. com/docview/903302820? accountid=27965 Fang, J. , Kate, M. S. , & Mary, G. G. (2012). Prevalence of stroke ââ¬â united states, 2006-2010. (). Atlanta, United States, Atlanta: U. S. Center for Disease Control. Retrieved from ttp://search. proquest. com/docview/1020131364? accountid=27965 Helman, C. G. (1991). Limits of biomedical explanation. Lancet, 337(8749), 1080. Klabunde, C. N. , PhD. , Brown, M. , Ballard-Barbash, R. , White, M. C. , ScD. , Thompson, T. , Plescia, M. , & King, S. C. , M. D. (2012). Cancer screening ââ¬â united states, 2010. (). Atlanta, United States, Atlanta: U. S. Center for Disease Control. Retrieved from http://search. proquest. com/docview/9 22348301? accountid=27965 Manderscheid, R. W. , & Henderson, M. J. (2004). Mental health, united states, 2002 executive ummary. Administration and Policy in Mental Health, 32(1), 49-49. Retrieved from http://search. proquest. com/docview/211057805? accountid=27965 Matsumoto, D. , & Juang, L. (2013). Culture and psychology (5th ed. ). Belmont, CA: Wadsworth Cengage Learning. Li, X. , Phillips, M. R. , & Cohen, A. (2012). Indepth interviews with 244 female suicide attempters and their associates in northern china: Understanding the process and causes of the attempt. Crisis: The Journal Of Crisis Intervention And Suicide Prevention, 33(2), 66-72. doi:10. 1027/0227-5910/a000108Longde, W. , Lingzhi, K. , Fan, W. , Yamin, B. , & Burton, R. (2005). Preventing chronic diseases in China. Lancet, 366(9499), 1821-1824. doi:10. 1016/S0140-6736(05)67344-8 Traditional Chinese medicine. (2012). In Wikipedia. The Free Encyclopedia. Retrieved November 8, 2012, from http://en. wikipedia. org/w/index. php? title= Traditional_ Chinese_medicine&oldid=521839625 Zheng, S. , Song, M. , Wu, L. , Yang, S. , Shen, J. , Lu, X. & Wang, W. (2010). China: Public health genomics. Public Health Genomics, 13(5), 269-275. doi: http://dx. doi. org/10. 1159/000240969
Thursday, October 10, 2019
Competitive vs Collaborative Essay
This is when members of the group are preoccupied in establishing that they are ââ¬Å"rightâ⬠[AWJ2]and that the others are ââ¬Å"wrong.â⬠The group member may not want to adapt any of their work to have it blend with the others. They may pressure others into thinking their way. Some groups may suffer ââ¬Å"group think,â⬠where a bad choice goes unquestioned because group members are unwilling to go against what appears to be a consensus. Solution: Separate the tasks so that there is little or no overlap of topics. Make sure that each person clearly perceives that there exists a clear reward for the effort expended in the group work. Group members should keep in mind to compromise when coming to agreements because not everyone will always agree. Group member leaves the class. A team member could potentially drop the class because either they just donââ¬â¢t want to take it anymore or because a family issue, or for other reasons. If this occurs after research section assignments, this leaves the group vulnerable without that section. If it was far enough along in the timeline, it would be very difficult to cope with problem because the group would have to start from scratch to complete the remaining sections and assignments. Solution: If the group has not heard from a team member all week, they should message that particular person to ask them about the assignments. If the team still does not hear from them, they should write an email to the professor inquiring about the other team member to find out if they dropped the class for any particular reason. If the team member has dropped the class or refuses participation, the group should divide the remaining sections and tasks to complete the project in a timely manner. Depending on the situation, the team should contact the professor for an extension or guidance for the particular case. Consequences: The obvious penalty for lack of communication and cooperation in group work would be a lower grade or even failure to complete the project. Overcoming obstacles like these in group projects is crucial to actively use and improve communication skills and to build teamwork experience used in the classroom as well as the workplace. Individualââ¬â¢s effort towards group work shows oneââ¬â¢s ability to contribute meaningful information and skills to the worth of the total project. Although team members receive grades based on individual efforts, the project grade is collaborative at first. Each team memberââ¬â¢s role and effort affects the initial groupââ¬â¢s grade. In APA style, quotation marks are reserved for directly quoted materials. Never use quotes to set off a word or phrase. APA style does allow for the use of italics where terms might be new or confusing. None of the words in your check point are new or confusing or might be confusing to your reader so thereââ¬â¢re is no reason to use quotes or italics.
Central Processing Unit and Memory Location
MICROPROCESSOR 8085 â⬠¢ Reference Book: ââ¬â Ramesh S. Goankar, ââ¬Å"Microprocessor Architecture, Programming and Applications with 8085â⬠, 5th Edition, Prentice Hall â⬠¢ Week 1 ââ¬â Basic Concept and Ideas about Microprocessor. â⬠¢ Week 2 ââ¬â Architecture of 8085 â⬠¢ Week 3 ââ¬â Addressing Modes and Instruction set of 8085 â⬠¢ Week 4 ââ¬â Interrupts of 8085 â⬠¢ Week 5 onwards ââ¬â Peripherals. Basic Concepts of Microprocessors â⬠¢ Differences between: ââ¬â Microcomputer ââ¬â a computer with a microprocessor as its CPU. Includes memory, I/O etc. Microprocessor ââ¬â silicon chip which includes ALU, register circuits & control circuits ââ¬â Microcontroller ââ¬â silicon chip which includes microprocessor, memory & I/O in a single package. What is a Microprocessor? â⬠¢ The word comes from the combination micro and processor. ââ¬â Processor means a device that processes whatever. In this context proces sor means a device that processes numbers, specifically binary numbers, 0ââ¬â¢s and 1ââ¬â¢s. â⬠¢ To process means to manipulate. It is a general term that describes all manipulation. Again in this content, it means to perform certain operations on the numbers that depend on the microprocessorââ¬â¢s design.What about micro? â⬠¢ Micro is a new addition. ââ¬â In the late 1960ââ¬â¢s, processors were built using discrete elements. â⬠¢ These devices performed the required operation, but were too large and too slow. ââ¬â In the early 1970ââ¬â¢s the microchip was invented. All of the components that made up the processor were now placed on a single piece of silicon. The size became several thousand times smaller and the speed became several hundred times faster. The ââ¬Å"Microâ⬠Processor was born. Was there ever a ââ¬Å"miniâ⬠processor? â⬠¢ No. ââ¬â It went directly from discrete elements to a single chip. However, omparing todayââ¬â ¢s microprocessors to the ones built in the early 1970ââ¬â¢s you find an extreme increase in the amount of integration. â⬠¢ So, What is a microprocessor? Definition of the Microprocessor The microprocessor is a programmable device that takes in numbers, performs on them arithmetic or logical operations according to the program stored in memory and then produces other numbers as a result. Definition (Contd. ) â⬠¢ Lets expand each of the underlined words: ââ¬â Programmable device: The microprocessor can perform different sets of operations on the data it receives depending on the sequence of instructions supplied in the given program.By changing the program, the microprocessor manipulates the data in different ways. ââ¬â Instructions: Each microprocessor is designed to execute a specific group of operations. This group of operations is called an instruction set. This instruction set defines what the microprocessor can and cannot do. Definition (Contd. ) ââ¬â Ta kes in: The data that the microprocessor manipulates must come from somewhere. â⬠¢ It comes from what is called ââ¬Å"input devicesâ⬠. â⬠¢ These are devices that bring data into the system from the outside world. â⬠¢ These represent devices such as a keyboard, a mouse, switches, and the like.Definition (Contd. ) ââ¬â Numbers: The microprocessor has a very narrow view on life. It only understands binary numbers. A binary digit is called a bit (which comes from binary digit). The microprocessor recognizes and processes a group of bits together. This group of bits is called a ââ¬Å"wordâ⬠. The number of bits in a Microprocessorââ¬â¢s word, is a measure of its ââ¬Å"abilitiesâ⬠. Definition (Contd. ) ââ¬â Words, Bytes, etc. â⬠¢ The earliest microprocessor (the Intel 8088 and Motorolaââ¬â¢s 6800) recognized 8-bit words. ââ¬â They processed information 8-bits at a time. Thatââ¬â¢s why they are called ââ¬Å"8-bit processorsâ⬠.They can handle large numbers, but in order to process these numbers, they broke them into 8-bit pieces and processed each group of 8-bits separately. â⬠¢ Later microprocessors (8086 and 68000) were designed with 16-bit words. ââ¬â A group of 8-bits were referred to as a ââ¬Å"half-wordâ⬠or ââ¬Å"byteâ⬠. ââ¬â A group of 4 bits is called a ââ¬Å"nibbleâ⬠. ââ¬â Also, 32 bit groups were given the name ââ¬Å"long wordâ⬠. â⬠¢ Today, all processors manipulate at least 32 bits at a time and there exists microprocessors that can process 64, 80, 128 bits Definition (Contd. ) ââ¬â Arithmetic and Logic Operations: Every microprocessor has arithmetic operations such as add and subtract as part of its instruction set. ââ¬â Most microprocessors will have operations such as multiply and divide. ââ¬â Some of the newer ones will have complex operations such as square root. â⬠¢ In addition, microprocessors have logic operations as well. Such as AND, OR, XOR, shift left, shift right, etc. â⬠¢ Again, the number and types of operations define the microprocessorââ¬â¢s instruction set and depends on the specific microprocessor. Definition (Contd. ) ââ¬â Stored in memory : â⬠¢ First, what is memory? ââ¬â Memory is the location where information is kept while not in current use. Memory is a collection of storage devices. Usually, each storage device holds one bit. Also, in most kinds of memory, these storage devices are grouped into groups of 8. These 8 storage locations can only be accessed together. So, one can only read or write in terms of bytes to and form memory. ââ¬â Memory is usually measured by the number of bytes it can hold. It is measured in Kilos, Megas and lately Gigas. A Kilo in computer language is 210 =1024. So, a KB (KiloByte) is 1024 bytes. Mega is 1024 Kilos and Giga is 1024 Mega. Definition (Contd. ) ââ¬â Stored in memory: â⬠¢ When a program is entered into a computer, it is st ored in memory.Then as the microprocessor starts to execute the instructions, it brings the instructions from memory one at a time. â⬠¢ Memory is also used to hold the data. ââ¬â The microprocessor reads (brings in) the data from memory when it needs it and writes (stores) the results into memory when it is done. Definition (Contd. ) ââ¬â Produces: For the user to see the result of the execution of the program, the results must be presented in a human readable form. â⬠¢ The results must be presented on an output device. â⬠¢ This can be the monitor, a paper from the printer, a simple LED or many other forms. A Microprocessor-based systemFrom the above description, we can draw the following block diagram to represent a microprocessor-based system: Input Output Memory Inside The Microprocessor â⬠¢ Internally, the microprocessor is made up of 3 main units. ââ¬â The Arithmetic/Logic Unit (ALU) ââ¬â The Control Unit. ââ¬â An array of registers for holdi ng data while it is being manipulated. Organization of a microprocessorbased system â⬠¢ Letââ¬â¢s expand the picture a bit. I/O Input / Output ALU Register Array System Bus Memory ROM RAM Control Memory â⬠¢ Memory stores information such as instructions and data in binary format (0 and 1).It provides this information to the microprocessor whenever it is needed. â⬠¢ Usually, there is a memory ââ¬Å"sub-systemâ⬠in a microprocessor-based system. This sub-system includes: ââ¬â The registers inside the microprocessor ââ¬â Read Only Memory (ROM) â⬠¢ used to store information that does not change. ââ¬â Random Access Memory (RAM) (also known as Read/Write Memory). â⬠¢ used to store information supplied by the user. Such as programs and data. Memory Map and Addresses â⬠¢ The memory map is a picture representation of the address range and shows where the different memory chips are located within the address range. 000 0000 EPROM 3FFF 4400 Address Range of EPROM Chip Address Range RAM 1 RAM 2 RAM 3 Address Range of 1st RAM Chip 5FFF 6000 Address Range of 2nd RAM Chip 8FFF 9000 A3FF A400 Address Range of 3rd RAM Chip RAM 4 F7FF FFFF Address Range of 4th RAM Chip Memory â⬠¢ To execute a program: ââ¬â the user enters its instructions in binary format into the memory. ââ¬â The microprocessor then reads these instructions and whatever data is needed from memory, executes the instructions and places the results either in memory or produces it on an output device. The three cycle instruction execution model To execute a program, the microprocessor ââ¬Å"readsâ⬠each instruction from memory, ââ¬Å"interpretsâ⬠it, then ââ¬Å"executesâ⬠it. â⬠¢ To use the right names for the cycles: ââ¬â The microprocessor fetches each instruction, ââ¬â decodes it, ââ¬â Then executes it. â⬠¢ This sequence is continued until all instructions are performed. Machine Language â⬠¢ The number of bits tha t form the ââ¬Å"wordâ⬠of a microprocessor is fixed for that particular processor. ââ¬â These bits define a maximum number of combinations. â⬠¢ For example an 8-bit microprocessor can have at most 28 = 256 different combinations. However, in most microprocessors, not all of these combinations are used. ââ¬â Certain patterns are chosen and assigned specific meanings. ââ¬â Each of these patterns forms an instruction for the microprocessor. ââ¬â The complete set of patterns makes up the microprocessorââ¬â¢s machine language. The 8085 Machine Language â⬠¢ The 8085 (from Intel) is an 8-bit microprocessor. ââ¬â The 8085 uses a total of 246 bit patterns to form its instruction set. ââ¬â These 246 patterns represent only 74 instructions. â⬠¢ The reason for the difference is that some (actually most) instructions have multiple different formats. Because it is very difficult to enter the bit patterns correctly, they are usually entered in hexadeci mal instead of binary. â⬠¢ For example, the combination 0011 1100 which translates into ââ¬Å"increment the number in the register called the accumulatorâ⬠, is usually entered as 3C. Assembly Language â⬠¢ Entering the instructions using hexadecimal is quite easier than entering the binary combinations. ââ¬â However, it still is difficult to understand what a program written in hexadecimal does. ââ¬â So, each company defines a symbolic code for the instructions. ââ¬â These codes are called ââ¬Å"mnemonicsâ⬠. The mnemonic for each instruction is usually a group of letters that suggest the operation performed. Assembly Language â⬠¢ Using the same example from before, ââ¬â 00111100 translates to 3C in hexadecimal (OPCODE) ââ¬â Its mnemonic is: ââ¬Å"INR Aâ⬠. ââ¬â INR stands for ââ¬Å"increment registerâ⬠and A is short for accumulator. â⬠¢ Another example is: 1000 0000, ââ¬â Which translates to 80 in hexadecimal. ââ¬â Its mnemonic is ââ¬Å"ADD Bâ⬠. ââ¬â ââ¬Å"Add register B to the accumulator and keep the result in the accumulatorâ⬠. Assembly Language â⬠¢ It is important to remember that a machine language and its associated assembly language are completely machine dependent. In other words, they are not transferable from one microprocessor to a different one. â⬠¢ For example, Motorolla has an 8-bit microprocessor called the 6800. ââ¬â The 8085 machine language is very different from that of the 6800. So is the assembly language. ââ¬â A program written for the 8085 cannot be executed on the 6800 and vice versa. ââ¬Å"Assemblingâ⬠The Program â⬠¢ How does assembly language get translated into machine language? ââ¬â There are two ways: ââ¬â 1st there is ââ¬Å"hand assemblyâ⬠. â⬠¢ The programmer translates each assembly language instruction into its equivalent hexadecimal code (machine language).Then the hexadecimal code is entered into memory. ââ¬â The other possibility is a program called an ââ¬Å"assemblerâ⬠, which does the translation automatically. 8085 Microprocessor Architecture â⬠¢ â⬠¢ â⬠¢ â⬠¢ â⬠¢ â⬠¢ 8-bit general purpose à µp Capable of addressing 64 k of memory Has 40 pins Requires +5 v power supply Can operate with 3 MHz clock 8085 upward compatible Pins Power Supply: +5 V Frequency Generator is connected to those pins Input/Output/ Memory Read Write Multiplexed Address Data Bus Address latch Enable Address Bus â⬠¢ System Bus ââ¬â wires connecting memory & I/O to microprocessor ââ¬â Address Bus Unidirectional â⬠¢ Identifying peripheral or memory location ââ¬â Data Bus â⬠¢ Bidirectional â⬠¢ Transferring data ââ¬â Control Bus â⬠¢ Synchronization signals â⬠¢ Timing signals â⬠¢ Control signal Architecture of Intel 8085 Microprocessor Intel 8085 Microprocessor â⬠¢ Microprocessor consists of: ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â Control unit: control microprocessor operations. ALU: performs data processing function. Registers: provide storage internal to CPU. Interrupts Internal data bus The ALU â⬠¢ In addition to the arithmetic & logic circuits, the ALU includes the accumulator, which is part of every arithmetic & logic operation. Also, the ALU includes a temporary register used for holding data temporarily during the execution of the operation. This temporary register is not accessible by the programmer. â⬠¢ Registers ââ¬â General Purpose Registers â⬠¢ B, C, D, E, H & L (8 bit registers) â⬠¢ Can be used singly â⬠¢ Or can be used as 16 bit register pairs ââ¬â BC, DE, HL â⬠¢ H & L can be used as a data pointer (holds memory address) ââ¬â Special Purpose Registers â⬠¢ Accumulator (8 bit register) ââ¬â Store 8 bit data ââ¬â Store the result of an operation ââ¬â Store 8 bit data during I/O transfer Accumulator Flags B C D E H L Program Counter Stack Pointer Address 6 8 Data â⬠¢ Flag Register ââ¬â 8 bit register ââ¬â shows the status of the microprocessor before/after an operation ââ¬â S (sign flag), Z (zero flag), AC (auxillary carry flag), P (parity flag) & CY (carry flag) D7 S D6 Z D5 X D4 AC D3 X D2 P D1 X D0 CY ââ¬â Sign Flag â⬠¢ Used for indicating the sign of the data in the accumulator â⬠¢ The sign flag is set if negative (1 ââ¬â negative) â⬠¢ The sign flag is reset if positive (0 ââ¬âpositive) â⬠¢ Zero Flag ââ¬â Is set if result obtained after an operation is 0 ââ¬â Is set following an increment or decrement operation of that register 10110011 + 01001101 ââ¬âââ¬âââ¬âââ¬âââ¬â1 00000000 â⬠¢ Carry Flag Is set if there is a carry or borrow from arithmetic operation 1011 0101 + 0110 1100 ââ¬âââ¬âââ¬âââ¬âââ¬âCarry 1 0010 0001 1011 0101 ââ¬â 1100 1100 ââ¬âââ¬âââ¬âââ¬âââ¬âBorrow 1 1110 1001 â⬠¢ Auxillary Carry Flag ââ¬â Is set if there is a carry out of bit 3 â⬠¢ Parity Flag ââ¬â Is set if parity is even ââ¬â Is cleared if parity is odd The Internal Architecture â⬠¢ We have already discussed the general purpose registers, the Accumulator, and the flags. â⬠¢ The Program Counter (PC) ââ¬â This is a register that is used to control the sequencing of the execution of instructions. ââ¬â This register always holds the address of the next instruction. Since it holds an address, it must be 16 bits wide. The Internal Architecture â⬠¢ The Stack pointer ââ¬â The stack pointer is also a 16-bit register that is used to point into memory. ââ¬â The memory this register points to is a special area called the stack. ââ¬â The stack is an area of memory used to hold data that will be retreived soon. ââ¬â The stack is usually accessed in a Last In First Out (LIFO) fashion. Non Programmable Registers â⬠¢ Instruction Register & Decoder ââ¬â Inst ruction is stored in IR after fetched by processor ââ¬â Decoder decodes instruction in IR Internal Clock generator ââ¬â 3. 125 MHz internally ââ¬â 6. 5 MHz externally The Address and Data Busses â⬠¢ The address bus has 8 signal lines A8 ââ¬â A15 which are unidirectional. â⬠¢ The other 8 address bits are multiplexed (time shared) with the 8 data bits. ââ¬â So, the bits AD0 ââ¬â AD7 are bi-directional and serve as A0 ââ¬â A7 and D0 ââ¬â D7 at the same time. â⬠¢ During the execution of the instruction, these lines carry the address bits during the early part, then during the late parts of the execution, they carry the 8 data bits. ââ¬â In order to separate the address from the data, we can use a latch to save the value before the function of the bits changes. Demultiplexing AD7-AD0 From the above description, it becomes obvious that the AD7ââ¬â AD0 lines are serving a dual purpose and that they need to be demultiplexed to get all the information. ââ¬â The high order bits of the address remain on the bus for three clock periods. However, the low order bits remain for only one clock period and they would be lost if they are not saved externally. Also, notice that the low order bits of the address disappear when they are needed most. ââ¬â To make sure we have the entire address for the full three clock cycles, we will use an external latch to save the value of AD7ââ¬â AD0 when it is carrying the address bits.We use the ALE signal to enable this latch. Demultiplexing AD7-AD0 8085 A15-A8 ALE AD7-AD0 Latch A7- A0 D7- D0 ââ¬â Given that ALE operates as a pulse during T1, we will be able to latch the address. Then when ALE goes low, the address is saved and the AD7ââ¬â AD0 lines can be used for their purpose as the bi-directional data lines. Demultiplexing the Bus AD7 ââ¬â AD0 â⬠¢ â⬠¢ â⬠¢ â⬠¢ The high order address is placed on the address bus and hold for 3 clk periods, The low o rder address is lost after the first clk period, this address needs to be hold however we need to use latch The address AD7 ââ¬â AD0 is connected as inputs to the latch 74LS373.The ALE signal is connected to the enable (G) pin of the latch and the OC ââ¬â Output control ââ¬â of the latch is grounded The Overall Picture â⬠¢ Putting all of the concepts together, we get: A15- A10 Chip Selection Circuit 8085 A15-A8 ALE AD7-AD0 Latch CS A9- A0 A7- A0 1K Byte Memory Chip WR RD IO/M D7- D0 RD WR Introduction to 8085 Instructions The 8085 Instructions ââ¬â Since the 8085 is an 8-bit device it can have up to 28 (256) instructions. â⬠¢ However, the 8085 only uses 246 combinations that represent a total of 74 instructions. ââ¬â Most of the instructions have more than one format. These instructions can be grouped into five different groups: â⬠¢ â⬠¢ â⬠¢ â⬠¢ â⬠¢ Data Transfer Operations Arithmetic Operations Logic Operations Branch Operations Machin e Control Operations Instruction and Data Formats â⬠¢ Each instruction has two parts. ââ¬â The first part is the task or operation to be performed. â⬠¢ This part is called the ââ¬Å"opcodeâ⬠(operation code). ââ¬â The second part is the data to be operated on â⬠¢ Called the ââ¬Å"operandâ⬠. Data Transfer Operations ââ¬â These operations simply COPY the data from the source to the destination. ââ¬â MOV, MVI, LDA, and STA ââ¬â They transfer: â⬠¢ â⬠¢ â⬠¢ â⬠¢ Data between registers.Data Byte to a register or memory location. Data between a memory location and a register. Data between an IO Device and the accumulator. ââ¬â The data in the source is not changed. The LXI instruction â⬠¢ The 8085 provides an instruction to place the 16-bit data into the register pair in one step. â⬠¢ LXI Rp, (Load eXtended Immediate) ââ¬â The instruction LXI B 4000H will place the 16-bit number 4000 into the register pair B, C. â⠬ ¢ The upper two digits are placed in the 1st register of the pair and the lower two digits in the 2nd . B 40 00 C LXI B 40 00H The Memory ââ¬Å"Registerâ⬠Most of the instructions of the 8085 can use a memory location in place of a register. ââ¬â The memory location will become the ââ¬Å"memoryâ⬠register M. â⬠¢ MOV M B ââ¬â copy the data from register B into a memory location. ââ¬â Which memory location? â⬠¢ The memory location is identified by the contents of the HL register pair. ââ¬â The 16-bit contents of the HL register pair are treated as a 16-bit address and used to identify the memory location. Using the Other Register Pairs ââ¬â There is also an instruction for moving data from memory to the accumulator without disturbing the contents of the H and L register. â⬠¢ LDAX Rp (LoaD Accumulator eXtended) Copy the 8-bit contents of the memory location identified by the Rp register pair into the Accumulator. ââ¬â This instruction o nly uses the BC or DE pair. ââ¬â It does not accept the HL pair. Indirect Addressing Mode â⬠¢ Using data in memory directly (without loading first into a Microprocessorââ¬â¢s register) is called Indirect Addressing. â⬠¢ Indirect addressing uses the data in a register pair as a 16-bit address to identify the memory location being accessed. ââ¬â The HL register pair is always used in conjunction with the memory register ââ¬Å"Mâ⬠. ââ¬â The BC and DE register pairs can be used to load data into the Accumultor using indirect addressing.Arithmetic Operations ââ¬â Addition (ADD, ADI): ââ¬â Any 8-bit number. ââ¬â The contents of a register. ââ¬â The contents of a memory location. â⬠¢ Can be added to the contents of the accumulator and the result is stored in the accumulator. ââ¬â Subtraction (SUB, SUI): ââ¬â Any 8-bit number ââ¬â The contents of a register ââ¬â The contents of a memory location â⬠¢ Can be subtracted from the contents of the accumulator. The result is stored in the accumulator. Arithmetic Operations Related to Memory â⬠¢ These instructions perform an arithmetic operation using the contents of a memory location while they are still in memory. ADD ââ¬â SUB ââ¬â INR M M M / DCR M â⬠¢ Add the contents of M to the Accumulator â⬠¢ Sub the contents of M from the Accumulator â⬠¢ Increment/decrement the contents of the memory location in place. ââ¬â All of these use the contents of the HL register pair to identify the memory location being used. Arithmetic Operations ââ¬â Increment (INR) and Decrement (DCR): â⬠¢ The 8-bit contents of any memory location or any register can be directly incremented or decremented by 1. â⬠¢ No need to disturb the contents of the accumulator. Manipulating Addresses â⬠¢ Now that we have a 16-bit address in a register pair, how do we manipulate it? It is possible to manipulate a 16-bit address stored in a register pair as one entity using some special instructions. â⬠¢ INX Rp â⬠¢ DCX Rp (Increment the 16-bit number in the register pair) (Decrement the 16-bit number in the register pair) ââ¬â The register pair is incremented or decremented as one entity. No need to worry about a carry from the lower 8-bits to the upper. It is taken care of automatically. Logic Operations â⬠¢ These instructions perform logic operations on the contents of the accumulator. ââ¬â ANA, ANI, ORA, ORI, XRA and XRI â⬠¢ Source: Accumulator and ââ¬â An 8-bit number ââ¬â The contents of a register ââ¬â The contents of a memory location Destination: Accumulator ANA R/M ANI # ORA ORI XRA XRI R/M # R/M # AND Accumulator With Reg/Mem AND Accumulator With an 8-bit number OR Accumulator With Reg/Mem OR Accumulator With an 8-bit number XOR Accumulator With Reg/Mem XOR Accumulator With an 8-bit number Logic Operations ââ¬â Complement: â⬠¢ 1ââ¬â¢s complement of the contents of the accumulato r. CMA No operand Additional Logic Operations â⬠¢ Rotate ââ¬â Rotate the contents of the accumulator one position to the left or right. ââ¬â RLC ââ¬â RAL ââ¬â RRC ââ¬â RAR Rotate the accumulator left. Bit 7 goes to bit 0 AND the Carry flag. Rotate the accumulator left through the carry.Bit 7 goes to the carry and carry goes to bit 0. Rotate the accumulator right. Bit 0 goes to bit 7 AND the Carry flag. Rotate the accumulator right through the carry. Bit 0 goes to the carry and carry goes to bit 7. RLC vs. RLA Carry Flag â⬠¢ RLC 7 6 5 4 3 2 1 0 Accumulator Carry Flag â⬠¢ RAL 7 6 5 4 3 2 1 0 Accumulator Logical Operations â⬠¢ Compare â⬠¢ Compare the contents of a register or memory location with the contents of the accumulator. ââ¬â CMP R/M Compare the contents of the register or memory location to the contents of the accumulator. Compare the 8-bit number to the contents of the accumulator. CPI # â⬠¢ The compare instruction sets the flag s (Z, Cy, and S). â⬠¢ The compare is done using an internal subtraction that does not change the contents of the accumulator. A ââ¬â (R / M / #) Branch Operations â⬠¢ Two types: ââ¬â Unconditional branch. â⬠¢ Go to a new location no matter what. ââ¬â Conditional branch. â⬠¢ Go to a new location if the condition is true. Unconditional Branch ââ¬â JMP Address â⬠¢ Jump to the address specified (Go to). ââ¬â CALL Address â⬠¢ Jump to the address specified but treat it as a subroutine. ââ¬â RET â⬠¢ Return from a subroutine. ââ¬â The addresses supplied to all branch operations must be 16-bits.Conditional Branch ââ¬â Go to new location if a specified condition is met. â⬠¢ JZ Address (Jump on Zero) ââ¬â Go to address specified if the Zero flag is set. â⬠¢ JNZ Address (Jump on NOT Zero) ââ¬â Go to address specified if the Zero flag is not set. â⬠¢ JC Address (Jump on Carry) ââ¬â Go to the address specified if the Carry flag is set. â⬠¢ JNC Address (Jump on No Carry) ââ¬â Go to the address specified if the Carry flag is not set. â⬠¢ JP â⬠¢ JM Address (Jump on Plus) Address (Jump on Minus) ââ¬â Go to the address specified if the Sign flag is not set ââ¬â Go to the address specified if the Sign flag is set.Machine Control ââ¬â HLT â⬠¢ Stop executing the program. ââ¬â NOP â⬠¢ No operation â⬠¢ Exactly as it says, do nothing. â⬠¢ Usually used for delay or to replace instructions during debugging. Operand Types â⬠¢ There are different ways for specifying the operand: ââ¬â There may not be an operand (implied operand) â⬠¢ CMA ââ¬â The operand may be an 8-bit number (immediate data) â⬠¢ ADI 4FH ââ¬â The operand may be an internal register (register) â⬠¢ SUB B ââ¬â The operand may be a 16-bit address (memory address) â⬠¢ LDA 4000H Instruction Size â⬠¢ Depending on the operand type, the instruction may have diff erent sizes.It will occupy a different number of memory bytes. ââ¬â Typically, all instructions occupy one byte only. ââ¬â The exception is any instruction that contains immediate data or a memory address. â⬠¢ Instructions that include immediate data use two bytes. ââ¬â One for the opcode and the other for the 8-bit data. â⬠¢ Instructions that include a memory address occupy three bytes. ââ¬â One for the opcode, and the other two for the 16-bit address. Instruction with Immediate Date â⬠¢ Operation: Load an 8-bit number into the accumulator. ââ¬â MVI A, 32 â⬠¢ Operation: MVI A â⬠¢ Operand: The number 32 â⬠¢ Binary Code: 0011 1110 3E 1st byte. 011 0010 32 2nd byte. Instruction with a Memory Address â⬠¢ Operation: go to address 2085. ââ¬â Instruction: JMP 2085 â⬠¢ Opcode: JMP â⬠¢ Operand: 2085 â⬠¢ Binary code: 1100 0011 C3 1000 0101 85 0010 0000 20 1st byte. 2nd byte 3rd byte Addressing Modes â⬠¢ The microprocessor ha s different ways of specifying the data for the instruction. These are called ââ¬Å"addressing modesâ⬠. â⬠¢ The 8085 has four addressing modes: ââ¬â ââ¬â ââ¬â ââ¬â Implied Immediate Direct Indirect CMA MVI B, 45 LDA 4000 LDAX B â⬠¢ Load the accumulator with the contents of the memory location whose address is stored in the register pair BC). Data Formats In an 8-bit microprocessor, data can be represented in one of four formats: â⬠¢ â⬠¢ â⬠¢ â⬠¢ ASCII BCD Signed Integer Unsigned Integer. ââ¬â It is important to recognize that the microprocessor deals with 0ââ¬â¢s and 1ââ¬â¢s. â⬠¢ It deals with values as strings of bits. â⬠¢ It is the job of the user to add a meaning to these strings. Data Formats â⬠¢ Assume the accumulator contains the following value: 0100 0001. ââ¬â There are four ways of reading this value: â⬠¢ It is an unsigned integer expressed in binary, the equivalent decimal number would be 65. â⬠¢ It is a number expressed in BCD (Binary Coded Decimal) format. That would make it, 41. It is an ASCII representation of a letter. That would make it the letter A. â⬠¢ It is a string of 0ââ¬â¢s and 1ââ¬â¢s where the 0th and the 6th bits are set to 1 while all other bits are set to 0. ASCII stands for American Standard Code for Information Interchange. Counters & Time Delays Counters â⬠¢ A loop counter is set up by loading a register with a certain value â⬠¢ Then using the DCR (to decrement) and INR (to increment) the contents of the register are updated. â⬠¢ A loop is set up with a conditional jump instruction that loops back or not depending on whether the count has reached the termination count.Counters â⬠¢ The operation of a loop counter can be described using the following flowchart. Initialize Body of loop Update the count No Is this Final Count? Yes Sample ALP for implementing a loop Using DCR instruction MVI C, 15H LOOP DCR C JNZ LOOP Using a Regist er Pair as a Loop Counter â⬠¢ Using a single register, one can repeat a loop for a maximum count of 255 times. â⬠¢ It is possible to increase this count by using a register pair for the loop counter instead of the single register. ââ¬â A minor problem arises in how to test for the final count since DCX and INX do not modify the flags. However, if the loop is looking for when the count becomes zero, we can use a small trick by ORing the two registers in the pair and then checking the zero flag. Using a Register Pair as a Loop Counter â⬠¢ The following is an example of a loop set up with a register pair as the loop counter. LXI B, 1000H LOOP DCX B MOV A, C ORA B JNZ LOOP Delays â⬠¢ It was shown in Chapter 2 that each instruction passes through different combinations of Fetch, Memory Read, and Memory Write cycles. â⬠¢ Knowing the combinations of cycles, one can calculate how long such an instruction would require to complete. The table in Appendix F of the book contains a column with the title B/M/T. ââ¬â B for Number of Bytes ââ¬â M for Number of Machine Cycles ââ¬â T for Number of T-State. Delays â⬠¢ Knowing how many T-States an instruction requires, and keeping in mind that a T-State is one clock cycle long, we can calculate the time using the following formula: Delay = No. of T-States / Frequency â⬠¢ For example a ââ¬Å"MVIâ⬠instruction uses 7 T-States. Therefore, if the Microprocessor is running at 2 MHz, the instruction would require 3. 5 à µSeconds to complete. Delay loops â⬠¢ We can use a loop to produce a certain amount of time delay in a program. The following is an example of a delay loop: MVI C, FFH LOOP DCR C JNZ LOOP 7 T-States 4 T-States 10 T-States â⬠¢ The first instruction initializes the loop counter and is executed only once requiring only 7 T-States. â⬠¢ The following two instructions form a loop that requires 14 T-States to execute and is repeated 255 times until C becomes 0. Del ay Loops (Contd. ) â⬠¢ We need to keep in mind though that in the last iteration of the loop, the JNZ instruction will fail and require only 7 T-States rather than the 10. â⬠¢ Therefore, we must deduct 3 T-States from the total delay to get an accurate delay calculation. To calculate the delay, we use the following formula: Tdelay = TO + TL ââ¬â Tdelay = total delay ââ¬â TO = delay outside the loop ââ¬â TL = delay of the loop â⬠¢ TO is the sum of all delays outside the loop. Delay Loops (Contd. ) â⬠¢ Using these formulas, we can calculate the time delay for the previous example: â⬠¢ TO = 7 T-States ââ¬â Delay of the MVI instruction â⬠¢ TL = (14 X 255) ââ¬â 3 = 3567 T-States ââ¬â 14 T-States for the 2 instructions repeated 255 times (FF16 = 25510) reduced by the 3 T-States for the final JNZ. Using a Register Pair as a Loop Counter â⬠¢ Using a single register, one can repeat a loop for a maximum count of 255 times. It is possible to increase this count by using a register pair for the loop counter instead of the single register. ââ¬â A minor problem arises in how to test for the final count since DCX and INX do not modify the flags. ââ¬â However, if the loop is looking for when the count becomes zero, we can use a small trick by ORing the two registers in the pair and then checking the zero flag. Using a Register Pair as a Loop Counter â⬠¢ The following is an example of a delay loop set up with a register pair as the loop counter. LXI B, 1000H LOOP DCX B MOV A, C ORA B JNZ LOOP 10 T-States 6 T-States 4 T-States 4 T-States 10 T-StatesUsing a Register Pair as a Loop Counter â⬠¢ Using the same formula from before, we can calculate: â⬠¢ TO = 10 T-States ââ¬â The delay for the LXI instruction â⬠¢ TL = (24 X 4096) ââ¬â 3 = 98301 T- States ââ¬â 24 T-States for the 4 instructions in the loop repeated 4096 times (100016 = 409610) reduced by the 3 TStates for the JNZ in the last iterat ion. Nested Loops â⬠¢ Nested loops can be easily setup in Assembly language by using two registers for the two loop counters and updating the right register in the right loop. ââ¬â In the figure, the body of loop2 can be before or after loop1.Initialize loop 2 Body of loop 2 Initialize loop 1 Body of loop 1 Update the count1 No Is this Final Count? Yes Update the count 2 No Is this Final Count? Yes Nested Loops for Delay â⬠¢ Instead (or in conjunction with) Register Pairs, a nested loop structure can be used to increase the total delay produced. MVI B, 10H LOOP2 MVI C, FFH LOOP1 DCR C JNZ LOOP1 DCR B JNZ LOOP2 7 T-States 7 T-States 4 T-States 10 T-States 4 T-States 10 T-States Delay Calculation of Nested Loops â⬠¢ The calculation remains the same except that it the formula must be applied recursively to each loop. Start with the inner loop, then plug that delay in the calculation of the outer loop. â⬠¢ Delay of inner loop ââ¬â TO1 = 7 T-States â⬠¢ MVI C, FFH instruction ââ¬â TL1 = (255 X 14) ââ¬â 3 = 3567 T-States â⬠¢ 14 T-States for the DCR C and JNZ instructions repeated 255 Delay Calculation of Nested Loops â⬠¢ Delay of outer loop ââ¬â TO2 = 7 T-States â⬠¢ MVI B, 10H instruction ââ¬â TL1 = (16 X (14 + 3574)) ââ¬â 3 = 57405 T-States â⬠¢ 14 T-States for the DCR B and JNZ instructions and 3574 T-States for loop1 repeated 16 times (1016 = 1610) minus 3 for the final JNZ. ââ¬â TDelay = 7 + 57405 = 57412 T-States â⬠¢ Total Delay ââ¬â TDelay = 57412 X 0. 5 à µSec = 28. 06 mSec Increasing the delay â⬠¢ The delay can be further increased by using register pairs for each of the loop counters in the nested loops setup. â⬠¢ It can also be increased by adding dummy instructions (like NOP) in the body of the loop. Timing Diagram Representation of Various Control signals generated during Execution of an Instruction. Following Buses and Control Signals must be shown in a Timing Diagram: â ⬠¢Higher Order Address Bus. â⬠¢Lower Address/Data bus â⬠¢ALE â⬠¢RD â⬠¢WR â⬠¢IO/M Timing Diagram Instruction: A000h MOV A,B Corresponding Coding: A000h 78 Timing Diagram Instruction: A000h MOV A,B Corresponding Coding: A000h 78OFC 8085 Memory Timing Diagram Instruction: A000h MOV A,B 00h T1 T2 T3 T4 A0h A15- A8 (Higher Order Address bus) Corresponding Coding: A000h 78 78h ALE RD OFC WR 8085 Memory IO/M Op-code fetch Cycle Timing Diagram Instruction: A000h MVI A,45h Corresponding Coding: A000h A001h 3E 45 Timing Diagram Instruction: A000h MVI A,45h OFC MEMR Corresponding Coding: A000h A001h 3E 45 8085 Memory Timing Diagram T1 T2 T3 T4 T5 T6 T7 A0h A0h A15- A8 (Higher Order Address bus) 00h 3Eh 01h 45h DA7-DA0 (Lower order address/data Bus) Instruction: A000h MVI A,45h Corresponding Coding: A000h A001h 3E 45 WR RD ALEIO/M Op-Code Fetch Cycle Memory Read Cycle Timing Diagram Instruction: A000h LXI A,FO45h Corresponding Coding: A000h A001h A002h 21 45 F0 Timing Dia gram Instruction: A000h LXI A,FO45h OFC MEMR MEMR Corresponding Coding: A000h A001h A002h 21 45 F0 8085 Memory Timing Diagram Op-Code Fetch Cycle Memory Read Cycle Memory Read Cycle T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 A0h A0h A0h A15- A8 (Higher Order Address bus) 00h 21h 01h 45h 02h F0h DA7-DA0 (Lower order address/data Bus) ALE RD WR IO/M Timing Diagram Instruction: A000h MOV A,M Corresponding Coding: A000h 7E Timing Diagram Instruction: A000h MOV A,MOFC MEMR Corresponding Coding: A000h 7E 8085 Memory Timing Diagram T1 T2 T3 T4 T5 T6 T7 A0h Content Of Reg H A15- A8 (Higher Order Address bus) Instruction: A000h MOV A,M Corresponding Coding: A000h 7E 00h 7Eh L Reg Content Of M DA7-DA0 (Lower order address/data Bus) ALE RD WR IO/M Op-Code Fetch Cycle Memory Read Cycle Timing Diagram Instruction: A000h MOV M,A Corresponding Coding: A000h 77 Timing Diagram Instruction: A000h MOV M,A OFC MEMW Corresponding Coding: A000h 77 8085 Memory Timing Diagram T1 T2 T3 T4 T5 T6 T7 A0h Content Of Reg H A15- A8 (Higher Order Address bus)Instruction: A000h MOV M,A Corresponding Coding: A000h 77 00h 7Eh L Reg Content of Reg A DA7-DA0 (Lower order address/data Bus) ALE RD WR IO/M Op-Code Fetch Cycle Memory Write Cycle Chapter 9 Stack and Subroutines The Stack â⬠¢ The stack is an area of memory identified by the programmer for temporary storage of information. â⬠¢ The stack is a LIFO structure. ââ¬â Last In First Out. â⬠¢ The stack normally grows backwards into memory. ââ¬â In other words, the programmer defines the bottom of the stack and the stack grows up into reducing address range. The Stack grows backwards into memory Memory Bottom of the Stack The Stack Given that the stack grows backwards into memory, it is customary to place the bottom of the stack at the end of memory to keep it as far away from user programs as possible. â⬠¢ In the 8085, the stack is defined by setting the SP (Stack Pointer) register. LXI SP, FFFFH â⬠¢ This sets the Stack Pointer to location FFFFH (end of memory for the 8085). Saving Information on the Stack â⬠¢ Information is saved on the stack by PUSHing it on. ââ¬â It is retrieved from the stack by POPing it off. â⬠¢ The 8085 provides two instructions: PUSH and POP for storing information on the stack and retrieving it back. ââ¬â Both PUSH and POP work with register pairs ONLY.The PUSH Instruction â⬠¢ PUSH B ââ¬â Decrement SP ââ¬â Copy the contents of register B to the memory location pointed to by SP ââ¬â Decrement BSP C F3 12 ââ¬â Copy the contents of register C to the memory location pointed to by SP F3 FFFB FFFC FFFD FFFE FFFF 12 SP The POP Instruction â⬠¢ POP D ââ¬â Copy the contents of the memory location pointed to by the SP to register E ââ¬â Increment SP ââ¬â Copy the contents of the memory location D E F3 12 pointed to by the SP to register D ââ¬â Increment SP F3 SP FFFB FFFC FFFD FFFE FFFF 12 Operation of the Stack â⬠¢ During pushing, the stack operates in a ââ¬Å"decrement then storeâ⬠style. The stack pointer is decremented first, then the information is placed on the stack. â⬠¢ During poping, the stack operates in a ââ¬Å"use then incrementâ⬠style. ââ¬â The information is retrieved from the top of the the stack and then the pointer is incremented. â⬠¢ The SP pointer always points to ââ¬Å"the top of the stackâ⬠. LIFO â⬠¢ The order of PUSHs and POPs must be opposite of each other in order to retrieve information back into its original location. PUSH B PUSH D â⬠¦ POP D POP B The PSW Register Pair â⬠¢ The 8085 recognizes one additional register pair called the PSW (Program Status Word). This register pair is made up of the Accumulator and the Flags registers. â⬠¢ It is possible to push the PSW onto the stack, do whatever operations are needed, then POP it off of the stack. ââ¬â The result is that the contents of the Accumulator and the status of the Flags are ret urned to what they were before the operations were executed. Subroutines â⬠¢ A subroutine is a group of instructions that will be used repeatedly in different locations of the program. ââ¬â Rather than repeat the same instructions several times, they can be grouped into a subroutine that is called from the different locations. In Assembly language, a subroutine can exist anywhere in the code. ââ¬â However, it is customary to place subroutines separately from the main program. Subroutines â⬠¢ The 8085 has two instructions for dealing with subroutines. ââ¬â The CALL instruction is used to redirect program execution to the subroutine. ââ¬â The RTE insutruction is used to return the execution to the calling routine. The CALL Instruction â⬠¢ CALL 4000H ââ¬â Push the address of the instruction immediately following the CALL onto the stack 2000 CALL 4000 2003 counter ââ¬â Load the program PC 2 0 0 3with the 16-bit address supplied with the CALL instructi on. FFFB FFFC FFFD FFFE FFFF 3 20 SP The RTE Instruction â⬠¢ RTE ââ¬â Retrieve the return address from the top of the stack ââ¬â Load the program counter with the return address. 2003 PC 4014 4015 â⬠¦ RTE FFFB FFFC FFFD FFFE FFFF 03 20 SP Cautions â⬠¢ The CALL instruction places the return address at the two memory locations immediately before where the Stack Pointer is pointing. ââ¬â You must set the SP correctly BEFORE using the CALL instruction. â⬠¢ The RTE instruction takes the contents of the two memory locations at the top of the stack and uses these as the return address. ââ¬â Do not modify the stack pointer in a subroutine. You will loose the return address.Passing Data to a Subroutine â⬠¢ In Assembly Language data is passed to a subroutine through registers. ââ¬â The data is stored in one of the registers by the calling program and the subroutine uses the value from the register. â⬠¢ The other possibility is to use agreed upon mem ory locations. ââ¬â The calling program stores the data in the memory location and the subroutine retrieves the data from the location and uses it. Call by Reference and Call by Value â⬠¢ If the subroutine performs operations on the contents of the registers, then these modifications will be transferred back to the calling program upon returning from a subroutine. Call by reference â⬠¢ If this is not desired, the subroutine should PUSH all the registers it needs on the stack on entry and POP them on return. ââ¬â The original values are restored before execution returns to the calling program. Cautions with PUSH and POP â⬠¢ PUSH and POP should be used in opposite order. â⬠¢ There has to be as many POPââ¬â¢s as there are PUSHââ¬â¢s. ââ¬â If not, the RET statement will pick up the wrong information from the top of the stack and the program will fail. â⬠¢ It is not advisable to place PUSH or POP inside a loop. Conditional CALL and RTE Instructions à ¢â¬ ¢ The 8085 supports conditional CALL and conditional RTE instructions. The same conditions used with conditional JUMP instructions can be used. ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â CC, call subroutine if Carry flag is set. CNC, call subroutine if Carry flag is not set RC, return from subroutine if Carry flag is set RNC, return from subroutine if Carry flag is not set Etc. A Proper Subroutine â⬠¢ According to Software Engineering practices, a proper subroutine: ââ¬â Is only entered with a CALL and exited with an RTE ââ¬â Has a single entry point â⬠¢ Do not use a CALL statement to jump into different points of the same subroutine. ââ¬â Has a single exit point â⬠¢ There should be one return statement from any subroutine. Following these rules, there should not be any confusion with PUSH and POP usage. The Design and Operation of Memory Memory in a microprocessor system is where information (data and instructions) is kept. It can be classified into t wo main types: ? ? Main memory (RAM and ROM) Storage memory (Disks , CD ROMs, etc. ) The simple view of RAM is that it is made up of registers that are made up of flip-flops (or memory elements). ? ROM on the other hand uses diodes instead of the flip-flops to permanently hold the information. The number of flip-flops in a ââ¬Å"memory registerâ⬠determines the size of the memory word. Accessing Information in Memory For the microprocessor to access (Read or Write) information in memory (RAM or ROM), it needs to do the following: Select the right memory chip (using part of the address bus). Identify the memory location (using the rest of the address bus). Access the data (using the data bus). 2 Tri-State Buffers An important circuit element that is used extensively in memory. This buffer is a logic circuit that has three states: Logic 0, logic1, and high impedance. When this circuit is in high impedance mode it looks as if it is disconnected from the output completely.The Outp ut is Low The Output is High High Impedance 3 The Tri-State Buffer This circuit has two inputs and one output. The first input behaves like the normal input for the circuit. The second input is an ââ¬Å"enableâ⬠. ? ? If it is set high, the output follows the proper circuit behavior. If it is set low, the output looks like a wire connected to nothing. Output Input OR Input Output Enable Enable 4 The Basic Memory Element The basic memory element is similar to a D latch. This latch has an input where the data comes in. It has an enable input and an output on which data comes out. Data Input D Data Output QEnable EN 5 The Basic Memory Element However, this is not safe. Data is always present on the input and the output is always set to the contents of the latch. To avoid this, tri-state buffers are added at the input and output of the latch. Data Input D Data Output Q RD Enable EN WR 6 The Basic Memory Element The WR signal controls the input buffer. The bar over WR means that thi s is an active low signal. So, if WR is 0 the input data reaches the latch input. If WR is 1 the input of the latch looks like a wire connected to nothing. The RD signal controls the output in a similar manner. A Memory ââ¬Å"Registerâ⬠If we take four of these latches and connect them together, we would have a 4-bit memory register I0 WR I1 I2 I3 D Q EN EN RD D Q EN D Q EN D Q EN O0 O1 O2 O3 8 A group of memory registers D0 o D1 o o D2 o D3 WR D EN Q D EN Q D EN Q D EN Q D Q D EN Q D EN Q D EN Q Expanding on this scheme to add more memory registers we get the diagram to the right. EN D EN Q D EN Q D EN Q D EN Q D EN Q D EN Q D EN Q D EN Q o o o o RD D0 D1 D2 9 D3 Externally Initiated Operations External devices can initiate (start) one of the 4 following operations: Reset ?All operations are stopped and the program counter is reset to 0000. The microprocessorââ¬â¢s operations are interrupted and the microprocessor executes what is called a ââ¬Å"service routineâ⬠. Th is routine ââ¬Å"handlesâ⬠the interrupt, (perform the necessary operations). Then the microprocessor returns to its previous operations and continues. Interrupt ? ? 10 A group of Memory Registers If we represent each memory location (Register) as a block we get the following I0 I1 I2 I3 WR EN0 EN1 EN2 EN3 RD O0 Input Buffers Memory Reg. 0 Memory Reg. 1 Memory Reg. 2 Memory Reg. 3 Output Buffers O1 O2 O3 11The Design of a Memory Chip Using the RD and WR controls we can determine the direction of flow either into or out of memory. Then using the appropriate Enable input we enable an individual memory register. What we have just designed is a memory with 4 locations and each location has 4 elements (bits). This memory would be called 4 X 4 [Number of location X number of bits per location]. 12 The Enable Inputs How do we produce these enable line? Since we can never have more than one of these enables active at the same time, we can have them encoded to reduce the number of line s coming into the chip.These encoded lines are the address lines for memory. 13 The Design of a Memory Chip So, the previous diagram would now look like the following: I I I I 0 1 2 3 WR A d d r e s s D e c o d e r Input Buffers Memory Reg. 0 Memory Reg. 1 Memory Reg. 2 Memory Reg. 3 Output Buffers A1 A0 RD O0 O1 O2 O3 14 The Design of a Memory Chip Since we have tri-state buffers on both the inputs and outputs of the flip flops, we can actually use one set of pins only. Input Buffers WR A1 A0 A D The chip Memory Reg. now look likeDthis: would 0 d e 0 D0 A1 A0 D1 D2 D3 d r e s s c o d e r Memory Reg. 1 Memory Reg. 2 Memory Reg. Output Buffers D1 D2 D3 RD RD WR 15 The steps of writing into Memory What happens when the programmer issues the STA instruction? The microprocessor would turn on the WR control (WR = 0) and turn off the RD control (RD = 1). The address is applied to the address decoder which generates a single Enable signal to turn on only one of the memory registers. The da ta is then applied on the data lines and it is stored into the enabled register. 16 Dimensions of Memory Memory is usually measured by two numbers: its length and its width (Length X Width). ? ? The length is the total number of locations.The width is the number of bits in each location. The length (total number of locations) is a function of the number of address lines. # of memory locations = 2( # of address lines) 210 = 1024 locations (1K) ? So, a memory chip with 10 address lines would have Looking at it from the other side, a memory chip with 4K locations would need ? Log2 4096=12 address lines 17 The 8085 and Memory The 8085 has 16 address lines. That means it can address 216 = 64K memory locations. Then it will need 1 memory chip with 64 k locations, or 2 chips with 32 K in each, or 4 with 16 K each or 16 of the 4 K chips, etc. ow would we use these address lines to control the multiple chips? 18 Chip Select Usually, each memory chip has a CS (Chip Select) input. The chip wil l only work if an active signal is applied on that input. To allow the use of multiple chips in the make up of memory, we need to use a number of the address lines for the purpose of ââ¬Å"chip selectionâ⬠. These address lines are decoded to generate the 2n necessary CS inputs for the memory chips to be used. 19 Chip Selection Example Assume that we need to build a memory system made up of 4 of the 4 X 4 memory chips we designed earlier.We will need to use 2 inputs and a decoder to identify which chip will be used at what time. The resulting design would now look like the one on the following slide. 20 Chip Selection Example RD WR D0 D1 RD WR A0 A1 CS RD WR A0 A1 CS RD WR A0 A1 CS RD WR A0 A1 CS A0 A1 A2 A3 2 X4 Decoder 21 Memory Map and Addresses The memory map is a picture representation of the address range and shows where the different memory chips are located within the address range. 0000 0000 EPROM 3FFF 4400 Address Range of EPROM Chip Address Range RAM 1 RAM 2 RAM 3 Ad dress Range of 1st RAM Chip 5FFF 6000 Address Range of 2nd RAM Chip FFF 9000 A3FF A400 Address Range of 3rd RAM Chip RAM 4 F7FF FFFF Address Range of 4th RAM Chip 22 Address Range of a Memory Chip The address range of a particular chip is the list of all addresses that are mapped to the chip. An example for the address range and its relationship to the memory chips would be the Post Office Boxes in the post office. â⬠¢ Each box has its unique number that is assigned sequentially. (memory locations) â⬠¢ The boxes are grouped into groups. (memory chips) â⬠¢ The first box in a group has the number immediately after the last box in the previous group. 23 Address Range of a Memory ChipThe above example can be modified slightly to make it closer to our discussion on memory. â⬠¢ Letââ¬â¢s say that this post office has only 1000 boxes. â⬠¢ Letââ¬â¢s also say that these are grouped into 10 groups of 100 boxes each. Boxes 0000 to 0099 are in group 0, boxes 0100 to 01 99 are in group 1 and so on. We can look at the box number as if it is made up of two pieces: â⬠¢ The group number and the boxââ¬â¢s index within the group. â⬠¢ So, box number 436 is the 36th box in the 4th group. The upper digit of the box number identifies the group and the lower two digits identify the box within the group. 24The 8085 and Address Ranges The 8085 has 16 address lines. So, it can address a total of 64K memory locations. If we use memory chips with 1K locations each, then we will need 64 such chips. The 1K memory chip needs 10 address lines to uniquely identify the 1K locations. (log21024 = 10) That leaves 6 address lines which is the exact number needed for selecting between the 64 different chips (log264 = 6). 25 The 8085 and Address Ranges Now, we can break up the 16-bit address of the 8085 into two pieces: A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 Chip Selection Location Selection within the ChipDepending on the combination on the address lines A15 ââ¬â A10 , the address range of the specified chip is determined. 26 Chip Select Example A chip that uses the combination A15 ââ¬â A10 = 001000 would have addresses that range from 2000H to 23FFH. Keep in mind that the 10 address lines on the chip gives a range of 00 0000 0000 to 11 1111 1111 or 000H to 3FFH for each of the chips. The memory chip in this example would require the following circuit on its chip select input: A 10 A 11 A 12 A 13 A 14 A 15 CS 27 Chip Select Example If we change the above combination to the following: A 10 A 11 A 12 A 13 A 14 A 15 CSNow the chip would have addresses ranging from: 2400 to 27FF. Changing the combination of the address bits connected to the chip select changes the address range for the memory chip. 28 Chip Select Example To illustrate this with a picture: ? ? in the first case, the memory chip occupies the piece of the memory map identified as before. In the second case, it occupies the piece identified as after. Before Af ter 0000 2000 23FF 2400 27FF 0000 FFFF FFFF 29 High-Order vs. Low-Order Address Lines The address lines from a microprocessor can be classified into two types: High-Order ? Low-Order ?
Subscribe to:
Posts (Atom)