8255 INTERFACING

Topics: C, Electric motor, Assembly language Pages: 6 (386 words) Published: December 15, 2014
8255 INTERFACING

1 of 6

http://what-when-how.com/8051-microcontroller/8255-interfacing/

Subscribe
what-when-how
In Depth Tutorials and Information

SECTION 15.2: 8255 INTERFACING
Chapters 12 and 13 detailed real-world interfacing of LCDs, sensors, and ADC devices. In this section we show how to interface the 8255 to LCDs, stepper motors, and ADC devices, then program it using 8051 instructions. Stepper motor connection to the 8255

Chapter 17 will detail the interface of a stepper motor to the 8051. Here we show stepper motor connection to ^ 8255 and programming. See Figure 15-9.
MOV A,#80H /control word for PA=out
MOV R1,#CRPORT ;control reg port address
MOVX @R1,A ;configure PA=out
MOV R1,#APORT /load PA address
MOV A,#66H /A=66H,stepper motor sequence
AGAIN: MOVX @R1,A /issue motor sequences to PA
RR A /rotate sequence for clockwise
ACALL DELAY /wait
SJMP AGAIN

Figure 15-9. 8255 Connection to Stepper Motor

6/9/2013 2:13 AM

8255 INTERFACING

2 of 6

http://what-when-how.com/8051-microcontroller/8255-interfacing/

LCD connection to the 8255
Figure 15-10. LCD Connection

Program 15-1 shows how to issue commands and data to an LCD connected to an 8255. See Figure 15-10. In Program 15-1, we must put a long delay before issuing any information (command or data) to the LCD. A better way is to check the busy flag before issuing anything to the LCD. This was discussed in Chapter 12. Program 15-2 is a repeat of Program 15-1 with the checking of the busy flag. Notice that no DELAY is used the main program in Program 15-2.

6/9/2013 2:13 AM

8255 INTERFACING

3 of 6

http://what-when-how.com/8051-microcontroller/8255-interfacing/

Program 15-1.

6/9/2013 2:13 AM

8255 INTERFACING

4 of 6

http://what-when-how.com/8051-microcontroller/8255-interfacing/

Program 15-2.

6/9/2013 2:13 AM

8255 INTERFACING

5 of 6

http://what-when-how.com/8051-microcontroller/8255-interfacing/

Program 15-2.
ADC connection to the 8255
ADC devices were covered in Chapter 13. The following is a program for the ADC connected to the 8255 as shown in Figure 15-11.

So far we have discussed the simple I/O mode of the 8255 and showed many applications for it using Assembly language. Next, we discuss how to program the 8255 using 8051 C language.

6/9/2013 2:13 AM

8255 INTERFACING

6 of 6

http://what-when-how.com/8051-microcontroller/8255-interfacing/

Figure 15-11. 8255 Connection to ADC804
Next post: PROGRAMMING THE 8255
Previous post: 8051 C PROGRAMMING FOR THE 8255
0

Related Topics
8051 Microcontroller
INTRODUCTION TO 8051 ASSEMBLY PROGRAMMING
BCD, ASCII, AND OTHER APPLICATION PROGRAMS
LCD INTERFACING
8051 TIMER PROGRAMMING IN ASSEMBLY AND C
IMMEDIATE AND REGISTER ADDRESSING MODES

:: Search WWH ::

Custom Search

Help Unprivileged Children ¶ Careers ¶ Privacy Statement ¶ Copyright Information

6/9/2013 2:13 AM

Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Interfacing GPS with 8051 Essay
  • Sensors and Interfacing Research Paper
  • 8051 Gsm Interfacing Essay
  • Lcd Interfacing Essay
  • Microcontroller Interfacing Research Paper
  • 8052 to Serial Interfacing Research Paper
  • Microprocessor and Interfacing Essay
  • Essay on Interfacing Is Governance with Corporate Governance

Become a StudyMode Member

Sign Up - It's Free