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
  • Advertise
You are here: Home / Replies / this is my code for

this is my code for

|

Electronics › Electronics › Help in Gsm module › this is my code for

August 23, 2013 at 5:56 pm #10367
Anant Pawar
Participant

this is my code for atmega8….its not working..

 help me..where to edit code…

 

this code is transmitting commands to hyperterminal but not working with mcu

 

#include<avr/io.h> //This is the header for AVR Microcontroller
#define F_CPU 12000000
#include<util/delay.h>
#include”uart.h”  //header file to program uart

int main(void)
 {DDRC=0x00;PORTC=0x0f;DDRB=0x0f;
  uart_init();  //initialisation of uart
  while(1)
  {if((PINC&0x0f)==0x0f)
   {PORTB=0x0f;}
   else{
   PORTB=0x03;
   _delay_ms(6000);
   uart_string(“ATr”); //function to pass a string
   _delay_ms(2000);
   uart_string(“ATE0r”); //function to pass a string
   _delay_ms(2000);
   uart_string(“AT+CMGF=1r”); //function to pass a string
   _delay_ms(2000);
   uart_string(“AT+CMGS=”+91**********”r”); //function to pass a string
   _delay_ms(2000);
     uart_string(“op is ok”);
 _delay_ms(5000);
  uart_char(0x1a);
  _delay_ms(6000);
  }
 }}

 

rly soon..plz

RSS Recent Posts

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 Arrowfly 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 Arrowfly
Privacy Policy | Advertising

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
  • Advertise