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
    129.3 KB · Views: 810
How are you expecting the chip to work with /wr tied to ground?

Mike.
 
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: 566
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.


Allen
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…