CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC16F628A with SIM900A GSM
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
huihuang1992



Joined: 12 Feb 2016
Posts: 9

View user's profile Send private message

PostPosted: Tue Feb 23, 2016 11:20 am     Reply with quote

Sorry for these disasters, it is my first time to do it..
Ttelmah wrote:

First, in INT_RB, you _must_ read at least one bit of portB. This is in the data sheet, and has been explained here. The act of reading the port, is what sets the internal latch to match what is currently on the port. Until this happens, the interrupt cannot be cleared, and INT_RB will trigger forever, stopping the code from ever actually exiting the interrupt. Disaster...

Then INT_RDA, says 'a character has been received'. Testing kbhit is pointless...

Then you do not check that 'x' has not exceeded the size of the array. If data arrives that is not exactly what you want, this will result in memory becoming corrupted. Again disaster.


Then you have a line 'enable_interrupts', without a interrupt for it to enable. Doubt if this will compile.

This interrupts was a fail.. sorry, because I was testing Timer1 and I don't have completed..

Ttelmah wrote:

Then you send a huge sequence of commands to the modem. Every one of these will receive a reply from the modem (OK probably). You do nothing to empty the data buffer, so by the time you start looking for 'RING', the buffer will have a huge number of characters already in it. Result 'RING' won't be where you expect it.

That huge sequence is for searching location and send the information of location, and some of them respond OK, and every X time I have put "borrar_arrany()", which is used for empty the data buffer.
And about others, I will correct them.

Best regards.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group