The 8051 Microcontroller and Embedded

(lily) #1
Department of Computer Scien

ce and Information Engineering

National Cheng Kung University, TAIWAN
HANEL

PROGRAMMING THE 82558255 Features


(cont’)


‰PA0 - PA7 (8-bit port A)


¾Can be programmed as all input or output, or all bits as bidirectional input/output


‰PB0 - PB7 (8-bit port B)


¾Can be programmed as all input or output, but cannot be used as a bidirectional port


‰PC0


– PC7 (8-bit port C)


¾Can be all input or output¾Can also be split into two parts:


ƒCU (upper bits PC4 - PC7)ƒCL (lower bits PC0



  • PC3)


each can be used for input or output¾Any of bits PC0 to PC7 can be programmed individually


(^8255) A
PA3PA2PA1PA0-RD-CSGNDA1A0PC7PC6PC5PC4PC0PC1PC2PC3PB0PB1PB2
PA4PA5PA6PA7-WRRESETD0D1D2D3D4D5D6D7VccPB7PB6PB5PB4PB3
(^1234567891011121314151617181920)
4039383736353433323130292827262524232221

Free download pdf