8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Go to page  1 [2] 3 4 5
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
abbas1707
Sat Aug 25 2007, 07:55AM

 User Offline
Registered Member #383
Joined: Thu Jan 25 2007, 08:07AM

Posts: 413
Thanked 63 times in 51 posts
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...



A Thousand Miles Journey Starts With a Single Step.
Back to top


۞ TPS ۞
Sat Aug 25 2007, 12:05PM

 User Offline
Registered Member #2712
Joined: Tue Jul 31 2007, 12:06AM

Posts: 423
Thanked 55 times in 45 posts
abbas i cant see the circuit diagram how to open data logger.dns
file
which software u r using

Online Component Shoppe
http://www.onlinetps.com/
Components at cheap rates in India
Back to top


Ajay
Sat Aug 25 2007, 12:12PM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3315
Thanked 611 times in 578 posts
@ 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.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top

serial communication with VB software   VB sample code   VB serial communication   VB MSCOMM   



This post has been thanked 1 time
 abbas1707 
abbas1707
Sun Sep 02 2007, 12:12AM

 User Offline
Registered Member #383
Joined: Thu Jan 25 2007, 08:07AM

Posts: 413
Thanked 63 times in 51 posts
unable to attach more than 1 image


[ Edited Sun Sep 02 2007, 12:20AM ]

A Thousand Miles Journey Starts With a Single Step.
Back to top


abbas1707
Sun Sep 02 2007, 12:16AM

 User Offline
Registered Member #383
Joined: Thu Jan 25 2007, 08:07AM

Posts: 413
Thanked 63 times in 51 posts
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, 12:26AM ]

A Thousand Miles Journey Starts With a Single Step.
Back to top


Ajay
Sun Sep 02 2007, 02:12AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3315
Thanked 611 times in 578 posts
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...

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


abbas1707
Fri Sep 07 2007, 02:50PM

 User Offline
Registered Member #383
Joined: Thu Jan 25 2007, 08:07AM

Posts: 413
Thanked 63 times in 51 posts
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

A Thousand Miles Journey Starts With a Single Step.
Back to top


Ajay
Fri Sep 07 2007, 03:38PM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3315
Thanked 611 times in 578 posts
try changing this
while(*a!='\0')
{
sendChar(*a);
a++;
}

to

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

and tell me the results..

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


abbas1707
Fri Sep 07 2007, 11:57PM

 User Offline
Registered Member #383
Joined: Thu Jan 25 2007, 08:07AM

Posts: 413
Thanked 63 times in 51 posts
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 .
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
wat shud i do.plz help

A Thousand Miles Journey Starts With a Single Step.
Back to top


Ajay
Sat Sep 08 2007, 01:41AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3315
Thanked 611 times in 578 posts
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..

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


Go to page  1 [2] 3 4 5  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems