473,404 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

cOde for LEDs using parallel ports

2
Hi everyone. Hope you guys can help me. Attached below are VB6 codes for a hand phone to call to a modem. When the action is executed, a message box will pop out ‘Ring Ring’. I just want to know is there anyone out there have the codes for SMS where when the action is executed, a message box will pop out.

On the other hand, I also need some simple codes (VB6) for 8 LEDs lights for parallel ports.

[B<u>]Below is the coding for the calling with the MsgBox"Ring Ring" [/b]</u>

Private Sub Form_Load()
' Buffer to hold input string
Dim Instring As String
' Use COM1.
MSComm1.CommPort = 1
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True

' Send the attention command to the modem.
'MSComm1.Output = "AT" + Chr$(13)
' Wait for data to come back to the serial port.

Do
DoEvents
Loop Until MSComm1.InBufferCount >= 2
' Read the "OK" response data in the serial port.
Instring = MSComm1.Input
' Close the serial port.
MSComm1.PortOpen = False

End Sub

Private Sub MsComm1_OnComm()

Select Case MSComm1.CommEvent
Case comEvRing 'Value 6
MsgBox "Ring Ring"
Case Else
MsgBox "Don't know what event."
End Select
End Sub

Private Sub Form_a()
MSComm1.PortOpen = False
End Sub
Nov 9 '06 #1
1 3024
sashi
1,754 Expert 1GB
Hi everyone. Hope you guys can help me. Attached below are VB6 codes for a hand phone to call to a modem. When the action is executed, a message box will pop out ‘Ring Ring’. I just want to know is there anyone out there have the codes for SMS where when the action is executed, a message box will pop out.

On the other hand, I also need some simple codes (VB6) for 8 LEDs lights for parallel ports.

[B<u>]Below is the coding for the calling with the MsgBox"Ring Ring" [/b]</u>

Private Sub Form_Load()
' Buffer to hold input string
Dim Instring As String
' Use COM1.
MSComm1.CommPort = 1
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True

' Send the attention command to the modem.
'MSComm1.Output = "AT" + Chr$(13)
' Wait for data to come back to the serial port.

Do
DoEvents
Loop Until MSComm1.InBufferCount >= 2
' Read the "OK" response data in the serial port.
Instring = MSComm1.Input
' Close the serial port.
MSComm1.PortOpen = False

End Sub

Private Sub MsComm1_OnComm()

Select Case MSComm1.CommEvent
Case comEvRing 'Value 6
MsgBox "Ring Ring"
Case Else
MsgBox "Don't know what event."
End Select
End Sub

Private Sub Form_a()
MSComm1.PortOpen = False
End Sub
Hi there,

I think am able to help you on the parallel port curcuit, it's also know as parallel port relay curcuit, run a simple search on google.com. Good luck & take care.
Nov 9 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Joseph Suprenant | last post by:
I am looking to read a byte or write a byte on the parallel port in linux. I am using red hat 7.3. I tired using this but i couldnt get anywere. { unsigned char value; __asm__ volatile ("inb...
21
by: The Man With The Harmonica | last post by:
Hi All, What kind of commands can I use to control the serial and parallel port of my pc. I want to use my laptop instead of microcontrollers and write my software in ANSI C to be used for...
11
by: karan | last post by:
I would like to know how one can use the parallel port through c/c++.Also, how does one determine what port is installed(EPP/ECP/SSP/PS2)? What is the differnece between these? What are the...
6
by: agnivesh | last post by:
Hi there, I'm a beginner in C programming and want to learn how to write C (pure C) code to access hardware ports (serial,parallel,usb etc.) under windows environment ? 1. Please, suggest any...
11
by: Timothy Smith | last post by:
hello people. i've been trying to send an 8 byte string to my parallel port under freebsd. the purpose is it to control a relay board. the board simply responds to the output byte coming from...
4
by: Chris Lasher | last post by:
Is there a way to interact with keyboard LEDs (for Caps/Scroll/Num Lock) in Python? I'd like to achieve an effect similar to the *NIX command "setleds -L", but I'm not sure where to start, but I...
1
by: luco | last post by:
Hello! In my application I need to detect how many parallel ports there are in a machine I'm using and what their state is. Is it possible in C#? Any ideas how to do it? thanks in advance,...
4
by: bluesteel | last post by:
Hi, guys. I am currently trying to develop a program made under c++ that could control a robot, i mean movement. I thought of using computer ports like serial or parallel which is not a bad idea....
4
by: jmarcrum | last post by:
I have to modify this assembly code in order to make it use interrupts. Right now, when I push button 1 on the microprocessor the count increments once (the LED's count in binary, using only 3 LED's...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.