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.

Problem with SERIN2 & SEROUT2 in a code for transmitting data from SE T630

Status
Not open for further replies.

eugenesiew

Member level 2
Joined
Oct 2, 2007
Messages
47
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,697
I have written a code for a sms controller. The code works perfectly well in hyper terminal, but when connected with SE T630, it doesn't seem to work at all. I found out that the main reason was the SERIN2 part, if i had that part remove, the code can be run on SE T630. But that only makes my communication one way, from controller to T630, but no communication from T630 to controller. Is that any mistake in my code or is there any other way to see if data can be transmit from SE T630 to the controller. thanks!

===================================================
define OSC 20
Include "modedefs.bas"
trisb.0=0
TRISB.3=1

X var byte

start:
IF PORTB.3=1 THEN
SEROUT2 portb.1, 16780, ["AT+CMGF=1", 10, 13]
pause 3000
SEROUT2 portb.1, 16780, ["AT+CPMS=", 34, "ME", 34, 44, 34, "ME", 34, 44, 34, "ME", 34, 10, 13]
pause 3000

SERIN2 portb.2,16780,[ WAIT ("3479 "),X]
SEROUT2 portb.1, 16780, ["AT+CMGR=1", 10, 13]
pause 3000

Select case X
case "A"
SEROUT2 portb.1, 16780, ["at+cmgs=",34, "0123456789",34, 10, 13]
pause 3000
SEROUT2 portb.1, 16780, ["LED A turn on", 26]
pause 3000

case "a"
SEROUT2 portb.1, 16780, ["at+cmgs=",34, "0123456789",34, 10, 13]
pause 3000
SEROUT2 portb.1, 16780, ["LED A turn off", 26]
pause 3000

case else
SEROUT2 portb.1, 16780, ["at+cmgs=",34, "0123456789",34, 10, 13]
pause 3000
SEROUT2 portb.1, 16780, ["Invalid Command", 26]
pause 3000
end select

ENDIF
goto start
===================================================
 

serin2

forget about my question, i had figure it out already... thanks for dropping by anyway...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top