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.

help regarding interfacing 82c55 ic with atmega 16

Status
Not open for further replies.
Hello everyone,
Guys i am facing problem in interfacing 82C55 with Atmega16. I want to control many I/O's through avr thats why i chose 82c55 but the problem is when i configure its control word by sending 80H to make all ports output then i send data for portA but the IC doesnot respond. What might be the problem. ???It would be very kind of you if any one can help me in solving this problem.


The proteus file is also attached for reference.
 

Attachments

  • proteus image.jpg
    proteus image.jpg
    129.3 KB · Views: 805
i have to just control output devices and dont want to take any input from I.C thats y i tied it to gnd am i wrong what should i do to make it correct i should control it by uC?
 
Looks like you need to phyically use /WR to latch out the port

Simple code that works... I use pic's but you'll get the gist..
C:
#include<xc.h>

void DlyUs(int x)
   {
   x>>=3;
   while(x--);
   }
   
void DlyMs(int x)
   {
   while(x--)
     DlyUs(1000);
   }
   
void main()
   {
   int x = 0;
   TRISD = 0;
   TRISC = 0xfe;
   TRISE = 0;
   
   DlyMs(250);

   RC0 = 0;
   DlyUs(10);
   PORTD = 0x80;
   PORTE = 3;   
   RC0 = 1;
   RC0 = 0;
   DlyUs(10);
   PORTD = 0x0;
   PORTE = 0;
   RC0 = 1;
   while(1)
     {
     RC0 = 0;
     DlyUs(10);
     PORTD = x++;   
     RC0 = 1;
     DlyMs(250);           
     }   
   }

Connected so...
 

Attachments

  • 8255a.BMP
    88.9 KB · Views: 560
Mike is right. The data from d0-d7 only transfer to port A with a low pulse on the WR pin.
Each pin on 82C55a can only source or sink 2.5mA of current.

8255A PIC.PNG
Allen
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top