Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8255 C code

Status
Not open for further replies.
8255 keypad & lcd interface with the 8031 microcontrller

Hi guys,

i am connecting 8255 with 8031 controller for port expander( i have to use 8255 only, bcoz its readily available).
for 8255 i am interfacing keypad (4*4) & LCD for Port C ( PCU for ROWS & PCL for COLs), Port B for control signals for LCD(rs, rw,& en), & Port A for LCD data.

i have made hardware. Now struggling to build software using C in keil.
So kindly help me to build code for it.
 
Your professor must be very cruel to make you use a chip you will never see again once you have graduated.

Well, step (1) is to set the mode register representing which pins are inputs and output. You know which pins these are, just fill in the bits on the register. Convert the bits to a number and write it to the 8255A mode address.
 
8255 keypad & lcd interface with the 8031 microcontrller

Thanks for your valuable information.. how to find the mode address of 8255A and what about the code, do you have any code for just my refrence, how to start with it.
 
The control register is accessed when A0 and A1 are both in the '1' state. This is at the 8255A's base address +3. You can read about it in the 1980 "intel Component Data Catalog", page 8-64. They have beautiful charts that you can fill in according to the modes you want to use. Hopefully this book can be retrieved from the same place they found your 8255A's.

Since you designed and constructed the board, you already know the address of the 8255A chip select. So you add 3 to that address and read/write the command/status register.

Even if I still had code, I could never read it since the computer it was written for stopped working about 20 years ago. Modern computers cannot read the old cassette tapes.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top