Network Engg

Sunday, August 18, 2013

adc and dac for keil compiler

ADC:


ORG 0000H
READ BIT P2.0
WRITE BIT P2.1
INTR BIT P2.2
ACALL INIT
MOV P3,#0FFH
SETB INTR
START:
CLR WRITE
SETB READ
CALL DELAY
SETB WRITE
CALL DELAY
JB INTR,$
CLR READ
CALL CONV
CALL DISPLAY
ACALL DELAY1
SJMP START
INIT:
MOV A,#38H
ACALL COM
MOV A,#0EH
ACALL COM
MOV A,#01H
ACALL COM
RET
CONV:
MOV A,P3
MOV B,#10
DIV AB
MOV R7,B
MOV B,#10
DIV AB
MOV R6,B
MOV R5,A
RET
DISPLAY:
MOV A,#01H
ACALL COM
MOV A,#80H
ACALL COM
MOV R4,#08D
MOV A,#00H
MOV DPTR,#MYDATA
 NEXT: CLR A
  MOVC A,@A+DPTR
ACALL DATA1
INC DPTR
CLR A
DJNZ R4,NEXT
MOV A,R5
ADD A,#30H
ACALL DATA1
MOV A,R6
ADD A,#30H
ACALL DATA1
MOV A,R7
ADD A,#30H
ACALL DATA1
RET
COM:
ACALL CHKDB7
        CLR P2.5
CLR P2.6
SETB P2.7
MOV P1,A
CLR P2.7
RET
DATA1:
ACALL CHKDB7
SETB P2.5
CLR P2.6
SETB P2.7
MOV P1,A
CLR P2.7
RET
CHKDB7:
SETB P1.7
CLR P2.5
SETB P2.6
BAC: CLR P2.7
SETB P2.7
JB P1.7, BAC
RET
DELAY:
MOV R2,#0AAH
DJNZ R2,$
RET
DELAY1:
MOV R0,#08h
 OUT3: MOV R1,#0FFh
 OUT2:  MOV R2,#0FFh
  DJNZ R2,$
DJNZ R1,OUT2
DJNZ R0,OUT3
RET
MYDATA:DB "DATA IS:"
END  

DAC:



org 000h
mov a,#00h
LABEL:mov p2,a
/*acall delay*/
inc a
cjne a,#0ffh,LABEL
LABEL1:mov p2,a
/*acall delay*/
dec a
cjne a,#00h,LABEL1
sjmp LABEL
delay:
mov r2,#02fh
LABEL2:mov r1,#0ffh
LABEL3:mov r0,#0ffh
djnz r0,$
djnz r1,LABEL3
djnz r2,LABEL2
ret
end

chemistry home work

LOVELY PROFESSIONAL UNIVERSITY


HOME WORK: 2

School:                                                                                    Department:

Name of the faculty member:                                                 Course No: CHE101

Course Title: Chemistry

Class:                           Term:                                       Section:                       Batch:

Max. Marks:    7                      Date of Allotment:                  Date of Submission:



                                                                            PART A
Q.1 For the reaction A + B + C →  products, the following initial rate data were obtained:  

[A]

[B]

[C]
Initial Rate 
(M.s-1)
0.050
0.050
0.10
1.1 x 10-3
0.050
0.10
0.10
4.4 x 10-3
0.10
0.050
0.10
1.1 x 10-3
0.10
0.050
0.30
3.3 x 10-3
Find the rate law for this reaction.
Q2. For a first order reaction the following data are obtained from an experiment by measuring the concentration as a function of time.  The reaction is of the type: A products.                          
time (secs.)
[A]
0
1.00
50
0.500
100
?
Determine the molar concentration of A after 100 seconds have elapsed and also determine the value of rate constant k in sec-1.
Q.3 In the reaction of potassium (K) with methyl iodide (CH3I) to for the product KI, how orientation of these reactant molecules play important role in product formation. Except from this what will be the other requirements for reactant molecules to form product according to collision theory.
PART B
Q.4 Balance the following redox equations:
a)      CN- + MnO4- → CNO- + MnO2      (in basic solution)
b)      Cr2O72- + C2O42- → Cr3+ + CO2     (in acidic solution)


Q.5 Ca (s) + Cd2+ (aq) → Ca2+ (aq) + Cd (s)
In the above reaction assume that initial concentration of dissolved species are 1.0 M. Predict whether this reaction will be feasible or not in aqueous solution at 250C.
Q.6 Discuss the advantages and disadvantages of fuel cells over conventional power plants in producing electricity.