My Proto is acting up funny!

Thread Starter

R!f@@

Joined Apr 2, 2009
9,728
I am stumped with this issue.
As per advices I am using a 18F45K22 which solved the bank switching problem and got lots of memory.
Been filling it up with GSM codes

LCD is set up to indicate when an SMS is sent so I can see when one SMS is sent and another is being sent.
Just delays mostly defined by the time it takes to send ans SMS.

My problem is that I can clearly see the software locks up after sending one SMS and way before sending the other ( before even when it begins to send the GSM command. )
Funny thing is with the PC terminal program it is working one after the other without a single lock up

I can see the number been send and when I sent "> " it shows the SMS I am sending and passes on to the next number, total up to 5 clients. The LCD shows as I set up to count the SMS being sent as it advances.
After sending the SMS it takes about 8 seconds for SMS to receive so I set up a delay to display "1" after the that SMS and also an indication when the second SMS number is being sent via UART, so I know when the UART is sending AT what number being send at any given time.

The GSM command is a loop as the software waits for the "> " from the modem and when the modem is ready it sends the SMS data. All the SMS and commands are saved to ROM.

I used the terminal program to see what it does and it is doing what I want it to. After confirmation I connected the Modem and after the first SMS the software locks up. I can see from the LCD that is has locked up but the ISR is running as there is a LED toggled by ISR to check if the interrupt is running, After one minute ( watchdog timer setting ) the PIC resets.
I clearly know it is locking up after the PIC send the SMS to modem and during the 8 second delay. Because after 8 seconds it will send the AT command for the next number. The LCD is set up to show that.
phone receives first SMS and code locks up during the 8 delay every single friggin' time. :mad: and then PIC resets at the WDT time period.
So I connect the PC serial to check and the stupid thing is working every time.:eek:
I mean it never locks up during the terminal program but locks up after sending the first SMS with modem connected......o_O

I am stumped and lost :oops:

I am figuring the modem GSM radiation is messing up my circuit...I dunno....it is with close proximity and circuit is having a lotta fly wires and all.

I figured the GSM code will create problems but no, it was a delay between after sending the UART signal and during updating the LCD.

I will try other ways to check even though I got no idea what I am gonna try .
I dunno any of you guys might know what the problem could be but it wouldn't hurt to ask. Right ?
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,728
Oh OK !
I had the SMS routine response check with Echo Disabled, while the Modem Signal lock checking routine is using Echo enabled.
I simply overlooked that part.
Added a routine to disable Echo after Signal lock and viola.
It's working flawlessly.
 
Top