parallel port control

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
User avatar
bigbass
Contributor
Contributor
Posts: 151
Joined: 13 Jan 2012, 14:35
Distribution: slackware 14

parallel port control

Post#1 by bigbass » 26 Feb 2012, 04:14

I did something like this years ago in MSDOS in Qbasic
and always wanted to do it in linux so here it is

maybe you want to control some devices from your PC :)

this is very basic but does the job
I wrote the binary in BaCon and compiled a C app for the backend
the source code is included in doc

*I tested this and its working with my multi-meter*
pin 25 ground then pins 2-9 are the eight bits we use


and input 1-8 ( 0 will turn off the led or device)

run

Code: Select all

./ascii-test2
http://bigbass-porteus.googlecode.com/f ... 1_PORT.tgz


pin outs
http://www.labbookpages.co.uk/electroni ... lPort.html

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: parallel port control

Post#2 by Hamza » 28 Feb 2012, 08:48

MSDOS can't works with Linux..At least I know at the moment.

MSDOS on Windows is Shell on Linux. One is not buggy and not free, and the other is free and buggy-free.

I was playing with DVB too :oops:
NjVFQzY2Rg==

User avatar
bigbass
Contributor
Contributor
Posts: 151
Joined: 13 Jan 2012, 14:35
Distribution: slackware 14

Re: parallel port control

Post#3 by bigbass » 28 Feb 2012, 14:45

the app I wrote is 100% linux and uses BaCon


BaCon is the linux version of the the old basic language but many times more powerful because you can call gtk to build GUI's


it also lets you compile the code into a binary so it doesnt run as a script ( it could though also while testing )
the code goes though a C code conversion all the code is converted to C and compiled
this is done without having to know anything about C code it is done automatically you write in BaCon basic the compiler converts the code to C and compiles it to a binary

this way you get fast code ! and you dont have to learn C :)

http://www.basic-converter.org/
http://www.basic-converter.org/documentation.html

Joe

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: parallel port control

Post#4 by Hamza » 28 Feb 2012, 15:26

Be careful with ads ;) This is like AutoIt ?
NjVFQzY2Rg==

Post Reply