temperature logging system
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... :-|
file which software u r using :mad
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.
[ Edited Sun Sep 02 2007, 12:50 pm ]
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:56 pm ]
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...
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
while(*a!='\0')
{
sendChar(*a);
a++;
}
to
while(*a)
{
sendChar(*a++);
}
and tell me the results..
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
also the circuit..