Discussion in "Project Help" started by    maxparveen    Feb 7, 2008.
Thu Feb 07 2008, 12:07 am
#1
hello sir!
i m 3rd year b.tech. student and working on a project titled 'campus power management and monitoring'.
in this project i have to manage the power of whole college campus including generator room and commands will be given by computer.now for that i have separate modules
1) data acquisition system ----to monitor varios tempratures of generator room,voltages,current------- adc808
2)uart module---------------interfacing pc and controller-------------max232
3)power control--------------relays--------------uln2003

4)software in visual basic


i have seen a project made by you which is similar to this.
i m facing some problems like

1)how to interface 50-60 or more relays to 8051, there status should be displayed on pc also
2)since generator room is 400 yard from campus ,RF communication is needed for controlling this remote unit.
my progress:
i have prepared a vb code for sending and recieving data including data parsing .
i have prepared hardware using max232 which is sending data but not recieving.so i can only send data to pc but not receiving commands from pc.
i m sending that basic program please check it out.
all hardware connections seems right as given in your tutorial .
vb code is working i have checked it by communication between two pc's
computer serial port i sending data but controller is not receiving.
there is no expert around here in my college even my seniors have not done anything with 8051. i m on my own here
so i need your guideline to make this work.

;;;;;;;
recieve.asm

rs bit p3.5
rw bit p3.4
en bit p3.3
        org 0000h
        mov tmod,#20h
        mov th1,#-3
        mov scon,#52h
        setb tr1
        mov dptr,#mycomlcd
c1:     clr a
         movc a,@a+dptr
         acall comnwrt
         acall delay40u
         jz here
         inc dptr
         sjmp c1

here:   jnb ri,here
          clr ri
          mov a,sbuf
          cpl p1.0        ;;;;;;;;;;;;;;;;;;;;;;data recieved ack.  led
          acall datawrt
          acall delay40u
          sjmp here
        
comnwrt:
        acall readylcd
        mov p2,a
        clr rs
        clr rw
        setb en
        acall delay40u
        clr en
        ret
datawrt:
        acall readylcd
        mov p2,a
        setb rs
        clr rw
        setb en
        acall delay40u
        clr en
        ret
readylcd:
        setb p2.7
        clr  rs
        setb rw
backlcd: clr en
        setb en
        jb p2.7,backlcd
        ret
delay40u:                               ;75, 40.6us
        mov r4,#24h     
here40u:
        djnz r4,here40u 
        ret     

delaylcd:   mov r3,#255
herelcd2:   mov r4,#255
herelcd:    djnz r4,herelcd
                djnz r3,herelcd2
              ret
       
         org 300h
mycomlcd:   db 38h,0ch,01,06,80h,0

delay10u:
               mov r4,#0FFh       
here10u:
               djnz r4,here10u   
        RET        
      END


[ Edited Thu Feb 07 2008, 09:41 am ]
Thu Feb 07 2008, 10:22 am
#2
in your program..
make
mov scon,#50h

no need to set TI bit. it will be set automatically when data is sent.
your program is correct. Even if you feel your connections are fine please once again do a cross check of connections.
 maxparveen like this.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

BillyTum
Tue May 14 2024, 09:08 am
Loganbag
Tue May 14 2024, 04:05 am
MichaelMog
Tue May 14 2024, 03:58 am
ThomasGaxaW
Mon May 13 2024, 05:33 pm
RobertInfup
Mon May 13 2024, 04:28 pm
Joshuatem
Mon May 13 2024, 08:30 am
RaymondPex
Mon May 13 2024, 03:24 am
Kennethbycle
Sun May 12 2024, 03:12 pm