This website uses cookies to ensure you have the best experience. Learn more

Microprocessor Interfacing Essay

589 words - 3 pages

ECET 340 – Microprocessor Interfacing
Homework Assignment #1
Name __ __________________________
IMPORTANT: Please paste your answer directly into this Microsoft Word document and then submit to your student DropBox. Do Not save it as a PDF document and then submit as I write your point values directly to the submitted document. DO NOT REMOVE THE MAXIMUM POINT VALUES FOR EACH PROBLEM IN “RED” AS I USE THIS TO HELP ME GRADE!
1. Give three examples each of internal and external peripheral devices as referenced to the HCS12 microcontroller and not an entire PC. (2 points)

The internal peripherals consist of a 16-bit central processing unit, a 128 KB of flash EEPROM, and a 4 KB of RAM.

The external peripherals can consist of a keyboard, monitor, and a matrix keypad.

2. Given “the ...view middle of the document...

Answer should be a valid C language statement. (2 points)
DDRA = 0x60;
DDRA=0x9F;

4. Write an instruction sequence to output the value $35 to PORT P. Use the C language only when writing your answer; - no assembly language. (2 points)
DDRP = 0xFF;
DDRH=0x00;
PORTP=0x35;
5. Write an instruction sequence to configure Port H for input, read in the current signal levels on the Port H pins, and store the value to a C variable called data1. Use the C language only when writing your answer, no assembly language. Also make sure to set the data direction register appropriately in your answer. (2 points)

void main(void){
char c;
DDRB = 0xff;
DDRH = 0x00;

c = data1;
PORTB = c;

}

6. Write a short program in C language which reads in the bits on port H, inverts the bits and adds 1 to the result, and then outputs the result onto port P. Be sure to include port initializations and variable declarations in your code. (2 points)

void main(void){
char c;
DDRB = 0xff; // Ports B = output
DDRH = 0x00; // Ports H = input

DDRJ = 2; // In order to use Wytec LEDs set PJ1 = output...
PTJ = 0; // ... and reset PJ1 to 0

while(1){ // while(1) creates an endless program loop.
c = PTH; // read DIP switches
PORTP = c + 1; // output to LEDs
}

}

7. Using only Ports B, H, & J, (see Figure 1} write C code to read in the value from dip switch 1 (SW1) {all 8 bits}, invert the bits, and then display the results on the 8 LEDs driven by Port B (see Figure 3). When the value is a ‘1’, the LED is ON, and when it is a ‘0’, the LED is off. See how SW1 is connected to Port H (see Figure 2), and how the LEDs are connected to Port J (see Figure 3) (2 points)

DDRH = 0x00;    
 DDRT = 0xFF;    
 DDRP = 0xF0;    

 data1 = PTH;    
 PTT = ~data1;
 data1 = PTP;    
  data1

Other Essays Like Microprocessor Interfacing

The French And Indian War: The "Real" First World War

1955 words - 8 pages The Seven Years War, or more commonly referred to as “The French and Indian War”, has been called the true First World War. In this book The French and Indian War: Deciding the Fate of North America, the author and historian Walter R. Borneman paints a detailed and elaborate picture that justifies the claim of it being the first true war of global proportions. If ever there truly was a climax to the never ending feud of the European powers

Is The Use Of Animals In Medical Research A Necessary Measure?

1513 words - 7 pages Throughout history, animals have been used in experiments to test product safety and obtain medical knowledge that benefits both humans and animals alike. Every year there are numerous medical breakthroughs, such as medications and surgical instruments, which are tested on animals to insure their safety before they are deemed acceptable for human use. Even though the results of the experiments saved millions of human lives, they are also

Education And The Evolving Job Market

2363 words - 10 pages The lives of students today are changing. They are preparing for lives and jobs that have never before existed. If teachers hope to have a significant and worthwhile impact on these quickly changing lives, they must change the way they think, prepare, and instruct our future generations. Children cannot afford to have teachers who remain stagnant in their methods and ideals. Students crave instructors that are willing to allow them to tap

Young And Relentless

1737 words - 7 pages There are numerous influences that can be responsible of teenager’s behaviors and attitude as they develop. One factor that is important to these behaviors is parental figures being over involved or uninvolved in their children’s lives. Many of these effects include illegal substance abuse, rising sexual activity, underage alcohol consumption, and tobacco use. Studies show parental participation plays a key role in the characteristics developed

The Natural Law Theory

1231 words - 5 pages Obeying by the natural law theory is the only true and moral way to live life; especially a life lived in God’s image. God’s presence is a guiding factor to obtaining a moral and virtuous life, which can only be obtained by following the natural law theory. God created a set of laws as a supreme guide for humans to live life, like any law these laws were created to ensure wellbeing for everyone. The laws he created are the civil law, the natural

Resolved: Presidential Signing Statements Threaten To Undermine The Rule Of Law And The Separation Of Powers

1811 words - 8 pages The subject of signing statements has created much debate among the houses of Congress, government officials, and the public alike. These signing statements fall under the categories of constitutional and legislative history signing statements. Constitutional signing statements are those in which the president deems certain provisions of the legislation as unconstitutional, therefore they should not be enforced (Bradley & Posner, 2006

Oppressive Systems Of Government In Egypt And Animal Farm

1529 words - 7 pages As in Egypt, Orwell demonstrates through his allegorical novel “Animal Farm” that leaders are able to establish and maintain power over a people, and in turn create an oppressive and corrupt government system. Orwell shows the significant difference in the education and levels of knowledge in the animals, and how the government takes advantage of this difference. The split between the levels of intelligence is portrayed in the first chapter when

The Pathway To Psychosis

1415 words - 6 pages “How all occasions do inform against me” is a line from act IIII, scene IIII of William Shakespeare’s Hamlet. This line, spoken by Hamlet, expresses his emotional state as he is currently overwhelmed by the death of his father, the king of Denmark, and the situation surrounding it. After Hamlet learns of his father’s death he finds out that his mother has married Claudius, Hamlet’s uncle. On top of all of that, Hamlet soon after

Rated “M” For “More Censorship Not Needed”

1241 words - 5 pages Since the moment video games became a commercial success there have been people who have pushed for unfair amounts of censorship to be placed upon the content of the games and its availability to children. These groups push for increased regulations on content but there is already an appointed group to handle this issue, the ESRB. Even though there has been an increase in mature content in the video game industry, increased censorship is not

Four Components Of A Legally Astute Social Media Marketing Manager

1914 words - 8 pages With the advances in technology constantly changing companies have to find better ways to market their products to consumers. The explosion of Facebook has given companies a way to market products to consumers. Examine how a legally astute manager can use social media to his advantage. Review different forms of dispute resolution and determine which one works the best. What is the best course of action, the government can use to

Obama's Values

1217 words - 5 pages As individuals, we don’t tend to take action unless it’s for self-interest; however, in Dreams from My Father, Obama spends three years, after college, as a community organizer in Chicago. Obama goes through tribulations, disappointments, and even complete failures organizing meaningful events, decisive meetings, and humble gatherings but he keeps working toward achieving any possible change in the community. Even though results give him every

Related Papers

The Separation Of Capital Ownership And Control

1577 words - 7 pages The argument of whether the separation of capital ownership and control is an efficient form of organization has constantly been a controversial issue. The criticism whether the controllers’ act is in the best interest of the owners’ wills never end as long as hired managers operate management. As the number of public companies has been increasing over the course of this century, meanwhile the American style of contact based corporation has

The Versatility And Flexibility Of Oled's

1014 words - 5 pages In April 1, 2002, organic light emitting diodes gain rise in the scientific community with their published, more practical form at Ames Laboratory. “Scientists at the U.S. Department of Energy's Ames Laboratory, in collaboration with scientists at the University of Michigan, Ann Arbor, have developed and demonstrated a novel, fluorescence-based chemical sensor that is more compact, versatile and less expensive than existing technology of its

Comparing The Moral Virtues Of Antony And Julian The Apostate

1103 words - 5 pages Roman emperor Julian the Apostate and Christian leader Antony both exhibited many qualities of character during their existence. Both of them led very distinctive lives although shared several ethical values. Book 25 of “The Later Roman Empire” and the book “Early Christian Lives” show concrete evidence of this. In the following essay, I will argue how both leaders’ lives were devoted to their religious beliefs and their mutual cardinal virtues

Living In A Cashless Society Essay

1637 words - 7 pages Money in a traditional sense no longer exists. Money is becoming much of a concept than a physical material, and most ordinary bitter have not see the reality of the switch. People today are using credit and debit cards on a regular basis and in everyday situations such as meal purchased at fast food, highway tolls, clothing, groceries, gas stations, etc. all of these means of systems could be regarded as a cashless society or world. The question