Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Simulator/Studio pin change interrupts - ATmega48/88/168

Simulator/Studio pin change interrupts - ATmega48/88/168

2007-04-18 by Don AE5K

Hi gang...

Thought I'd pass along this info just in case someone else struggles
with the same problem.  The first part (below) is my query to Atmel AVR
Technical Support (over a week ago), and the following is the response:
Show quoted textHide quoted text
> Either I do not understand the mega48 data sheet sections on pin change
> interrupts or something is incorrect in the simulator.  I am monitoring input
> pins PC1 thru PC5 for pin level changes.  Following are register values:
> PORTC=0x7E, DDRC=0x00, PINC=0x3E, PCMSK1=0x3E, PCICR=0x02.  I have an
> interrupt service routine to handle the pcint1 vector.
>
> The problem is: (1) writing 0x02 to PCIFR does not clear it (as indicated in
> data sheet), and (2) executing the interrupt service routine for this
> interrupt does not clear PCIFR.  I am NOT varying PINC inputs.  If I manually
> (in simulator register I/O view) clear bit 1 of PCIFR by clicking on it (so
> PCIFR=0x00), it goes right back to a "1" again at the next step in
> simulation, causing vectoring to the ISR again and again.
>
> Am I misinterpreting the data sheet, doing something wrong in the simulator,
> or what?  Studio 4.12 SP4 build 498 had exactly same problem, so today I
> downloaded and installed the latest build 528. 


> Date: Wed, 18 Apr 2007 17:01:50 +0200
> From: avr.cn@atmel.com
> 
> This seems to be a bug in AVR Studio. We thank you for your input, it is highly appreciated. The bug has been reported to our AVR Studio designers, and will hopefully be fixed in the new release.
> 
> Best Regards
> Stian Oroe Moen
> Atmel AVR Technical Support
> 
> --------------------------------
> AVR support and FAQ:       http://support.atmel.no/
> Atmel AVR page:         http://www.atmel.com/products/avr/
> Info and software:      http://www.avrfreaks.net
> Discussion forum:       http://www.avrfreaks.net/phorum/
> Distributors:               http://www.atmel.com/dyn/general/contact.asp

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.