INT0 stimulus file for Studio 7

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

What register(s) to I need to change in my stimulus file to simulate INT0 (rising pin voltage) on an ATtiny1634?

 

    ???? =|  0x??

 

I'm using Studio 7 programming in assembly.

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

Well INT0 is pin PC2, so you'd simply use PINC |= 0x04

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

Do these stim files look OK?  

 

The file names are changed to INT0.stim and PortA.stim when I try to use them.

Attachment(s): 

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

The syntax looks fine, but in INT0.txt PINC &= 0xF7 isn't going to clear INT0, it'll only clear PC3.  PINC &= 0xFB is what you want, alternatively PINC &= ~0x04 might be a little clearer, but I don't know off hand if that operator is supported.  I'd think it would be, but I end up thinking a lot of things that aren't so.