Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can i debug the USART in AVR Studio using AVR Simulator

Status
Not open for further replies.

belax

Member level 2
Joined
Jul 4, 2004
Messages
53
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
586
avr studio debug usart

Sorry foy my english, i am from Russia,Moscow-Zelenograd
I have ATTiny2313 (on 16Mhz).
I set registers to use USART as receiver on 250000 b/s and wait (in loop) when RXC bit will be set in UCSRA register.
Then i go to the window "stimuli and logging" and set there a stimuli on PORTD.
Stimuli file has the following easy content:

000000000:00
000000002:01
000000150:00
000001450:01

According this file after 150+(1start+8data+1stop)*64 cycles my controller should set RXC bit and FE bit (because zero stop bit was ) in UCSRA.

But my AVR Studio duesn't wont to do it.

My question: How can i debug USART (in Recv mode) with AVR Studio in program mode (don't use in-circuit debugger)?
Thanks.
 

IgorKossak

Newbie level 4
Joined
Oct 5, 2004
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Kiev, Ukraine
Activity points
40
avr studio usart

You can try to set RXC bit in UCSRA register manually.
This is not elegant, but you can simulate an interrupt at any critical time in your program flow.

Regards.
Igor.

PS (If you want to speak Russian, write me ) :D
 

belax

Member level 2
Joined
Jul 4, 2004
Messages
53
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
586
avr simulator usart

Thanks.
<:
"This is not elegant, but you can simulate an interrupt at any critical time in your program flow."
:>
Yes. It's one method which i can do to simulate receiving the data.

Somebody (in other forum) told me that "atmel now is turning on XML technology and in future AVR Studio will be have a more powerfull debugger". - but i don't believe that.

P.S in Russian: Что тут говорить - буду старым добрым методом- паяльник, макетка, осциллограф и т.д.

P.S.S - кстати ATTiny2313 - не такой уж и Tiny (20MIPS).



Ok. thanks for answer.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top