Interupt Ttiny
2009-04-20 by Guido Helmstetter
Hi from newby
In the GIMSK data page it says "activity on the pin will cause interupt even if INT0 is configured as output".
My program is counting to a preset number and then goes to sleep, until woken up by pushing INT0 (pullup 10K).
Two thing happen when DDRB PB2 as input. then the led is not on (cause of the querie, well I like it to be on), switch works fine goes back to the routine and to sleep etc.
When DDRB as output then it works like GIMSK was set PCIE, interupt happens on level change PB2. (PCMSK is not set).
Question is : Can chip be woken up with the INT0 pin, all leds functioning. Do I have to use the RESET pin instead?
Is there a clash in the GIMSK register when all set as output.
This is my initialization:
ldi temp,1<<INT0
out GIMSK,temp
ldi temp, 1<<CS02 | 1<<CS00
out TCCR0B, temp
ldi temp, 1<<ISC00 ;level change on pin
out MCUCR, temp
ldi temp, 0xff
out DDRB, temp
ser temp
out PORTB,temp ;set Port
sei
The new Internet Explorer 8 optimised for Yahoo!7: Faster, Safer, Easier.
[Non-text portions of this message have been removed]