Need help configuring USART for sim900 and atmega1281

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I've been having trouble configuring the USART for atmega1281 and the sim900. Its written on atmel studio using C.

Im using PORTE as its USART0 bit 0 RX and bit 1 TX and GND. This is connected to PC using Serial converter to USB.

I just want to send some basic at commands to hyperterminal and see the result on LCD such as a text message. 

Can someone provide a sample code for the USART to set up via PORTE? 

Any help is appreciated as I am stuck!

Bought the GSM from 

https://www.banggood.com/SIM900-...

 

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There must be a gazillion examples on the interwebs, the key is to know what speed your mpu is actually running at, and it works best if using an external xtal as the clock sources.

The default config for the USART module is 8-N-1 so all you need to set is the baud rate registers and enable TX/RX in the control register.

Have you looked in the tutorial forum for examples of usart code?

 

Jim