bhanot.manik90
Junior Member level 1
Re: gsm relay
guys ,
I want to interface 8051(at89s52) with nokia 6070...when I connect the fbus with the pc's db-9 connector and through hyper terminal, if a send 'at', i get back an 'ok' response from the mobile on hyper terminal...as fbus is ttl-to-rs232 level converter, so i decided to directly connect the tx,rx pins of mc with the tx ,rx of the mobile and also interfaced an 16*2 lcd with mc,,,Now when i send 'at' to mobile phone, then it does not send an 'ok' on the lcd screen,,,what could be the problem then,,,i guess could it be:: since sbuf is an 8-bit reg but mobile sends 'ok' which is a 16-bit word ,so is the sbuf overrun??,,,,,plzzzzzzzzzzzz tell me what could be the problem, guide me friends,,,also below i have given the code which i am using ,,what could be the problem guys???????
guys ,
I want to interface 8051(at89s52) with nokia 6070...when I connect the fbus with the pc's db-9 connector and through hyper terminal, if a send 'at', i get back an 'ok' response from the mobile on hyper terminal...as fbus is ttl-to-rs232 level converter, so i decided to directly connect the tx,rx pins of mc with the tx ,rx of the mobile and also interfaced an 16*2 lcd with mc,,,Now when i send 'at' to mobile phone, then it does not send an 'ok' on the lcd screen,,,what could be the problem then,,,i guess could it be:: since sbuf is an 8-bit reg but mobile sends 'ok' which is a 16-bit word ,so is the sbuf overrun??,,,,,plzzzzzzzzzzzz tell me what could be the problem, guide me friends,,,also below i have given the code which i am using ,,what could be the problem guys???????
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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 $MOD51 ORG 0000H ; INDICATE FOR SERIAL TRANSMISSION MOV TMOD,#20H ; TIMER 1 MODE 2 MOV TH1,#-3 ; FOR Baud rate MOV SCON,#50H start: clr P2.0 mov dptr,#100h setb tr1 back: clr a movc a,@a+dptr jz here_2 acall send inc dptr sjmp back send: mov sbuf,a;////transmit here: jnb ti,here clr ti ret here_2: jnb ri,here_2 ;/////receive clr ri mov r1,sbuf mov a,#38h ; 16 x 2 LCD 5 x 7 Matrix acall command acall ready mov a,#0fh ; Disply on,Cursor Blinking acall command acall ready mov a,#06h ; Increment Cursor acall command acall ready mov a,#01h ; Clear Disply acall command acall ready mov a,#80h ; Force Cursor to Begining of First Line acall command acall ready lcd: mov a,r1 acall display acall ready here6: sjmp here6 command: mov P1,a clr P2.5 ;RS=0 For COMMAND REGISTER clr P2.6 ; READ/WRITE setb P2.7 acall ready clr P2.7 ret display: mov P1,a setb P2.5 ;RS=1 For DATA REGISTER clr P2.6 ; READ/WRITE setb P2.7 acall ready clr P2.7 ret ; Approx. 20ms Delay ready: mov tmod,#01h ;timer0,mode1(16-bit mode) mov th0,#03eh mov tl0,#0b8h setb tr0 again: jnb tf0,again clr tr0 clr tf0 RET ;%%%%%%%%%%%%%%%%%%%%%%%%%% org 100h db 'a','t',0h END
Last edited by a moderator: