Split from: c and assembly functions

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

"< i am sethu , beginner to avr controller>"

"< i am struggle to store data in sram and retreicve the data>"

"< please send the simple program to store data >"

"< using c code  with atmegga32>"

L.Sethu

Last Edited: Mon. Aug 24, 2015 - 11:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

please send the simple program to store data

int var1, var2;    // variables in SRAM

 

var1 = 100;  // write to 'var1'

var2 = var1  // read from 'var1'

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

"<i send the data through TXD one controller ATMEGA32>"

"<usart_transmit(0x5A);>"

"<i received the data by next RXD controller (ie) dataA[i]=UDR0; >"

"<if  i check the receive the data ie dataA don't have the data as 0x5A with following condition >"

"<if(data[0]==0x5A) if condition is true i send the anotherdata>"

L.Sethu

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

Isethu, your posts have nothing to do with the OP topic, so you shouldn't have posted them here. Check the tutorials forum for how to use the USART system . In the future, use correct sentence syntax.

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

Last Edited: Mon. Aug 24, 2015 - 08:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

your posts have nothing to do with the OP topic

A moderator has since split this topic from the original, unrealted thread: https://www.avrfreaks.net/forum/c...

 

"< i send the data through TXD one controller ATMEGA32>" 

What's with all the quotes and angle brackets?!

"< ... >" 

 

I send the data through TXD one controller ... I received the data by next RXD controller

You need to take this step-by-step, in a logical manner:

 

  1. Is the first controller actually transmitting anything at all?
     
  2. Is the first controller transmitting the correct data, at the correct speed, with the correct format?
     
  3. Is the data actually reaching the RxD pin of the next controller?
     ie, are your hardware connections correct & working?
     
  4. Is the software in the 2nd controller correctly handling the received data?

 

Some more debugging tips:

 

http://www.8052.com/faqs/120313

 

http://www.ganssle.com/articles/...

 

Check the tutorials forum for how to use the USART system

There are plenty of them - both here & elsewhere on the interwebs!

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Aug 25, 2015 - 07:42 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Catching up on old unread threads.

 

Neil, your Ganssle link above is broken (trailing escaped characters %C2%A0

 

In the interest of posterity, here's the corrected link:

http://www.ganssle.com/articles/developingagoodbedsidemanner.htm

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]