Searching \ for '[OT] Toggling a parallel port bit' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ios.htm?key=port
Search entire site for: 'Toggling a parallel port bit'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Toggling a parallel port bit'
2000\01\29@233258 by NCS Products

flavicon
face
Ok, I want to send a bit to a PIC pin (w/weak pullup)
from a Centronics port.

Does anyone have any code in
a readily-available language (Qbasic?)
that shows how to set a bit high/low?

Something like the Basic equivalent of

out  LPTPORT, 00000001b  ;(set D0 pin high)
out  LPTPORT, 00000000b  ;(set D0 pin low)

I can also dredge up an old copy of Borland C.

- Dom

2000\01\29@234125 by Tim Hamel

picon face
Very simple my friend...

If you do use QBASIC, it's as simple as this:

out 888, 0  'Turn 'em all off.

And

out 888, 1 'Turn bit 1 off.

Some things to note... 888 is decimal for 378h (hex) which is the normal
address for LPT1. If you're using LPT2, it would be 278h. It's very simple.
So..instead of "out 888..." you could do "Out &h378". I hope this helps
you....if not, please feel free to contact me.

Regards,

Tim Hamel


In a message dated 1/29/00 8:33:28 PM Pacific Standard Time,
spam_OUTncsTakeThisOuTspamWORLDNET.ATT.NET writes:

{Quote hidden}

2000\01\30@004424 by pannomat

flavicon
face
NCS Products wrote:
>
> Ok, I want to send a bit to a PIC pin (w/weak pullup)
> from a Centronics port.
>
> Does anyone have any code in
> a readily-available language (Qbasic?)
> that shows how to set a bit high/low?
>
> Something like the Basic equivalent of
>
> out  LPTPORT, 00000001b  ;(set D0 pin high)
> out  LPTPORT, 00000000b  ;(set D0 pin low)
>
> I can also dredge up an old copy of Borland C.
>
> - Dom
I have a lighting controller I wrote in QBASIC that sets up  an 8
channel chase on the parralel port. Really neat actually, uses a
joystick, (gameport) to toggle on or off and x for chase speed, y
controls output duration. Let me know if you could use it and i'll dig
it up.

Daniel Jircik
.....pannomatKILLspamspam@spam@swbell.net

2000\01\30@065806 by paulb

flavicon
face
NCS Products wrote:

> Ok, I want to send a bit to a PIC pin (w/weak pullup) from a
> Centronics port.

> Does anyone have any code in a readily-available language (Qbasic?)
> that shows how to set a bit high/low?

 My favourite prototyping language on the PC is Forth, using F-PC.  It
can also compile really small .COM files, but that takes some learning.

 If you only want to set it manually, or using a shell script(!), then
DEBUG will do the job.  For really simple tasks, just use DEBUG to
write little .COM files in assembler.

 Imagine!  "Hello World" in less than 20k of code!  (actually, just one
floppy disk sector!)
--
 Cheers,
       Paul B.

2000\01\30@130013 by William Chops Westfield

face picon face
I feel compelled to point out that neither qbasic nor debug are included
with "modern" computers...

BillW

2000\01\30@134233 by Craig Lee

flavicon
face
debug does.  I use it all the time.  You don't have to be a geezer to
enjoy useful tools.....  (no insult implied)

Craig

{Quote hidden}

2000\01\30@141729 by Nick Taylor

picon face
William Chops Westfield wrote:
>
> I feel compelled to point out that neither qbasic nor debug are included
> with "modern" computers...
>
> BillW

QBasic is in the \tools\oldmsdos\ directory of the Win98 upgrade CD
as are several other utilities.  I think you have to go to MSDOS 6.2
to find debug.

- Nick -

2000\01\30@141944 by Sean Breheny

face picon face
I must say that I think it is an awful shame that MS does not include
either qbasic or some simple BASIC programming tool with windows.
Programming in BASIC is how I really got started in technical stuff, and I
bet that we are loosing many people who would be good
engineers/programmers/scientists/mathematicians/(add any profession which
requires logical thought here) because they don't stumble across such a
tool when using their computer.

In many schools nowadays, students are never exposed to programming.
Computer classes are often overviews of computer/information tech. This
makes very little sense, considering that most kids have general computer
knowledge anyway!

Sean

At 11:40 AM 1/30/00 -0700, you wrote:
>debug does.  I use it all the time.  You don't have to be a geezer to
>enjoy useful tools.....  (no insult implied)
>
>Craig
>

|
| Sean Breheny
| Amateur Radio Callsign: KA3YXM
| Electrical Engineering Student
\--------------=----------------
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
EraseMEshb7spam_OUTspamTakeThisOuTcornell.edu ICQ #: 3329174

2000\01\30@144846 by hgraf

picon face
> > I feel compelled to point out that neither qbasic nor debug are included
> > with "modern" computers...
> >
> > BillW
>
> QBasic is in the \tools\oldmsdos\ directory of the Win98 upgrade CD
> as are several other utilities.  I think you have to go to MSDOS 6.2
> to find debug.

       I don't think so, my Win95 installation has it by default, I am certain
Win98 has it default as well. TTYL

2000\01\30@151208 by Sean Breheny

face picon face
Strange....I upgraded to Win98 using the Win98SE CD. It put DEBUG in my
Windows\command directory, but QBASIC is NOT there, it can be found in the
\tools\oldmsdos dir.

Before this, I upgraded from win3.1 using the win95 original upgrade. So,
there was no windows\command directory before that,so I must assume that
either win95 or 98 put debug there.

Sean


At 02:46 PM 1/30/00 -0500, you wrote:
>> > I feel compelled to point out that neither qbasic nor debug are included
>> > with "modern" computers...
>> >
>> > BillW
>>
>> QBasic is in the \tools\oldmsdos\ directory of the Win98 upgrade CD
>> as are several other utilities.  I think you have to go to MSDOS 6.2
>> to find debug.
>
>        I don't think so, my Win95 installation has it by default, I am
certain
>Win98 has it default as well. TTYL
>
|
| Sean Breheny
| Amateur Radio Callsign: KA3YXM
| Electrical Engineering Student
\--------------=----------------
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
shb7spamspam_OUTcornell.edu ICQ #: 3329174

2000\01\30@153738 by paulb

flavicon
face
In respect to Bill's comments, I can only say that toggling parallel
port bits is obviously *not* an intended purpose of "modern" computers,
is it?

Sean Breheny wrote:

> I must say that I think it is an awful shame that MS does not include
> either qbasic or some simple BASIC programming tool with windows.
> Programming in BASIC is how I really got started in technical stuff,
> and I bet that we are loosing many people who would be good
> engineers/programmers/scientists/mathematicians/(add any profession
> which requires logical thought here) because they don't stumble across
> such a tool when using their computer.

 The discussion has covered whether the tools are *actually* present,
or available, or not.

 I must agree that what you suggest is simply not consistent with the
M$ ethic.  Their software is not *for* engineers/ programmers/
scientists/ mathematicians or indeed any profession which requires
logical thought.  "Logical thought" would, and does lead one irrevocably
to Linux or, some would say, beyond.  No, their software is for
*consumers* or "purchasing units", however you see it.

> In many schools nowadays, students are never exposed to programming.
> Computer classes are often overviews of computer/information tech.
> This makes very little sense, considering that most kids have general
> computer knowledge anyway!

 To be truthful, "most kids" have general games knowledge.  Computer
courses are practical insofar as they promote the skills of operating
a computer, starting the programs and hopefully, recovering safely from
the crashes.

 Except for this last point, much the same as driving a car and for the
same reasons.  In fact, I suspect you would also bemoan current
de-skilling in automobile servicing and engineering if you considered
that also.

 *Actual* interest in the art of programming remains an elite option
pursued by those with a passion for it - the likes of *YOU* in fact.
Like you, those with the desire, will locate the tools.
--
 Cheers,
       Paul B.

2000\01\30@155854 by William Chops Westfield

face picon face
Well.  I have a "consumer" machine that is useful for finding out this
sort of thing (an almost stock eMachine.)

It has debug.com (!) but NOT qbasic.

Interesting, actually...

BillW

2000\01\30@165702 by Sean Breheny

face picon face
Hi Paul,

>Sean Breheny wrote:
>
>  I must agree that what you suggest is simply not consistent with the
>M$ ethic.  Their software is not *for* engineers/ programmers/
>scientists/ mathematicians or indeed any profession which requires
>logical thought.  "Logical thought" would, and does lead one irrevocably
>to Linux or, some would say, beyond.  No, their software is for
>*consumers* or "purchasing units", however you see it.

Well, Paul, it might be argued that someone is born an engineer (in the
sense that they have innate abilities), BUT, they don't always realize that
when they are 6 years old! What I mean is that I was introduced to many
aspects of computers that I previously didn't know about, simply because
they were THERE. My first computer was a commodore 64. If it lacked certain
easily hackable features, I might never have become interested in assembly
language.

>
>  To be truthful, "most kids" have general games knowledge.  Computer
>courses are practical insofar as they promote the skills of operating
>a computer, starting the programs and hopefully, recovering safely from
>the crashes.

Very few computer classes (and very few computer teachers know how!) deal
with how to prevent and recover from crashes. The computer classes in my
high school pretty much showed you how to use a spreadsheet and
wordprocessor. Somewhat appropriate, but most people probably just were
bored and could pick up this stuff on their own in a couple of days. In my
elementary school, they pretty much tried to teach you to type and gave
quiz questions like "What part of the computer holds the stored data?"

>
>  Except for this last point, much the same as driving a car and for the
>same reasons.  In fact, I suspect you would also bemoan current
>de-skilling in automobile servicing and engineering if you considered
>that also.

I don't see the analogy. I don't think any computer class in elementary or
seconday levels that I have been exposed to dealt with troubleshooting at
all.

If it weren't for safety considerations, few people would take driving
lessons, I think. Unguided trial and error is simply not acceptible on main
roads when someone first starts learning. Computers are different, if you
make a mistake, so what? You learn from it,but without the consequences.

>
>  *Actual* interest in the art of programming remains an elite option
>pursued by those with a passion for it - the likes of *YOU* in fact.
>Like you, those with the desire, will locate the tools.

That's true. However, we all have to start somewhere. Unlike many who go
down the route I did, neither of my parents is very technically oriented,
in fact, neither use computers at all. I got the original germ of technical
knowledge that I had from accidental things (such as playing with my
computer), being taught LOGO in kindergarten, and a distant uncle who was
interested in it.

I want others to have similar opportunities.

Perhaps part of our disagreement stems from talking about different
countries? All of my experiences are, of course, from the USA.

Sean


>--
>  Cheers,
>        Paul B.
>
|
| Sean Breheny
| Amateur Radio Callsign: KA3YXM
| Electrical Engineering Student
\--------------=----------------
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
@spam@shb7KILLspamspamcornell.edu ICQ #: 3329174

2000\01\31@094718 by Wagner Lipnharski

flavicon
face
In 1978 the Tandy Color Computer was one of the few available "home
computers", and it was sold with its standard 16KBytes of RAM, and the
Main ROM had only its BASIC program. If you need anything different (and
You would need it) as games, productivity software, text editor or even
technical programs as "assembler editor" you should buy ROM cartridges
and plug at the side of the unit. Later on, they released the fantastic
Floppy Disk 5¹ with 180KBytes capacity.

At that time, lots of "kids" (I really don't know why lots of people
call a 18 years old boy as "kid"... I believe that if the army gives him
a gun and provide killing training, that person is not a "kid"
anymore... right?) were able to disassemble programs, produce new
programs, produce lots of machine upgrades not only by software, but at
the hardware too.  I remember that in less than a month we were able to
increase the machine memory from 16K to 64K and more, with DRAM's
directly from Japan.

In less than 2 months we got all the board drawing and circuit drawings
done on paper, the basic ROM was totally disassembled and we were able
to do whatever we want with that machine.

You wouldn't believe what we were doing, in graphics, math, sound scopes
and more.  In less than two years of the machine on the field, somebody
released the OS/9 software, it was the first  "multi-task" program not
for main-frame computers all over the world, running fast in a 8 bits
machine (6809E) clocked at less than ONE MEGAHERTz!!!

"We" above, were not a couple of "kids", but several at the
neighborhood. There was no school computer training, no tech support, no
books (except for the 6809 Motorola book), no magazines (later on was
released the "RAINBOW" just for this machine), and all we did by
discovery, by the willing to learn about it.

Paul said (and I applaud):

    *Actual* interest in the art of programming remains
    an elite option pursued by those with a passion for
    it ... those with the desire, will locate the tools.

... of course, do to something right in this world first you need to
have the "passion" for it, you will not do it right because you are a
professional, not even because you have a diploma or phd, but by the
simply fact that you do it with love.  

I really would like to discuss parents talking their kids "YOU WILL GO
TO COLLEGE TO BE A MEDICAL DOCTOR!!!", when the kid loves to build
bridges...

Life is very short, if you don't *love* what you do, change your job at
once.

Wagner

2000\01\31@140404 by Don McKenzie

flavicon
face
Wagner Lipnharski wrote:
>
> In 1978 the Tandy Color Computer was one of the few available "home
> computers", and it was sold with its standard 16KBytes of RAM, and the
> Main ROM had only its BASIC program.

Don't think so Wagner, the only Tandy machine sold in 78 was a 4K rom,
4K ram Model one. later in 78 they came out with level II 12K rom and
16K ram.

I think you will find the CoCo was about 81-82

> Life is very short, if you don't *love* what you do, change your job at
> once.

I agree there, and did just that. :-)

Don McKenzie    KILLspamdonKILLspamspamdontronics.com      http://www.dontronics.com

World's Largest Range of Atmel/AVR and  PICmicro Hardware and  Software.
Free Basic Compiler and Programmer http://www.dontronics.com/runavr.html

2000\01\31@161525 by Wagner Lipnharski

flavicon
face
You are 100% correct. The first COCO machine was only 4k (tactile
keyboard), the first upgrade we made was to 16k, the second to 64k.
The COCO-2 machines (real keyboard) came out fully 64k.

Don McKenzie wrote:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...