EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
You are here: Home / Replies / Hi Kingshuk,You haven’t

Hi Kingshuk,You haven’t

|

Microcontroller › PIC › usart transmission problem › Hi Kingshuk,You haven’t

April 1, 2013 at 5:45 pm #9405
AJISH ALFRED
Participant

Hi Kingshuk,

You haven’t written anything inside an infinite loop, but you can see the data being sent again and again.

Most probably your controller is getting restarted again and again after sending some data, that’s why you feel that the controller is continuosly sending data.

The reason for such an issue is always related with memory shortage. You might be either trying to allocate memory which is not avilable at the moment or trying to access memory which has not been allocated (using pointers).

This is basically run time error. Suggest you to thoroughly analyse your pointer usage.

 
For example in the following function;
 
void gsm_cmd(unsigned char *string)
{
int i=0;j=0;
while(string!=”)
{
 
if(string==0x5C) // Not to send ” cahracter
   i++;
else                          //#### TRY PUT AN ELSE HERE ####
   putch(string); // Send by serial communication
i++;
 
}
 
Try this also; change to ‘const char’
const char *sms_format=”AT+CMGF=1″;
const char *sms_write=”AT+CMGS=”9038940850″”;  // 10-Digit Mobile Number
const char *sms=”Hello”;
const char *sms_report=”SMS Sent…”;
Change to this type in function defenitions and wherever required.
 
 

RSS Recent Posts

  • Capacitor to eliminate speaker hum August 16, 2022
  • Help identify a part August 16, 2022
  • Digital Display Information August 16, 2022
  • Is there a discord for this forum? August 16, 2022
  • Peltier control August 16, 2022

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools