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 ?
 
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
    13.7 KB · Views: 965
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
    5.4 KB · Views: 628
Is all you want to do drive 4 LED's from your parallel port?, if so, why are you messing about with an 8255?.
 
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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…