please dont rip this site

Ubicom SX to IBM PC EPP Parallel port interface

from Alberto Geraci of BTX Systemas

Dear James.

At first I want to tell you that this code is too much simple, it has only 3 lines for the EPP programming port: One for indicate the address port, another to configure control port, and the third to read the port.

Even, I'm sending the entire VISUAL C++ ( Version 6.0 ) project, so you can check it.

It is an example, that shows in one dialog screen, the one byte value repetitively sended by an ADC08831 ( serial output A/D converter ) who is controlled by an SX processor.

The SX  make too, the handshaking protocol to comunicate with the port.

I'm sending to you the SX code too, and please !!!!!!! don't scare with the SX code, specially the A/D conversion part, it is not an advance code at all, but it works ok.

The program will shows you, the samples taked by the A/D each 20 mSec. To increase the port speed you need to use another "read port"method, like including the _inp instruction, into a "for" or a "while" bucle. I did it with my "capture camera" software just a few months ago, obviusly I was using a flash A/D ( CA3306 ) converter in that situation. That was a more complicated aplication but the idea to controll the port was the same, I think, that this example, is closely enough simple to demostrate, how the EPP port works.

Pls, I would thank you, if you tell me, which is your opinion about all this code to .


Alberto Geraci

BTX Sistemas.


James Newton says "If I had known it was that easy, I would have been doing this years ago!"

The circuit is simple: For the parallel port, rb.0 is the WAIT line and rb.1 is the Data Strobe line... and RC is D0-D7...  The ADC converter is connected to the SX with CLK equ rb.6, D0 equ rb.7, CS equ rb.5.

The "bulk" of the C++ code is in the adcDlg.cpp file and looks like this:

void CAdcDlg::OnEmpezar() // OnOpen in Spanish?
	// TODO: Add your control notification handler code here
	m_uTimerID = SetTimer(0x451,20,NULL); // Will read port each 20 msec.
	ctrl=0x378; // LPT1 port
	_outp(ctrl+2, 36); //  Init EPP Control register. 

void CAdcDlg::OnTimer(UINT nIDEvent) 
	// TODO: Add your message handler code here and/or call default
			m_dato=_inp(ctrl+4); // Read data from port

The SX EPP interface "virtual peripheral" is only this:

salida_puerto	;Spanish for "exit_port"
		clrb	rb.0	 ; WAIT line
nopasa		snb	rb.1	 ; Data Strobe line 
		jmp	nopasa	 ; 
		setb	rb.0
yafue		sb	rb.1	 ; finish the handshaking when the rb.1 is high 
		jmp	yafue

Alberto says:

YAFUE is reality 2 words one is YA and the another one is FUE, the mean of this is like IT WAS or WENT, when somebody dies we said YA FUE or when something occurs ( past ) we said YA FUE too.

The translator said the following: YA = ALREADY and FUE is the past of GO


file: /Techref/scenix/lib/io/epp-ag.htm, 3KB, , updated: 2007/4/28 06:34, local time: 2024/7/18 04:37,

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> Ubicom SX to IBM PC EPP Parallel port interface from Alberto Geraci of BTX Systemas</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2024 contributors:
o List host: MIT, Site host, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!