Discussion in "Project Addition or Changes" started by    mic_k86    Jul 2, 2008.
Wed Jul 02 2008, 07:49 pm
#1
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
Thu Jul 03 2008, 08:44 am
#2
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
Thu Jul 03 2008, 12:08 pm
#3
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 ?


[ Edited Thu Jul 03 2008, 12:35 pm ]
Fri Jul 04 2008, 08:48 am
#4
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.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Robertrip
Fri Apr 26 2024, 11:20 am
ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm