Discussion in "General help Guidance and Discussion" started by    abbas1707    Aug 8, 2007.
Sat Aug 25 2007, 02:55 PM
#11
hi ajay,
hardware for this project is completed and also i have tested on hyper terminal.every thing working fine.now i want to make vb software for this project.i am thinking to plot the graphs for temperature vs time/date.but its a rough idea.can u provide me some better suggestion??i will be thankful to u...
how can i learn to receive and send characters to serial port in a vb program??can u provide me with any helpful link for it??
thanks in advance... :-|
Sat Aug 25 2007, 07:05 PM
#12
abbas i cant see the circuit diagram how to open data logger.dns
file
which software u r using :mad
Sat Aug 25 2007, 07:12 PM
#13
@ TPS:
it can be opened by Proteus VSM Simulator software.

Hi abbas,
you can have this sample code for opening/sending/receiving data from the serial port. Once you are able to work on this it will be easy for you to customize it.
The sample GUI code can be downloaded from here
Download Serial communication in VB Sample Code

From the Author: David M. Hitchner

Overview:
The routines in this module facilitate most operations associated with serial communication by encapsulating the API details in easy to call wrapper functions. For example, the CommOpen routine can be used to open and initialize a serial port.

CommOpen takes three parameters: the Port ID mentioned above, a port name such as "COM1" and the desired communication settings (Example: "baud=9600 parity=N data=8 stop=1").

CommOpen checks to see if the specified port is open. If not, it opens it with a call to the CreateFile API for generic read and write access. Next the port's input and output buffers are initialized by calling the SetupComm API followed by a call to PurgeComm. PurgeComm insures the newly created buffers are clean.

After this, the time-out parameters for all of the port's read and write operations are set by populating a COMMTIMEOUTS structure and passing it to the SetCommTimeouts function.

CommOpen now sets the control settings (baud rate, parity, etc.) for the port. To do this the current settings are: retrieved into a DCB (Device-Control Block) structure via GetCommState, modified as desired using a call to BuildCommDCB, and set with the SetCommState function.

Once this is done, the CommWrite routine can be used to write to the port. As you can see, these routines perform the bulk of the work for you. All you need to do is call them appropriately.

See the .BAS module and .TXT file for further details.


For more information there is a text file in it. also.. take a close look at the .bas file which contains the serial module. Hope this will be helpful for you.
 abbas1707 like this.
Tags serial communication with VB softwareVB sample codeVB serial communicationVB MSCOMM
Sun Sep 02 2007, 07:12 AM
#14
unable to attach more than 1 image


[ Edited Sun Sep 02 2007, 07:20 AM ]
Sun Sep 02 2007, 07:16 AM
#15
hi ajay!
first im making logging software for only 1 channel.i have done logging to html file.here are samples of my software

i will make for 8 channels later but first i want to make spread sheet on excel for only 1 sensor.
for this i need your help coz i dnt know how to logg vb data to excel file.can u plz provide me some info about it??
thanx in advance


029C 9/1/2007 10:43:13 PM
030C 9/1/2007 10:43:14 PM
031C 9/1/2007 10:43:15 PM
031C 9/1/2007 10:43:16 PM
031C 9/1/2007 10:43:17 PM
031C 9/1/2007 10:43:17 PM
031C 9/1/2007 10:43:18 PM
031C 9/1/2007 10:43:19 PM
031C 9/1/2007 10:43:20 PM
031C 9/1/2007 10:43:21 PM
031C 9/1/2007 10:43:22 PM


[ Edited Sun Sep 02 2007, 07:26 AM ]
Sun Sep 02 2007, 09:12 AM
#16
here is some notes for you..
read carefully will give you good idea..
Methods for transferring data to Excel from Visual Basic

and a sample code..
Vb to Excel data export

Version Compatibility: Visual Basic 5 Visual Basic 6

More information: The purpose of this programme is to generate report by populating data into an Ms-Excel sheet from an Ms-Access database. It will also display the sub total and grand total of the amount column at runtime, using auto formating technique.



Do share your project after you finish...
Fri Sep 07 2007, 09:50 PM
#17
hi ajay,
my project stopped working.i made pcb for it two times,and implemented one time on vero board.
but it works fine for some time and after dat it shows no response.i request u to review my code which i posted before.i dnt understand where the problem is.i have doubt about the clock frequency but not sure.
shud i make some extra circuitry??
also one thing is eating my mind! im making circuit on bread board at this time.but when i implement the code
#include <reg51.h>

void delay()
{
int k,l;
for(k=0;k<50;k++)
for(l=0;l<280;l++);
}
void init()
{
TMOD=0x22;
TH1=0xFD;
SCON=0x50;
TR1=1;
}
void sendChar(unsigned char ch)
{

delay();
delay();
SBUF=ch;
while(TI==0);
TI=0;
}
void main()
{
init();
while(1)
{
sendChar('a');
delay();

}
}
i get aaaa on hyper terminal
but when i burn the program below
#include <reg51.h>
void delay()
{
int k,l;
for(k=0;k<50;k++)
for(l=0;l<280;l++);
}
void init()
{
TMOD=0x22;
TH1=0xFD;
SCON=0x50;
TR1=1;
}
void sendChar(unsigned char ch)
{

delay();
delay();
SBUF=ch;
while(TI==0);
TI=0;
}

void sendString(unsigned char *a)
{
while(*a!='\0')
{
sendChar(*a);
a++;
}
}
void main()
{
init();
while(1)
{
sendString("abbas");
delay();

}
}
i get nothing on hyper terminal
y is it so?? i dnt understand
plz plz tell me what to do
Fri Sep 07 2007, 10:38 PM
#18
try changing this
while(*a!='\0')
{
sendChar(*a);
a++;
}

to

while(*a)
{
sendChar(*a++);
}

and tell me the results..
Sat Sep 08 2007, 06:57 AM
#19
nothing new happened wid your code.
also when i bring adc in circuit...sendChar() method stops responding
.wid adc in the circuit i get nothing . :mad :mad
i have changed every thing adc,max32,controller,crystal,capacitor
but
this is the same circuit and program which were giving me
nice output 2 days ago.but i dont know what happend now.
even im unable to print string :mad :mad
wat shud i do.plz help
Sat Sep 08 2007, 08:41 AM
#20
if you are saying that you have changed the circuit too.. then.. probably the programming mistake.. lets solve it.. paste your program again.. i want to see it..
also the circuit..

Get Social

Information

Powered by e107 Forum System

Conversation

ExperimenterUK
Sun Oct 13 2019, 12:23 AM
Log in.. then post your code in the 8051 forum
Sat Oct 12 2019, 12:18 PM
Bhadra Sajikumar
i am doing a countdown timer with 8051 for my project, unfortunately our professor had to take a leave of absence before he could teach us most of it.. can someone explain the .asm code of it for me?
Mon Sep 23 2019, 09:37 AM
Nathaniel
I am doing a project for my schools wireless security system with cameras,sensors and spot lights using 8051 micro controller, could you help me out with the design and its source code.
Wed Sep 18 2019, 10:48 PM
Caryn Kover
Thank you for your time,
ExperimenterUK
Mon Aug 05 2019, 09:09 PM
@Ismail ..post in forum, give details
Mon Aug 05 2019, 06:33 PM
Ismail balghmi
Hello. Please I won't download
ExperimenterUK
Wed Jul 24 2019, 02:47 AM
@BUSTER123 Please post in the forum
Tue Jul 23 2019, 08:13 PM
BUSTER123
hello! newbie here. i am kind of a guy who hates using ready - made existing libraries, so this helped a lot as i was trying to control and write to a character lcd display. however, i can't figure out how to set the cursor position. for example, i want to set it to the 5th column in the first row, so position 5. so according to the table, i am sending 10000101 on the 8 data lines of the lcd (register select pulled low). the cursor does not move there however. and i cant move the cursor left or right too. is it something wrong that i am doing? thank you.
ExperimenterUK
Thu Jul 11 2019, 09:55 PM
@ramos https://www.theengineeringprojects.com/2017/09/l298-motor-driver-library-proteus.html
ExperimenterUK
Thu Jul 11 2019, 09:44 PM
@praveen123. Can you give a link to the project ?

Downloads

Comments

DeepakBGattani
Mon Nov 11 2019, 01:31 PM
Jeanbusatta
Sun Nov 10 2019, 04:42 AM
mdayaz
Sat Nov 09 2019, 03:41 PM
baoyen123
Fri Nov 08 2019, 10:06 AM
xiwang
Fri Nov 08 2019, 07:28 AM
ilylily07
Tue Oct 15 2019, 04:32 PM
hientran123
Tue Oct 15 2019, 02:27 AM
Sat Oct 05 2019, 02:38 PM

Online

Guests: 31, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38102
Newest member: DeepakBGattani
Forum Activity
Jeanbusatta Avatar
Posted By Jeanbusatta
Sun Nov 10 2019, 04:43 AM
ty, really needed it
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Oct 22 2019, 05:18 AM
wimac Avatar
Posted By wimac
Mon Oct 21 2019, 09:18 AM
I’ve been following this thread and looking at the...
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sun Oct 20 2019, 03:09 PM
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sun Oct 20 2019, 03:02 PM
sir, when i on display ,sometime 3rd display is no...
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sun Oct 20 2019, 02:53 PM
sir, when i on display ,sometime 3rd display is no...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sun Oct 20 2019, 12:21 AM
Your code seems okay on my simulationTry my code o...
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sat Oct 19 2019, 07:13 PM
please find video attachment. 3rd & 4th displa...
s_dinesh40@yahoo.com Avatar
Posted By [email protected]
Sat Oct 19 2019, 07:05 PM
sir, 3rd and 4th dot matrix display flickering, ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Oct 18 2019, 09:18 PM
Hopefully you understand some of the program.Which...