Can VB 6.0 control 8 data bit pins of LPT port?

Hi, I'm trying to send 8 bits to the lpt port. I'd like to use VB 6.0. Can this be done? VB can send data to a printer, but can it go as low as actually sending bits? I think VB can only send bytes. If VB can only send bytes. Can the bits in the bytes be specific? Can I send , 1 0 1 0 0 0 1 , out the 8 pins of the printer port?

thanks Ed

Reply to
EN
Loading thread data ...

Yes! Maybe you'd like to send 1111 1111 you´ll have to write 0xFF to your lpt. That´s basic stuff.... .

mfg Tobias

--
Alle eMails an die genannte Adresse landen in /dev/null
Kontaktinfos auf www.schrelb.de
Reply to
Abitos Schrelb

It is basic stuff to you. But I'm learning VB6.0. and I'm seeing how to control a printer, but not to send exact bits. I'm going to send 8bit control words to an 8255. I don't see how to do this with VB 6.0 Ther are 16 control words that the 8255 can use. I did find Jan Axelson wrote inpout32_source_and_bins.zip and that might help me. oh well, I'll keep looking for info.

Reply to
EN

In response to what EN posted in news:1ZA8e.8592$ snipped-for-privacy@newsread3.news.atl.earthlink.net:

You have to send bytes direct to the printer data port in the hardware, usually at 0x278 (888 decimal), but VB might not have the instruction you need - something like 'outp value' or 'oport value'. But our friend Bill Gates has decreed that XP and W2000 will prevent such shenanigans by users who dare to think that it's their machine. W98/95 are OK, though. And you will probably have to use port 889 or 890 to toggle a load-bit after setting up your data.

Try using DEBUG in DOS to get the hang of it.

--
Joe Soap.
JUNK is stuff that you keep for 20 years,
then throw away a week before you need it.
Reply to
Joe Soap

Yes. Sending bytes to your lpt isn´t basic stuff. But there are several examples on the net. Maybe you need an extra dll doing this. Some electronics magazines (german ones do) offer these. Transforming 8bits into one byte is easy.

mfg Tobias

--
Alle eMails an die genannte Adresse landen in /dev/null
Kontaktinfos auf www.schrelb.de
Reply to
Abitos Schrelb

Not that this has anything to do with teh question, but you might consider moving to VB.net since you aer just learning. Microsoft is about to pull support for VB6, and since you are just learning might as well start with what will be supported for a while.. ( or switch to a non microsoft language like python or gambas )

But yes, it is pretty basic stuff sending a word to a port...

Reply to
Ziggy

... snip ...

I did look for some printer port led projects. I have to d/l IO.DLL, which does not come w/ VB 6.0. Seems like other programmers want to control the printer port. It's going to take some time. I have to find out how to write a byte. The 8255 wants binary, converted to hex. To wite hex w/ VB 6.0 is CommandWord = CByte(&H80) I keep doing this for hex 90, 81, 82,83,84,89, 8A,8B,90,91,92,93,98,99,9A &

9B. No, not easy.
Reply to
EN

On a side note...for anyone wanting full control of a serial port and associated control lines with VB...avoid .NET like the plague.

MS still has not provided the functionality that VB6 offers. There is no MSComm object in .NET. I hear that it's been promised, but don't hold your breath waiting for it's release.

Your only option in .NET is to make direct calls to the kernal which really blows...and pretty much kills the whole purpose of the .NET style architecture.

(*>

Reply to
Hawk

In response to what Hawk posted in news: snipped-for-privacy@corp.supernews.com:

'blows'? Is that a bit like 'sucks'?

--
Joe Soap.
JUNK is stuff that you keep for 20 years,
then throw away a week before you need it.
Reply to
Joe Soap

Exactly...

(*>

Reply to
Hawk

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.