abbas1707
Aug 8 2007, 3:40 AM
hi ajay,
im working on data logger project. first im working at proteus .
i cant find simulation model for adc0848 on proteus7.i need it badly.
plz tell me what to do where to find it
im working on data logger project. first im working at proteus .
i cant find simulation model for adc0848 on proteus7.i need it badly.
plz tell me what to do where to find it
Ajay
Aug 8 2007, 4:09 AM
you can try out with a similar kind of ADC, as this model is not there for simulation. see what properties are there in ADC0848 find a similar one with simulation model in proteus and at least finish your project 

abbas1707
Aug 8 2007, 4:18 AM
thankx for ur reply.
i have done it using adc0808.
i have done it using adc0808.
abbas1707
Aug 9 2007, 4:42 PM
hi rickey,
im facing problem with adc0808 on proteus.it is not giving correct reading.actually i consulted mazide book.
according to Mazide when we apply VREF= 2.56v and vin=0-->2.56v then the step size is 10mv.
it means when i give analog signal of .26v as vin number of steps shown should be 26 but adc0808 is showing 88 steps
can u plz help me solving this problem.also i have reinstalled proteus but the same thing happening.plz help me Cry Cry
im facing problem with adc0808 on proteus.it is not giving correct reading.actually i consulted mazide book.
according to Mazide when we apply VREF= 2.56v and vin=0-->2.56v then the step size is 10mv.
it means when i give analog signal of .26v as vin number of steps shown should be 26 but adc0808 is showing 88 steps
can u plz help me solving this problem.also i have reinstalled proteus but the same thing happening.plz help me Cry Cry
Ajay
Aug 10 2007, 3:46 AM
can you show me the circuit that you've made? i want to see the circuit arrangement.
As far as you told me, it must show 26 steps. rest i can only tell when i see your circuit.
As far as you told me, it must show 26 steps. rest i can only tell when i see your circuit.
abbas1707
Aug 10 2007, 3:55 AM
abbas1707
Aug 10 2007, 4:32 AM
ajay i have solved the problem
i was making a big mistake

i was making a big mistake

Ajay
Aug 10 2007, 4:35 AM
I checked your cirucit, its perfectly fine..
then i checked your program.. it has little mistake. The data you are getting from the ADC output will be hex value, so.. you cannot directly send it to the terminal.
for example.. as you said for 260mV i/p the o/p should be 26 steps.. that means the ADC o/p will be 0x1A
so when you convert it to decimal you will get 26. and then display it
have fun programming
then i checked your program.. it has little mistake. The data you are getting from the ADC output will be hex value, so.. you cannot directly send it to the terminal.
for example.. as you said for 260mV i/p the o/p should be 26 steps.. that means the ADC o/p will be 0x1A
so when you convert it to decimal you will get 26. and then display it
have fun programming

abbas1707
Aug 10 2007, 4:49 AM
but i have solved by changing the circuit
actually OUT1 is the MSB and i was taking it as LSB (very funny na). i didnt changed the program a little bit.
and now reading are perfect
thanks for ur help
actually OUT1 is the MSB and i was taking it as LSB (very funny na). i didnt changed the program a little bit.
and now reading are perfect
thanks for ur help
Ajay
Aug 10 2007, 5:05 AM
lol even i didn't check it..
and i thought you're not changing hex to decimal
anyways happy it worked 
and i thought you're not changing hex to decimal
anyways happy it worked 
abbas1707
Aug 25 2007, 7:55 AM
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...
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...

۞ TPS ۞
Aug 25 2007, 12:05 PM
abbas i cant see the circuit diagram how to open data logger.dns
file which software u r using
file which software u r using

Ajay
Aug 25 2007, 12:12 PM
@ 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
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.
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.
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
Sep 2 2007, 12:12 AM
unable to attach more than 1 image
abbas1707
Sep 2 2007, 12:16 AM
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
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
Ajay
Sep 2 2007, 2:12 AM
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
Do share your project after you finish...
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.
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...

abbas1707
Sep 7 2007, 2:50 PM
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
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
Ajay
Sep 7 2007, 3:38 PM
try changing this
while(*a!='\0')
{
sendChar(*a);
a++;
}
to
while(*a)
{
sendChar(*a++);
}
and tell me the results..
while(*a!='\0')
{
sendChar(*a);
a++;
}
to
while(*a)
{
sendChar(*a++);
}
and tell me the results..
abbas1707
Sep 7 2007, 11:57 PM
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
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
Ajay
Sep 8 2007, 1:41 AM
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..
also the circuit..
abbas1707
Sep 10 2007, 9:09 AM
hi Ajay!
replying late coz i was out of town for some tafreeh.
im posting c program and proteus file.only max232 and db9 are not included in this files coz those are perfect as im only able to send characters from controller to pc.means transmission is working fine.
problem occurs when i use this attached c code or use sendString method which i posted in previous post.
n believe me the circuit and code which i am attaching were working perfectly some days ago.
i succcessfully logged the temperature in my vb program.
but i dont know wat happened to it now.it shows no response now.
also i clear u dat there is no problem in the circuit because i said my friend to write code in assembly
for this project.he made an assembly program and i cant believe dat his assembly code is working fine on this circuit.i m also sending u dat assembly code.but there is some ascii conversion problem in his code i think(but not sure as i have zero knowledge of assembly).but im getting exact reading in hex repersentation (which i done in vb) from his code.
i think dat circuit contains some type of filter which is blocking my c program to function...hehehe
realy it makes me feel like a 2 takay ka programmer.....coz its so simple and and shame on me dat my program getting floped( but i still believe dat there is some filter in circuit otherwise it would have not shown response some days ago)
plz help
waiting 4 ur reply
1189440574_383_FT1501_loger_problem.zip
replying late coz i was out of town for some tafreeh.
im posting c program and proteus file.only max232 and db9 are not included in this files coz those are perfect as im only able to send characters from controller to pc.means transmission is working fine.
problem occurs when i use this attached c code or use sendString method which i posted in previous post.
n believe me the circuit and code which i am attaching were working perfectly some days ago.
i succcessfully logged the temperature in my vb program.
but i dont know wat happened to it now.it shows no response now.
also i clear u dat there is no problem in the circuit because i said my friend to write code in assembly
for this project.he made an assembly program and i cant believe dat his assembly code is working fine on this circuit.i m also sending u dat assembly code.but there is some ascii conversion problem in his code i think(but not sure as i have zero knowledge of assembly).but im getting exact reading in hex repersentation (which i done in vb) from his code.
i think dat circuit contains some type of filter which is blocking my c program to function...hehehe
realy it makes me feel like a 2 takay ka programmer.....coz its so simple and and shame on me dat my program getting floped( but i still believe dat there is some filter in circuit otherwise it would have not shown response some days ago)
plz help
waiting 4 ur reply
1189440574_383_FT1501_loger_problem.zipAjay
Sep 10 2007, 12:52 PM
abbas1707
Sep 10 2007, 1:28 PM
i know dat its working on proteus.problem is dat it is not working on hardware.
im using ez downloader for burning code.and if there was some problem wid burner then y this circuit was working fine wid my code before.and also i worked wid my friends burner for this project but same problem occurs.but he is also using ez downloader.shud i try it wid different burner??
im still very disappointed with circuits behavior.
Ajay i want to request every one on this forum if anyone have the circuitry for serial cmmunication of AT89c51 plz plzzzzz help me and do check this code on their(if anyone have) circuit.
coz even this simple program giving me no response
#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();
}
}
wat do u say Ajay...wat shud i do ....
i have no other way to solve it
im using ez downloader for burning code.and if there was some problem wid burner then y this circuit was working fine wid my code before.and also i worked wid my friends burner for this project but same problem occurs.but he is also using ez downloader.shud i try it wid different burner??
im still very disappointed with circuits behavior.
Ajay i want to request every one on this forum if anyone have the circuitry for serial cmmunication of AT89c51 plz plzzzzz help me and do check this code on their(if anyone have) circuit.
coz even this simple program giving me no response
#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();
}
}
wat do u say Ajay...wat shud i do ....
i have no other way to solve it
Ajay
Sep 10 2007, 3:38 PM
Is the above code working with your circuit?
I will check it on my controller and will tell you the results..
By the way... did you check your circuit? coz sometimes a small connection or a short can give you a big problem. Even though your circuit was working, I advice you to double check the circuit once..
Also if your friend has a different circuit then tell him to check it too.. so you can get some idea.. as far as program is concerned there seems no problem right now..
I will check it on my controller and will tell you the results..
By the way... did you check your circuit? coz sometimes a small connection or a short can give you a big problem. Even though your circuit was working, I advice you to double check the circuit once..
Also if your friend has a different circuit then tell him to check it too.. so you can get some idea.. as far as program is concerned there seems no problem right now..
abbas1707
Sep 10 2007, 3:49 PM
no
the above code not works on my circuit.
and it is confirmed that there is no problem in the circuit as i told u dat the circuit is working fine with assembly code of my friend which i posted on top of page..
the above code not works on my circuit.and it is confirmed that there is no problem in the circuit as i told u dat the circuit is working fine with assembly code of my friend which i posted on top of page..

Ajay
Sep 11 2007, 2:04 PM
Hi.. abbas..
one thing i am confused with.. you wanted to tell me that your friend's code is working on your controller board but your code which was working few days back.. suddenly stopped working is it?
If that is the case.. stress your mind and try to undo the change you made before when code worked..
one thing i am confused with.. you wanted to tell me that your friend's code is working on your controller board but your code which was working few days back.. suddenly stopped working is it?
If that is the case.. stress your mind and try to undo the change you made before when code worked..
abbas1707
Sep 11 2007, 2:28 PM
yes my friend's code is working on my controller board but my code which was working few days back.. suddenly stopped working
and i still have those codes in original form which were working fine on my circuit
but now they are faaarigh ;(
code is correct i think bcoz it works fine on proteus,circuit is fine coz it works fine wid my frend code.
then where is the problem......?????
i think i must quit c programming and turn to assembly
have u tried dat string program on ur circuit??
and i still have those codes in original form which were working fine on my circuit
but now they are faaarigh ;(
code is correct i think bcoz it works fine on proteus,circuit is fine coz it works fine wid my frend code.
then where is the problem......?????
i think i must quit c programming and turn to assembly
have u tried dat string program on ur circuit??
Ajay
Sep 11 2007, 2:43 PM
no not yet... i was just thinking about your program only.. and trying to understand what you really meant.. wait i try your send string program now.. will take a sec.. hold on!
Ajay
Sep 11 2007, 3:23 PM
yes your serial program working on my controller board.. all i can say is.. check your connections or something 

abbas1707
Sep 11 2007, 3:49 PM
i will try it wid some different programmer board 

abbas1707
Sep 14 2007, 3:15 PM
hi ajay!
here is my first program in assembly:) for this project
i just now tested it on proteus but it gets stuck after 30 seconds on proteus.i have not tested it at board yet.
since im a newbie to assembly so plz can u have a look at it if u have time!!!
circuit is same as i posted before
1189808107_383_FT1501_assembly1.zip
here is my first program in assembly:) for this project
i just now tested it on proteus but it gets stuck after 30 seconds on proteus.i have not tested it at board yet.
since im a newbie to assembly so plz can u have a look at it if u have time!!!
circuit is same as i posted before
1189808107_383_FT1501_assembly1.zipAjay
Sep 15 2007, 12:38 AM
well of course it will get stuck. the reason is.. you are calling the subroutines and you are not using the instruction "RET".
so at the end of every subroutine you must put the instruction RET.
I am attaching the code.. check it carefully
so at the end of every subroutine you must put the instruction RET.
I am attaching the code.. check it carefully

Ajay
Sep 15 2007, 12:39 AM
i donno not able to attach file.. so just copying and pasting it here..
CODE:
org 0
ljmp main
org 0bh
cpl clock
reti
org 23h
ljmp serial
org 30h
main:
clock bit P3.2
sc bit P3.3
eoc bit P3.4
oe bit P3.5
ale bit P3.7
mov dptr,#aray
mov TMOD,#22h
mov TH1,#0FDh
mov SCON,#50h
mov TH0,#0a3h
mov IE,#10010010B
setb TR1
setb TR0
mov P2,#0ffh
setb eoc
clr ale
clr oe
clr sc
while1:
clr P1.0
clr P1.1
clr P1.2
acall msdelay
setb ale
acall msdelay
setb sc
acall msdelay
clr ale
clr sc
wait:
jb eoc,wait
wait1:
jnb eoc,wait1
setb oe
acall msdelay
mov r2,P2
clr oe
acall convert
sjmp while1
convert:
mov a,r2
mov b,#10
div ab
mov r7,b;lower
mov b,#10
div ab
mov r6,b ;mid
mov r5,a ;high
acall sendString
ret
sendString:
mov a,r5
movc a,@a+dptr
mov SBUF,a
fis:
JNB TI,fis
acall msdelay
mov a,r6
movc a,@a+dptr
mov SBUF,a
sec:
JNB TI,sec
acall msdelay
mov a,r7
movc a,@a+dptr
mov SBUF,a
thd:
JNB TI,thd
acall msdelay
mov SBUF,#","
com:
JNB TI,com
acall msdelay
ret
msdelay:
mov r2,#50
he:
mov r3,#250
she:
nop
nop
djnz r3,she
djnz r2,he
ret
aray: db "0123456789"
serial:
JB TI,trans
reti
trans:
clr TI
reti
end
ljmp main
org 0bh
cpl clock
reti
org 23h
ljmp serial
org 30h
main:
clock bit P3.2
sc bit P3.3
eoc bit P3.4
oe bit P3.5
ale bit P3.7
mov dptr,#aray
mov TMOD,#22h
mov TH1,#0FDh
mov SCON,#50h
mov TH0,#0a3h
mov IE,#10010010B
setb TR1
setb TR0
mov P2,#0ffh
setb eoc
clr ale
clr oe
clr sc
while1:
clr P1.0
clr P1.1
clr P1.2
acall msdelay
setb ale
acall msdelay
setb sc
acall msdelay
clr ale
clr sc
wait:
jb eoc,wait
wait1:
jnb eoc,wait1
setb oe
acall msdelay
mov r2,P2
clr oe
acall convert
sjmp while1
convert:
mov a,r2
mov b,#10
div ab
mov r7,b;lower
mov b,#10
div ab
mov r6,b ;mid
mov r5,a ;high
acall sendString
ret
sendString:
mov a,r5
movc a,@a+dptr
mov SBUF,a
fis:
JNB TI,fis
acall msdelay
mov a,r6
movc a,@a+dptr
mov SBUF,a
sec:
JNB TI,sec
acall msdelay
mov a,r7
movc a,@a+dptr
mov SBUF,a
thd:
JNB TI,thd
acall msdelay
mov SBUF,#","
com:
JNB TI,com
acall msdelay
ret
msdelay:
mov r2,#50
he:
mov r3,#250
she:
nop
nop
djnz r3,she
djnz r2,he
ret
aray: db "0123456789"
serial:
JB TI,trans
reti
trans:
clr TI
reti
end
abbas1707
Sep 15 2007, 2:18 AM
yeah now it works
u put ret at end of subroutine sendString.but y it was not working wid ljmp while1?????
plz clarify becoz i have only 1 day knowledge of assembly so i cant understand this
u put ret at end of subroutine sendString.but y it was not working wid ljmp while1?????
plz clarify becoz i have only 1 day knowledge of assembly so i cant understand this

Ajay
Sep 15 2007, 2:57 AM
you know why your controller stops working after 30sec?
because of stack overflow..
you are using acall.. that means call to a subroutine.. and in the subroutine you are not returning.. so.. when you do this all in loop.. the stack stores the address from where call is made.. and when stack overflow.. on next call the address will not be stored anywhere.. and when executing routine like msdelay and when it reach to RET instruction it will jump to some unknown location because the actual address couldn't be stored coz of stack overflow.
Now.. if you want to use ur program.. with LJMP while1
then.. remove the calls to sendstring and convert in your program.. because they all comes in order.. no address will be stored in stack. except for routines with RET statement.
because of stack overflow..
you are using acall.. that means call to a subroutine.. and in the subroutine you are not returning.. so.. when you do this all in loop.. the stack stores the address from where call is made.. and when stack overflow.. on next call the address will not be stored anywhere.. and when executing routine like msdelay and when it reach to RET instruction it will jump to some unknown location because the actual address couldn't be stored coz of stack overflow.
Now.. if you want to use ur program.. with LJMP while1
then.. remove the calls to sendstring and convert in your program.. because they all comes in order.. no address will be stored in stack. except for routines with RET statement.
abbas1707
Sep 15 2007, 6:09 AM
now some different problem
program tested on microcontroller board instead of proteus this time.
but...
i get reading to hyper terminal only if i press reset button on board.
i.e press reset get one reading then press reset and get other reading..........
however my frend program working on board
no problem in harware no problem in software(as it was fine on proteus)
i m just going mad
program tested on microcontroller board instead of proteus this time.
but...
i get reading to hyper terminal only if i press reset button on board.
i.e press reset get one reading then press reset and get other reading..........
however my frend program working on board
no problem in harware no problem in software(as it was fine on proteus)
i m just going mad

abbas1707
Sep 15 2007, 6:11 AM
i think i shud quit programming now and work wid my frends program
i hav done every effort i can
i hav done every effort i can
Ajay
Sep 15 2007, 7:02 AM
there must be something you are missing.. well.. i donno what to say..
don't loose hope 
don't loose hope 
abbas1707
Sep 16 2007, 4:45 AM
hi
anyone knows how to generate crystal reports and how to attach them with vb??
anyone knows how to generate crystal reports and how to attach them with vb??
۞ TPS ۞
Sep 16 2007, 5:29 AM
abbas it looks interesting 

Ajay
Sep 16 2007, 5:59 AM
yeah looks really cool!!
better than one binu is selling..
hope we can provide them with the source
I strongly believe in Open Source things
better than one binu is selling..
hope we can provide them with the source
I strongly believe in Open Source things

Ajay
Sep 16 2007, 6:10 AM
here is what you were looking for
hey.. abbas don't forget to share your project with Rickey's World..
This one is for VB.net but it might be helpful to give you some idea
Generate a Crystal Reports report without a database
Some other links for reference:
Reference 1
Reference 2
Reference 3
Reference 4 (this one is good)
hey.. abbas don't forget to share your project with Rickey's World..
This one is for VB.net but it might be helpful to give you some idea
Generate a Crystal Reports report without a database
Some other links for reference:
Reference 1
Reference 2
Reference 3
Reference 4 (this one is good)
abbas1707
Sep 30 2007, 11:43 PM
hi Ajay,
im adding GPRS mobile (T290i) to this project.wat i have to do is when mobile attached to circuit recieves a particular message i.e "s1" from a particular number then it will send required data to dat number.
basics are done..i.e i have interfaced mobile with hyper terminal,vb,89c51 and every thing works fine..
now i have a question " can i add another serial port to computer"??how can i do it...it will really make work simple.
w8ing 4 ur reply
thnx in advance!

im adding GPRS mobile (T290i) to this project.wat i have to do is when mobile attached to circuit recieves a particular message i.e "s1" from a particular number then it will send required data to dat number.
basics are done..i.e i have interfaced mobile with hyper terminal,vb,89c51 and every thing works fine..
now i have a question " can i add another serial port to computer"??how can i do it...it will really make work simple.
w8ing 4 ur reply
thnx in advance!

shyam
Oct 1 2007, 5:17 AM
hi abbas,
if u have a empty pci slot u can get a pci based serial port ....
if u r lucky u can even get two in one card.....
it is simple to add them ....
they also come with a driver cd (for windows)....
for linux download them frm the respective repositories....
if u have a empty pci slot u can get a pci based serial port ....
if u r lucky u can even get two in one card.....
it is simple to add them ....
they also come with a driver cd (for windows)....
for linux download them frm the respective repositories....

abbas1707
Dec 4 2007, 9:40 AM
how it looks??
:):)
:):)
Ajay
Dec 4 2007, 9:49 PM
wwwwwwwwwooooooooooowwwwwwwww!!!!!!!
awesome
people will do anything to make this project lol! ha ha ha....

awesome
people will do anything to make this project lol! ha ha ha....

Kelvin
Dec 5 2007, 5:10 AM
Its look nice. can you post the VB source code.
Ajay
Dec 5 2007, 5:42 AM
keep in mind NO COMMERCIAL USE see the license information at the bottom of the site 
