Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Parallel Port Programming In Visual Basic 6


hi
i want to know how can i wirite program for turning on and off my LEDs
by writing application in visual basic 6 through parallel port




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Parallel Port Programming Using Visual Basic
I am making an automated tempreture monitoring system using Visual Basic... could someone help with hardware interfacing (parallel port) using visual basic... the win95io only works under win9X system is there perhaps any other DLL which i can use in XP? or is there any other way?

thanks
shahzad

Parallel Port With Visual Basic
Hello guys

I am an undergrad student and my project is design Digital FM radio controlled via computer. I have completed my hardware part but for software I still have some problem...I cant send any signal to my hardware or to oscilloscope...seem like something wrong in the software

can someone please take a look into my source code and tell me what is going on?

Interface is in Visual basic

Code:
Private Declare Function Inp Lib "inpout32.dll" _
Alias "Inp32" (ByVal PortAddress As Integer) As Integer
Private Declare Sub Out Lib "inpout32.dll" _
Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
Private Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)
Dim A(100) As String
Dim B(100) As Double
Dim c As Byte
Dim fso As FileSystemObject
Dim ts As TextStream

Private Sub cmdLoad_Click()
'Sending signals to port
If (txtFreqSel(1).Text = "Equivalent Binary Data") Then
MsgBox "Frequency is not selected, Please select frequency"
udFreqSel.SetFocus
txtResult.Text = Empty
Else
p = Shell(App.Path & "FMRADIO " & txtFreqSel(1).Text, vbHide)
Set ts = fso.OpenTextFile(App.Path & "Result.txt")
While (Not ts.AtEndOfStream)
txtResult.Text = ts.ReadAll
Wend
ts.Close
End If
fso.DeleteFile (App.Path & "Result.txt")
End Sub

Private Sub Form_Load()
Set fso = New FileSystemObject
Call assignArrs
End Sub

Private Sub cmdOff_Click()
txtFreqSel(1).Text = Empty
End 'To close the program
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set fso = Nothing
End Sub

Private Sub udFreqSel_Change()
'Displays selected frequency and its binary equivalent
txtFreqSel(0).Text = B(udFreqSel.Value) & "MHz"
txtFreqSel(1).Text = A(udFreqSel.Value)
End Sub
Function assignArrs()

Set ts = fso.OpenTextFile(App.Path & "data.txt")
k = 1
While Not ts.AtEndOfStream
A(k) = ts.ReadLine
k = k + 1
Wend
j = 88.1
For i = 1 To 100
B(i) = j
j = j + 0.2
Next i
Set ts = Nothing
End Function
=============================

actual transmission is in C

Code:
#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<io.h>

int main(int argc, char *argv[])
{
unsigned int i,j,k,l;
char freq[100][16];
int m,n;
FILE *ff,*fo;
char f[16];

outportb(0x378,0); /* Clears the data on the parallel port */
clrscr();

ff=fopen("data.txt","r"); /* opens file which is having 16bit values */
fo=fopen("result.txt","w");
m=0;
j=6614;
while((fscanf(ff,"%s",f) != EOF)&&(m<100))
{
if(!(strcmp(argv[1],f)))
{
fprintf(fo,"Frequency Found
");
fprintf(fo,"Selected frequency is %s
",argv[1]);
/*printf("%d
",j); generated for my use*/
fclose(fo);
datatrans(j);
fclose(ff);
exit(0);
}
m++;
j++;
}
}

datatrans(int i)
{
unsigned int j,k,l;
FILE *fo;
initial_setup();
fo=fopen("result.txt","a");
fprintf(fo,"Transmitting data to port
");
for(j=1; j<=32767;j<<=1) /* individual bit transmission starts */
{
outportb(0x378,3); /* places data on the port */
l=3;
k=0;
delay(0.005); /* clock pulse high */
if(i & j)
{
k=l+4;
outportb(0x378,k);
delay(0.002);
}
else
{
k=l; /* Clock pulse low */
outportb(0x378,k);
delay(0.002);
}

outportb(0x378,k+1);
delay(0.005);
}
outportb(0x378,7); /* End of data transmission */
delay(0.005);
outportb(0x378,5);
delay(0.005);
outportb(0x378,1);
delay(0.002);
outportb(0x378,0);
delay(0.007);
fprintf(fo,"data transmission completed
");
fclose(fo);
}

initial_setup()
{
/*Clb Lead time*/
delay(0.001);
outportb(0x378,1);
delay(0.005);
}
thank you for in advance

Parallel Port In Visual Basic 1.0 For Windows 3.1/3.11
Hello! Does anybody know if and how I can send a byte to my Parallel Port in Visual Basic 1.0 for windows 3.1/3.11??

Thanx, Jeroen V.

Parallel Port In Visual Basic 1.0 For Windows 3.1/3.11
Hello! Does anybody know if and how I can send a byte to my Parallel Port in Visual Basic 1.0 for windows 3.1/3.11??

Thanx, Jeroen V.

Working With The Parallel Port In Visual Basic
hi,
i'm right now trying to learn Visual Basic from Visual Studio for one of the project i'm curently working on, and i have reached a problem with accessing the parallel port.
I'm trying to send an 8-bit binary number to the parallel port through it's data pin's.
I have seen a lot of examples but i'm not exactly sure how to use them, like:
vbOut
Open "LPT1:" For OutPut As #2

But most refer to actully setting up a printer from within VB

can someone give me a hand or point me to a good tutorial that covers this.

Thanks

How Do You Use Parallel Port Communication With Visual Basic 6.0?
Well, I want to design a program where my computer controls a remote control car instead of a remote control. I only know a little bit on how to do this. All I know is that you have to connect a parallel port to the remote control from the computer. So, when I enter data for the car to move, it would move because there is going to be relays in the remote control which would get signal from the computer. So, all I want to know is how should I start my program? Any help would be greatly appreciated.

If you can help me please email me at Jane_Jamora@heald.edu

Thanks for taking the time to read my question.
=)


Control An Ac Motor Using Parallel Port In Visual Basic
I need some help controlling the motor.. it needs to move clockwise in one button and counterclockwise in another button. the last button is to halt the motors movement.. if homing is possible it will be an advantage. any help and guidence is greatly appreciated.. thanks

Programming Serial Port In Visual Basic 6 0
Hi
I have made a code which use the serial port and the mscomm properties. It works very well in my pc using the serial port.
I tried to use it in a lap top. It doesn´t have a serial port, only usb. So I use an usb to serial bridge but it seems to send all totally different.
In the PC I use the serial port and it works ok and if I then use the usb to serial bridge it only sends the last data I sent from the serial port.
Do you think is this a port problem? or maybe I need something different in the code.
I thought the to ports work the same but maybe I'm wrong
Could you help me?
Thanks a lot

Programming The Parallel Port In Vb6
Hi all,

Firsly id like to say cool forum. My question is that i want to programm the parallel port to be used with an external piece of hardware, namely the ADC0808CCN a/d convertor with parallel data output. If anyone can help i would be much appreciated or if anyone has any smaple code that may do this job id be really greatful for any help

Lpt Port (Parallel) Programming
I have been programming for long time in C++ but now using Visual basic 6.0
but am really a novice at Visual basic.

Can anyone help me to get information for programming the Parallel port ,
(status port to start with) ? This is normally at location 0379 Hex.
This is used for input signals if you don't already know...

This kind of thing is very useful for interfacing with the outside world and is very interesting.

Does anyone have any examples of this kind of code ?

All help is much appreciated.

Scotto

Parallel Port Programming
plz... let me know...
how can i receive the data from parallel port???
i doing the project about notes detector...
when i scan the notes, it will display at vb interfacing...
but now i really dont know how to get the data from parallel...
i connected the scanner of the notes to parallel port...
i got it for data port but status port i dont really understand how to do it...
cause i need to receive tha data like this:
if bit = 0010 n then display $1
plz...

Parallel Port Programming
On my small test circuit with leds, when ever windows starts up, they light up and stay on. how to stop windows from turning them on when it starts up? it isn't really a big problem because I can turn it off using program.

Parallel Port Programming
Hi! I would like to know how i can program the parallel port in VB?
I searched it in Help and in books, but i found nothing. I am not too experienced, but know things. If anybody knows anything, please help me!!! Thanks: Andras

Parallel Port Programming
I need to write a VB program to write data to parallel port, I have no idea how to do, anyone know how to do? Also, any suggested referrence document on how to write parallel port program? Thank!

Parallel Port Programming
Hello everybody,

Can someone tell me how I can send a number to the parallel port in Visual Basic .NET?

I've searched the forum and I have found that you must unblock the parallel port with Direct IO, because I'm using Windows XP Professional. That's what I did for now. I only need one pin of the parallel port to control, so I only need to send 0000 0001 or 0000 0000 to it.

Can someone help me?

Thanks for any replies! :bow:

Parallel Port Programming
I need help on parallel port programming using visual basic.

PIC Programming From Parallel Port By VB 6.0
Hello
I'm programming PIC 18F458 from PC's parallel port.I have a hex file and want to load it to PIC based on Low Voltage In Circuit Serial Programming.I need help with this

1-I can't handle with separating hex file(Intel Hex32 file format)
2-Is there an API for communication from paralle port not using inpout32.dll
thanks

Parallel Port Programming In VB 6.0
Hello! I am doing a project that is a server controls a hardware (for example a car) by Parallel Port Programming. The car can be controlled to move left, right, forward and backward. So, may I know how to do the programming? Is there any sample code? What is inpout32.dll file? Do I have to install the file?
Thanks.

Waiting for reply...

Parallel/Serial Port Programming
Hi,

Just wanna ask if the TCP/IP component of VB6 can be used in parallel/serial port programming and how?
Thanks in advance.

Serial/parallel Port Programming
i doubt there is a solution to this one, but i though id try anyway... is there any way that i can connect a single-pole single-throw switch to a parallel or serial port, and get the status of the switch as a bolean?

Advice On Parallel Port Programming - VB/C++
Hi folks,

Just want your opinions on this. I am just starting a home project which involves making a new parallel device and the software to run it. Now, VB doesnt have support for using the LPT properly from what I can tell, so my options are to make the program in VB and then try and come up with a DLL in c++ for the LPT stuff, or write the lot in C++.

I currently know pretty much nothing about C so i'd have a lot of learning to do if I did it all with that, but would it be worth it, or is writing a DLL not too difficult? I'd be a lot more comfortable making my app in VB.

Cheers
Lee

Programming Parallel Port Registers
I am trying to use a dll to control a parallel port. The instructions tell
me what to do to output data to the data lines and how to read them by
making the port bidirectional via the control register commands. However, I
want to know what bits of the control register do what so that I can toggle
the strobe for example.
Can anyone point me to the right place to find out please?.

About Programming EEPROM(AT93C46) Using Parallel Port LPT1 In Vb6.0
Hi to all of u. I am new member of this forum. I need the help from u. I want to do the my project for Smart Card. I want to know that anybody will help me to find out the vb6.0 code for programming EEPROM(AT93C46) using parallel port LPT1. Pls help me out.
Bye.

Parallel Program In Visual Basic
I need to run a program in Visual Basic which is currently running in a single machine. The program has 175 tasks in the single machine. But I need to run the same program in 32 different machines such that the tasks are distributed in these 32 machines. I need to know what Visual Basic concepts and background are required to develop this program?

Com Programming In Visual Basic
i am newbie to com programming in visual basic. can any one help me to find tutorials or urls to learn.

Visual Basic Programming
I have a directive to develop language in VB6 where, when a person comes into the government and the months would go in decreasing order starting with October which is the 1st month of the fiscal year, in other words if the person came in December, since October is the beginning of the fiscal year it would be 10/12 and January would be 9/12 etc., etc. this would be in the FTE Gains. It could be represent by the number "10" or by the fraction "10/12".

However if an employee left in say September, it would be negative "-1/12" for FTE Losses.

Can you give me an example of how this language would look

or if Idid not look at it in terms of a date but rather as a single Integer rather than perhaps "11/12", but rather as 11 or -11 as an Integer rather than in terms of a date, can you give me an example of that or does it do the numbers in rescinding order in other words on the on hand, if a person came into the government in December it would it would be 10 months for FTE Gains if the person left in December it would be -2 for FTE losses, because October is considered the first months in the Fiscal year. Can I do this using an array with two list boxes, one for FTE Gains and one for FTE Losses? Can you give me an example of how that would look?

Attached is what I have done thus far. Any assistance you can provide is greatly appreciated.

Theresa

Programming In Visual Basic.Net
Hello I am in a visual Basic.net class right now. I am having problem trying to get this program to run. This program is programming exercise 11.2 on page 445.

I have to create a file for employee information and call in employee.txt. Each record will contain fields for first name, last name, employee number, and hourly pay rate. I have created this file already. I under this so far, but I don't understand the second part which reads:

Write a second project to precess pay roll. The applicatoin will load the employee data into an array of structure from the file with an extra field for the pay. The form wil contain labels for the information from the array(display one record at a time) and a text box for the hours worked.

A button called findPay will use a for /next loop to process the array. You willl calculate the pay and add the pay to the totals. Then display the labels for the next employee. (Place the pay into the extra field in the array.)
The exit Exit Button will print a report on the printer and terminate the project.(print the array).

Prcessing: HOurs over 40 receive time and a half pay. Accumulate the total number of hours worked, the total number of hours of overtime and the total amoun of pay.

I am very new to VB, and I am have problem with the code in the finepay.

and the code on how to calculate. Can someone help me with this project.

Thanks

Visual Basic Programming
A sample coding to retrieve datas from an mdb file
between two specified dates and
also check whether the
invoice number which we r going to save already exists between two
specified dates

Visual Basic 6 Programming
I am the beginner

I have created 2 forms. "Splash.frm" file and frmlogin.frm.
I have added 3 second delay to show fplash .frm .This is working fine.
After this I want to keep the "frmlogin.frm" open till user enters username and login.
Can somebody guide me?

USB Programming With Visual Basic
Good morning every one,

I have searched through the code guru database for information on an activeX control that I could use
to work with the USB from my visual basic application but have not found any. Would any one be
able to direct me to a site or give me the information if there is an activeX control available some where
to work with the USB like the MSCOMM works for the COM ports?

Thank you for your time.

Regards,
Mary

Programming In Visual Basic
hi every body
i am new in visual basic .Please can you help to learn vb.I does not know how to put the codes.Please i wait your help.

best regards

Visual Basic Programming
hai friends,
i need information about aligning text files by using tab and space function. In order to format text i used rtf file for storing
details. In rtf space and tab function are not working properly.
If i give spc(10) rtf file is not leaving space for 10 but it leaves only
two or three spaces. why such a conflict?

And when i use numbers then how to i get right allignment.

please guide me.


Regards,
Manju

3D Visual Basic Game Programming Help
Inu-Yasha||Help!
Does Anybody Know Where I Can Read Some Tutorials On 3D Visual Basic Game Programming

Programming Multiplexer In Visual Basic
Hi everybody. I am a student and I am doing a project using the parallel port to control an interface.Actually it is a sample weaving machine in the lab.My problem is that I have 18 outputs. I have done some search and found I could use multiplexers and get up to 256 outputs.could you please help me. I wish if you could write some samples code to describe the use of multiplexers , how could we use address to communicate to the multiplexers. Please help, Thank you.

Book: Programming In Visual Basic.net
Does anyone know if the awnsers to the programing exercises are available anywhere? Or does anyone have the code for "The Switcher"? (exercise in chapter two involving lightbulbs)

Little Problem In Visual Basic Programming
hey everybody, new guy here. hope I started this thread in the right place.

Simple question (at least I hope it is simple):

Right now, I wish to instruct the program to do the following:
When I click on an image (local picture, bmp, jpg, etc), I want the program to check if this image box has a specific picture, if so, the program should continue, if not, then do something else. This is my line of thinking, but Visual Basic wouldn't accept it:

If Image2 (intControlArray).Picture = App.Path & "/RandomPic.bmp"

Label2="YES" 'or do anything

End if

The problem here is what the program should do if the picture is checked, the problem is that VB won't check the picture for me. whenever it gets to the "if" statement, it stops and says "type mismatch", I don't get it, is that the right way to check pic for an image box?

Please help!

Thanks

Visual Basic 6 Programming Help Needed
I am a beginner at programming with visual basic 6.0 Is there anyone of you guys or people that are expirienced with this program that can help me out with this projects I am doing. I am willing to accept any e-mails from people that want to help me out with this program I would really appreciate the help from any of you guys and gals.

Winsock Programming With Visual Basic
Hi,

Are there any good books on Winsock programming for Visual Basic 6?

Looking For Review Of Programming Visual Basic.Net
I am just wondering if anybody has read this or has seen a review of the book.

Is the book good or bad ?, would you recommend it?

for reference its

Programming Visual Basic.Net
by Dave Grundgeiger
publisher is oreilly associates
came out in december 2001

*** MIDI And Visual Basic Programming
Hi all, hope you're doing all right.

Just got a quick question for ya. How would I go about playing a MIDI note from pure VB code (with API calls and the like...)? I mean, for example, specifying the GM number, and then the note(s) and then it playing it for a specified amount of time?

Thanks in advance.

MOdem Programming Using Visual Basic
using AT Commands !!!

objective:
To send fax from MS visualbasic6.0

Controls used:
Mscomm controls.
comport used : 1
baud rate settings as per the mscomm control.

Modem used :

3Com U.S Robotics modem ,
class = class1.0 modem, fax modem.

steps involved:

1. Dilaing the remote fax numver , with a modem .
2. establishing communication with the remote fax machine.
3. handshaking with the fax machine.
4. once the fax machine is responded , data is sent in binary format.

modem codes used:
standard "AT" Commands for class 2.0 modems.

program status.

step 1: dilaing the remote fax machine no: accomplished.
step 2: establishing a handshake mode remote fax no:
step 3: sending data.

code:
****......
Private Sub Faxsend() **name of function
Dim i As Integer
Dim a As Byte
Dim pfad As String
Dim dialstring As String
'setting the mscommm port setttings.
MSComm1.CommPort = 1
MSComm1.PortOpen = True
If Err Then
MsgBox "COM Port not available"
Exit Sub
End If
'setting the baud rates.
MSComm1.Settings = "19200,N,8,1"
MSComm1.InputLen = 0
MSComm1.InBufferCount = 0
'variuos AT modem commands are used to send to the modem
'modem reset
MSComm1.Output = "ATZ" + vbCr
If wait("OK") = False Then Exit Sub

'setting the fax class=2.0
MSComm1.Output = "AT+FCLASS=2.0" + vbCr
If wait("OK") = False Then Exit Sub

'local id .
MSComm1.Output = "AT+FLI=" + Chr$(34) + "303" + Chr$(34) + vbCr
If wait("OK") = False Then Exit Sub

'command for Intitialize the fax parameters
MSComm1.Output = "AT+FIP" + vbCr
If wait("OK") = False Then Exit Sub

'entering the number fomr the user
Number = InputBox("Enter phone number:", "05524772")

'dialing the number using ATDT command
dialstring = "ATDT" + Number + ";" + Chr$(13)

MSComm1.Output = dialstring
If wait("OK") = False Then Exit Sub

'controls the mode that modem will act as datamodem.
MSComm1.Output = "AT+FAA=1" + vbCr
If wait("OK") = False Then Exit Sub


'MSComm1.Output = "AT+FDM" + vbCr
'If wait("OK") = False Then Exit Sub

'FLO command selects the method of flow control XON/XOFF=1
MSComm1.Output = "AT+FLO=1" + vbCr
If wait("OK") = False Then Exit Sub

'Enable to fax reception
MSComm1.Output = "AT+fCR=1" + vbCr
If wait("OK") = False Then Exit Sub

'indicates a document is availabel for polling
MSComm1.Output = "AT+Flp=1" + vbCr
If wait("OK") = False Then Exit Sub
'indicates whether the originating station wiches to poll
MSComm1.Output = "AT+FSP=1" + vbCr
If wait("OK") = False Then Exit Sub

'Negotiations message reporting
MSComm1.Output = "AT+FNR=1" + vbCr
If wait("OK") = False Then Exit Sub

MSComm1.Output = "AT+FMS=5" + vbCr
If wait("OK") = False Then Exit Sub

''document to poll
'MSComm1.Output = "AT+FTP=1" + vbCr
'If wait("OK") = False Then Exit Sub
MSComm1.Output = "AT+FCO" + vbCr
If wait("OK") = False Then Exit Sub

'command for data transfer from modem ...
MSComm1.Output = "AT+FDT" 'init fax data sending
If wait("Connect") = False Then Exit Sub

i = FreeFile
Open "c:windowsdesktopmyfaxfax.txt" For Binary Access Read As #i
"***** file manipulation takes place here...
'MSComm1.OutBufferSize = Len(tmpbuffer)
'MSComm1.Output = tmpbuffer

MSComm1.Output = Chr$(16) + Chr$(3) 'terminate sending fax data
If wait("OK") = False Then Exit Sub
MSComm1.Output = "AT+FET=2" + vbCr
If wait("OK") = False Then Exit Sub
MSComm1.PortOpen = False ' ,close line
End Sub



*******
where the program stops is :
sending the AT+FDT command , the modem even though being a class2.0 modem , is giving error message when FDT command is sent.

suggestions required.

thanks

SenthilVel.M

Visual Basic / Access Programming
Can someone look up the following web page:

http://forums.vb-world.net/showthrea...9328#post89328

Did anybody get to look at this new problem yet?
Let me know if this thing is unsolveable?
By the way - how can I post this as a new thread?

Thanks,
Stephen

[Edited by lspeed430 on 07-31-2000 at 10:24 AM]

Visual Basic / AS400 Programming
How can I take the AS400 and find out when I transmit information what filename it is using?
How can I make Visual Basic take user input and then save that information to an AS400 database?
What type of programming code would I need to start out with?

Database Programming In Visual Basic
hello ,

i am developing a database application using MS access and Visual Basic 6.0.In one of the forms,I have to link 2 combo boxes.
The data in one of the combo boxes depends on the data in the other combo box.

ex. if i choose one value in one combo box then all the corresponding values related to that value should be displayed in the other combo box.

can anybody send me a code for this problem.

thank u

Visual Basic Programming Language
Hi, please i want any one that knows how to design a program on
vb about Automated stock control to please aid me by designing a
program using vb 6.0. the required fields in the program are
Stock code,Product name, Quantity Received, Quantity issued, Old
value, Stock balance, New balance. The Stock code,Product name,
Quantity Received, Quantity issued, Old value, are raw data.
Stock balance is gotten by adding old value + Quantity received,
New balance is gotten by subtracting Quantity issued from stock
balance.we shall make the deal after you have post me the
program.

An Intro To Programming Using Visual Basic...
Alright, quick question. I was wondering if there were any online walkthroughs for the book "An Introduction To Programming Using Visual Basic Versions 5 And 6."

What I mean by walkthroughs is that it will help show you what to do for the reviews and exercises and shows you what commands to input and such. Any help would be greatly appreciated.



Visual Basic Database Programming
can anybody suggest a good book of visual basic 6.0 database programming (not vba)

Thank you

Web Programming With Visual Basic. Urgent
In order to get full marks in my Vb coursework, i must be able to create a web browser named WebBrowser1 which can:
-block the possibility of sending emails from any site loaded on the browser.

-block all pornographic sites from loading

-also have some control, as above, on subsequent windows created from any parent site loaded on the browser. For example, how can i get all children website created from any site loaded on the browser to also load on the same browser, replacing the parent.

Please help.

What's The Use Of *.frx File In Visual Basic Programming?
*.frm file is for the program's form, then what's the use
of *.frx file? Thanks.

Copyright 2005-08 www.BigResource.com, All rights reserved