Hi Darrenmac,
how do you determine tha the sequence hangs?
I sugest that you send a simple AT command and capture the answer as a first step.
In my code example as published is:
HSerout ["at",cr] ' <----- Check for Phone presence
HSerin 400,nophone,[wait ("OK")]
Pause 500
Just convert it to SEROUT and SERIN commands since 16F84 does not have a hardware USART.
In the above example, a sent an AT command followed by a Carriage Return character and then waited for 400 ms for the phone to respond with an “OK”. If within the 400 ms there is no answer (meaning that the phone does not respond) then program execution would continue at label “nophone” where I use a small code to indicate phone absence.
Further to the above, I suggest you test communication at various speeds, baud rates. Try 9600 which is the standard and on unsuccessful results move down to lower speeds.
You can also check your cable connection or the levels on your RS232 interface. Also check if you need to use True or Inverted mode in your SEROUT lines.
I haven used the 16F84 but I cannot see any reason why it should not work ok.
Regards
Kypros




Bookmarks