Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with interrupts in a project involving serial port with VB

Status
Not open for further replies.

miss_monica

Member level 2
Joined
Sep 19, 2006
Messages
50
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,663
hello friends i want to make a project involving serial port with a vb user end
i am using mscomm .everything is fine but i dont know how to use interrupts in this program so that i can know that the serial port has received data from the microcontroller. i have studied beyond logic articles and the program buff1024.c it is very helpful but how can i use it in vb plz help me
if you have sample programs in vb that use interrupts and use serial port plz upload them .these projects might be of a lot of help for beginners like me
thankyou very much
i will be waiting for reply
this is a good example
https://www.serasidis.gr/circuits/RS232interface/RS232_interface.htm
 

inpout32.dll visual basic 6 serial communication

The MSCOMM's OnComm Event works as interrupt in your VB program. This event is fired everytime there is activity on serial port.

Use it like this
Code:
Private Sub MSComm1_OnComm()
    Dim strData as String
    If MSComm1.CommEvent = comEvReceive Then
        strData = MSComm1.Input
        Debug.Print strData
    End If
End Sub
 

port32.ocx

thats very nice but do you have an example with 8051
i have attached the 8051 to port through 232
it doesnt work
the firmware is working perfectly but i dont get any results even on hyperterminal plz help
 

vb parallel port interrupt

Hey
CMOS DO YOU HAVE FURTHER IDEAS ON ACCESSING PARALLEL PORT THROUGH VISUAL BASIC.PLEASE HELP ME I DESPERATELY NEED IT
 

inpout32 dll serial port

miss_monica said:
thats very nice but do you have an example with 8051
i have attached the 8051 to port through 232
it doesnt work
the firmware is working perfectly but i dont get any results even on hyperterminal plz help
Try this code
Code:
#include <REGX52.H>
#include <stdio.h>

#define	FOSC		11059200UL	// Crystal frequency
#define BAUD_RATE	19200UL		// 19.2 kbps
#define BAUD_CONST	256-(unsigned char)(2 * FOSC/(BAUD_RATE * 12 * 32))

void main(void)
{
	// Init serial port
	PCON  = 0x80;			// Double Baud Rate
	SCON  = 0x50;			// SCON: mode 1, 8-bit UART, enable rcvr
	TMOD |= 0x20;			// TMOD: timer 1, mode 2, 8-bit reload
	TH1   = BAUD_CONST;		// TH1:  reload value
	TR1   = 1;			// TR1:  timer 1 run
	TI    = 1;
	RI    = 0;

	printf("Hello world!");
	while(1);
}

ajaykumar988 said:
Hey
CMOS DO YOU HAVE FURTHER IDEAS ON ACCESSING PARALLEL PORT THROUGH VISUAL BASIC.PLEASE HELP ME I DESPERATELY NEED IT
Use this Inpout32.dll to access parallel port from VB. Here it is **broken link removed**
 

port32.ocx+author

Hello !

You can use the PORT32.OCX for the parallel Port Interfacing in the Visual Basic 6.0.

The syntax of the Port32 is very eassy . The syntax is

:::: FOR DATA OUT ::::

port32.Address = 888 (Your Port Address)
Port32.Bits = 8
Port32.Value = 241 (Value that you have to out)



:::: FOR DATA IN ::::

Port32.Address = 888 (Your Port Address)
Variiable = Port32.Value




It is very simple to use.

Wish you a good luck.

Bye
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top