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.

PPI 8255 w parallel port 0x378

Status
Not open for further replies.

Ctrl_Alt_Del

New Member
hi, this is my schematic :

**broken link removed**

#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
#include <dos.h>

void main()
{
do
{
outportb(0x378, 0x80); <--- (0x80 ) set all PPI ports to output mode (10000000)
delay(900);
outportb(0x37a, 0x00); <--- makes the PPI read address A0 and A1 read with 0x80 data,
delay(900); <--- C0 and C1 at parallel port 0x37a are inverted, means 0 are 1, and 1 are 0
outportb(0x37a, 0x03);
delay(900);
outportb(0x378,0x00); <--- output to portA with data 00
delay(900);
outportb(0x378,0x01); <--- output to portA with data 01
delay(900);
outportb(0x378,0x02);
delay(900);
outportb(0x378,0x04);
delay(900);
}
while (!kbhit());
}

why it isnt working..?

but what i have look with 'port analysis' , output from parallel port does working... its running..
but it wont "get in" to 8255 chip..
and also i use "giveio" program to open ports with winXp

**broken link removed**


and how high does voltage from data bus D0-D7 output from parallel port ? is it 5v ?
because my computer only gives less than 2 volt..
is that enoungh to work with 8255 ?
 
HI,
You have connected /WR to logic 0 permenantely,
So the 8255 is always in write mode
but when you write something to 8255 and to transfer that data to the actual pin, the /WR has to go high and after some delay the data appears on the port pins

https://www.electro-tech-online.com/custompdfs/2005/05/fn2969.pdf
refer to waveforms on page 7 in the above link
 
WR to HIGH ?

isnt if i want to send data from D0-D7 paralel port to control word PPI8255 it require LOW for WR ?
and from parelel port to port A PPI8255 also require LOW for WR ?

or i just doin wrong.. :lol:
 

Attachments

  • wrrd.gif
    wrrd.gif
    13.7 KB · Views: 956
Have you properly reset the 8255 when it is first powered ON before sending commands to set its operating mode?
 
Check the below figure
When /WR is low the data is written to port A register
and when /WR becomes high the data in port A regsiter appears at output which is the physical pin
 

Attachments

  • output_195.gif
    output_195.gif
    5.4 KB · Views: 620
ctrl-alt ,
notice that on the rising edge of your Write signal is when the data is available..
now i am not positive on this , but , you may still have to latch the data ,to be able to see it..
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top