mic_k86
Jul 2 2008, 7:19 AM
i have few questions on the PC base data logger project availabe at the downloads section.
1. inside the asm coding i found that got part coding of DS1307 but i dont found that component inside the circuit.
2. which part of the coding is for the serial port interfacing? i cant find it
thanks
1. inside the asm coding i found that got part coding of DS1307 but i dont found that component inside the circuit.
2. which part of the coding is for the serial port interfacing? i cant find it
thanks
pdi33
Jul 2 2008, 8:14 PM
hi mic,
i checked on the code and found that ur second post regarding the serial port interfacing (UART) is indeed true.Also i think the author has used some of the i2c routines of DS1307 for interfacing the temperature sensor (which also followis the i2c interfacing logic.
I would recommend u instead to follow the project by abbas bhai on the same topic (only much better than that
) with the following topic "data acquisition using 8051". Here is the link:
http://www.8051projects.net/downloads196.html
i checked on the code and found that ur second post regarding the serial port interfacing (UART) is indeed true.Also i think the author has used some of the i2c routines of DS1307 for interfacing the temperature sensor (which also followis the i2c interfacing logic.
I would recommend u instead to follow the project by abbas bhai on the same topic (only much better than that
) with the following topic "data acquisition using 8051". Here is the link:http://www.8051projects.net/downloads196.html
mic_k86
Jul 2 2008, 11:38 PM
what is i2c interfacing logic? what is ur opinion on the coding of DS1307? will the circuit functioning without the DS1307 part coding? or the author forgot publish circuit diagram for DS1307 part?
for the UART part, is that directly add the following code will be ok?
Serial_Init:
mov TMOD,#20H
mov SCON,#50H
mov TH1,#0FDH
mov TL1,#0FDH
setb TR1
ret
if add, this UART code need to add to which section of the coding ?
for the UART part, is that directly add the following code will be ok?
Serial_Init:
mov TMOD,#20H
mov SCON,#50H
mov TH1,#0FDH
mov TL1,#0FDH
setb TR1
ret
if add, this UART code need to add to which section of the coding ?
pdi33
Jul 3 2008, 8:18 PM
hi mic,
well, i seemed to miss out that the serial communication is in fact present in the code . check these part of the code by theauthor:
MOV TH1,#0FDH
MOV SCON,#50H
SETB TR1
this does the initialisation of the uart required as u have also posted earlierusing timer 1 to generate the baud rate.
take care that the TH1 value has to be selected depending upon the baud rate required and the crystal frquency.
Now, the actual transmitting of data is done in this part:
TRANS:
MOV SBUF,A
JNB TI,$
CLR TI
RET
note that the instruction mov sbuf,a initiates the transmission of data transferred to the SBUF register and the TI bit is set when transmission is complete.
hope u got the logic now.
As for the DS1307 part, as mentioned earlier, the author has only used the i2c communication routines of the ds1307 and not the DS1307 itself. actually this is because the temperature sensor DS1621 used in the circuit also supports i2c protocol for communication. So,No, u need not connect the DS1307 to the circuit.
well, i seemed to miss out that the serial communication is in fact present in the code . check these part of the code by theauthor:
CODE:
MOV TH1,#0FDH
MOV SCON,#50H
SETB TR1
this does the initialisation of the uart required as u have also posted earlierusing timer 1 to generate the baud rate.
take care that the TH1 value has to be selected depending upon the baud rate required and the crystal frquency.
Now, the actual transmitting of data is done in this part:
CODE:
TRANS:
MOV SBUF,A
JNB TI,$
CLR TI
RET
note that the instruction mov sbuf,a initiates the transmission of data transferred to the SBUF register and the TI bit is set when transmission is complete.
hope u got the logic now.
As for the DS1307 part, as mentioned earlier, the author has only used the i2c communication routines of the ds1307 and not the DS1307 itself. actually this is because the temperature sensor DS1621 used in the circuit also supports i2c protocol for communication. So,No, u need not connect the DS1307 to the circuit.