On Sat, 9 Feb 2013, Klemen Dovrtel wrote:
> Date: Sat, 9 Feb 2013 02:20:37 -0800 (PST)
> From: Klemen Dovrtel <[email protected]>
> To: Peter C. Wallace <[email protected]>,
> "Enhanced Machine Controller (EMC)" <[email protected]>
> Subject: Re: [Emc-users] EPP data transfers
>
> Now i added the timeout errors checking (code below), but still the same.
>
> I noticed that the address_strobe line is low when i start the pc, and stays
> low even when i execute my code. But then after I run the hal-hostmot, the
> address_strobe goes to 1. So it seems that in my code the epp was not set
> correctly, i dont know why, i have the outb(0x80,extctrl_addr).
>
>
My guess is that you have not setup the parallel port control register
properly for EPP, EPP mode is somewhat strange in that all the normal
control register output bits still work the normal way via control register
writes, so the control register needs to be set in the proper state for EPP
mode transfers to work. The control register (EPPIdleControl in the code
below) value needs to be 0x04.
procedure EPPInit(ourport : word);
var dbyte : byte;
begin
dbyte := port[ourport+$402];
dbyte := dbyte and $5F;
dbyte := dbyte or $80;
port[ourport+$402] := dbyte; {set EPP mode if not already there }
DataPort := ourport;
ContPort := ourport + ContOfs;
StatPort := ourport + StatOfs;
EPPDataPort := ourport + EPPDataOfs;
EPPAddressPort := ourport + EPPAddressOfs;
port[ContPort] := EPPIdleControl;
port[StatPort] := EPPTimeout;
end;
Peter Wallace
Mesa Electronics
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users