Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
programming paralel port
Hi,
I'm trying to find some info on how to do basic programming on mac parallel
port ttya or ttyb.
I came up with the following algorithm
set pin1 high
|
check if pin2 is high
|
/ \
High Low -> go to check if pin2 is high
|
write character to a file -> go to check if pin2 is high
pin1 and pin2 are connected to a shaft sensor which gives n amount of short
circuits in 1 revolution
pin1
|
= shaft sensor
|
pin2
uname (just in case)
[wally@macppc ~]$ uname -a
NetBSD macppc 3.0 NetBSD 3.0 (GENERIC) #0: Mon Dec 19 01:25:38 UTC 2005
builds%b2.netbsd.org@localhost:/home/builds/ab/netbsd-3-0-RELEASE/macppc/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/macppc/compile/GENERIC
macppc
I found some examples of doing something similar (turning LED connected to
parallel port) on x86, *nix based systems and the codes did not look that long
the thing that draw my attention was
#include <asm/asm.h> (assembler header file for x86 instruction set), I tried
looking for this file on my system and it comes up under
/usr/include/macppc/asm.h
/usr/include/powerpc/asm.h
(macppc/asm.h simply points to powerpc/asm.h which has 266 lines of code)
Thanks everyone for your ideas
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited
____________________________________________________________________________________
Don't get soaked. Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather
Home |
Main Index |
Thread Index |
Old Index