Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to make active INTR using mode 1 in 8255 PPI?

Status
Not open for further replies.

Moof

Full Member level 2
Full Member level 2
Joined
Nov 21, 2003
Messages
149
Helped
7
Reputation
14
Reaction score
3
Trophy points
1,298
Location
Argentina
Activity points
1,230
Using Mode 1, i dont figure out how can i make te INTR active, bcos i dont uderstand how to make active INTE A or INTE B
 

Re: 8255 PPI Problem

In Mode1 if you want to send or receive a byte you can use only registers A and B. Register C is used to generate/receice control signals for data exchange with acknowlegment.. As inputs:(PC5=IBFA, PC4=STBA, PC3=INTA, PC2=STBB, PC1=IBFB, PC0=INTB)..As outputs: (PC7=OBFA, PC6...)
If you want to write a byte to RegA or RegB the CPU clears bit STB and the 8255 then sets bit IBF (busy). On the rising edge of the STB the 8255 sets INT A (or B), on the falling edge of the INT the CPU generates RD and on the rising edge of RD the IBF is cleared... I better include a small diagram which explains the way INTs are set..

Just remember (as inputs) RD and STB are set and cleared by CPU, IBF and INT are set and cleared by 8255; (as outputs) WR and ACK from CPU, OBF and INT from 8255..
 

Re: 8255 PPI Problem

I understand what you mean Ian, but the datasheet says that the INT is active for port A if you set to one INTE A and INTB is active if you set the INTE B por port b of course, i understand perfect how the PPI works and i make it work, but as i said before i dont know how can i make te INT active, for the PORTS!!. I mean how i should "program" the ppi to make it active, not how to make the hard. :cry:
 

Re: 8255 PPI Problem

It is not you who will set/clear the INTA,B pins. This will be done by 8255 after you follow the write or read byte sequence.
First you have to Command Register (address A0=1, A1=1) and select MODE 1 for both ports and select Port as Input or Output.
Next step will be to connect INTA and B trough NEGATION (most of CPUs accept interrupts as active LOW level or edge).
Select port A (A0 and A1 =0)
Say, you would like to read byte from PORTA. One of your I/Os from CPU has to be connected to STA, another one to IBF. Clear this bit: this will set STBA=0. The 8255 will respond by setting bit IBF=1. Set the STB bit back to 1, 8255 will set INTA=1 and within the Interrupt subroutine you will read byte from PORTA (MOV A, xxx, depending on the type of CPU that you intend to use)...it is like command-response..
 

    Moof

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top