1. 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.
    Dismiss Notice

help regarding interfacing 82c55 ic with atmega 16

Discussion in 'AVR' started by aamir shabbir, Oct 10, 2014.

  1. aamir shabbir

    aamir shabbir Member

    Joined:
    Sep 10, 2013
    Messages:
    48
    Likes:
    0
    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.
     

    Attached Files:

  2. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,161
    Likes:
    340
    Location:
    Brisbane Australia
    How are you expecting the chip to work with /wr tied to ground?

    Mike.
     
  3. aamir shabbir

    aamir shabbir Member

    Joined:
    Sep 10, 2013
    Messages:
    48
    Likes:
    0
    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?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,305
    Likes:
    914
    Location:
    Rochdale UK

    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..
    Code (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...
     

    Attached Files:

  6. absf

    absf Active Member

    Joined:
    Jun 18, 2012
    Messages:
    206
    Likes:
    27
    Location:
    Malaysia
    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
     

Share This Page