Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Motion detector sensor with sms based security

Status
Not open for further replies.

iRawrz

Newbie level 3
Joined
Sep 13, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,310
Hello all,I'm currently doing my final year project and I'm in a trouble of programming for this project.I already programmed it using assembly but the problem now here is that my coding for my sensor is not working even though I run it using M-IDE and it said no errors.How can I send sms to the mobile phone when the alarm is triggered?So far,I tested the gsm modem and it's working just fine.....Can anyone kindly guide me for this project?Thanks in advance!


Code ASM - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ORG 0000
MAIN:   MOV P1,#00
        JNB P2.6,LOOP
        JMP MAIN        
LOOP:   JB P3.6,COUNT
        CJNE R0,#00H,ON
        ACALL MAIN
ON:     CJNE R0,#01H,MAIN
        SJMP BZ
COUNT:  INC R0
        CJNE R0,#01,SC
        SJMP BZ 
SC:     CJNE R0,#02H,MAIN
        MOV R0,#00H
        JMP MAIN
BZ:     
DELAY:  MOV R1,#255
L1:     MOV R2,#255
L2:     DJNZ R2,L2
        DJNZ R1,L1
        RET
        END



I'm still trying to figure the BZ command that can trigger the alarm....
 
Last edited by a moderator:

What chip are you using?
 

Well yes, it throws out a PIC or AVR or any other type of micro. Not all micros use the same commands.
 

I'm using AT89C51...I know I can use PIC but my project stated to use AT89C51.
 

I'm using AT89C51...I know I can use PIC but my project stated to use AT89C51.
Does the project also require to use assembly language?

I can't imagine that the shown code does anything useful. Subroutine calls and jumps seems to be mixed up.

You may want to start answering some questions to others and to yourself:
- what is the code expected to do?
- which input signals are processed?
- which output signals are controlled?

Assembly code should have a comment after each line of text that explains what's done there.
Called subroutines should be separated from the "main" code block.
Don't use dubious coding tricks like calling into or jumping out of blocks.


Do you have the option to use C language?
 

I'm sorry if I did not explain myself clear enough.

-My project requires me to use assembly code only.
-I'm required to use AT89C51 so PIC and AVR is out of question.
-So forget about the codes I posted,I rewrite the codes again and it worked so it's fine.
-I have two outputs:The alarm and the sms from the gsm modem.
-I haven't test the gsm modem TOGETHER with the sensor and alarm.
-I'll try to use C language as a back up.
-Does anyone knows how to write the code that can send message from the gsm modem along with the sensor and alarm?
 

Sound like this may be need DLL file , collect template to protocal for communication . Library is required from mobile producer , I think it's hard to decise to corperate company.
So u may use the sms chip, 2 chips form the communication system, that easy way right.
 

I think he needs to send SMS when alarm triggered and he needs a asm code for sending SMS. He has to mention which port alarm is connected. If alarm port is high then SMS has to be sent.
 

Download sample source code from GSM chip ; Ti, Maxim IC, Motololar, ... etc
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top