cli();CLKPR = (1 << CLKPCE);//INITIALIZE CLOCK CHANGECLKPR = 0x00;//NO PRESCALER
// Luminet board// * *// D0 D1// VCC PA7 PB2 GND// | | | |// | | | |// VCC--- ---VCC//D7 PA3--- ---PB1 D2//D6 PA2--- ---PB0 D3// GND--- ---GND// | | | |// | | | |// VCC PA1 PA0 GND// D5 D4//// red led: PA4 (d8) -- pin available if jumper is not connected// green led: * PA5 (d9) -- pin available if jumper is not connected// blue led: * PA6 (d10) -- pin available if jumper is not connected// reset: PB3 (d11)
The following table might make the mapping more clear:Arduino Pin # tiny84 pin name 0 PA7 1 PB2 2 PB1 3 PB0 4 PA0 5 PA1 6 PA2 7 PA3 8 PA4 -- red led 9 PA5 -- green led 10 PA6 -- blue led (11) (PB3) -- reset
Analog Pin 0 is PA0 (this is Arduino Pin # 4 corresponding to the table above). So analogRead(0) reads the analog value from PA0.
pin change interrupts are not supported at the moment (only for attiny2313), but I can add this within minutes if you really need it. You can find the code for the interrupt handling in the file WInterrupts.c in your hardware/cores/luminet folder.Using pins other than INT0 or INT1 for pin change interrupts is not supported by any Arduino hardware at the moment, I guess. But I can add this if you are sure whar you are doing. INT0 and INT1 are far better than the interrupts on the other pins.
I'd like to use int0 and int1 but i only see int0 on the pinouts - am I missing something? I just need to be able to respond to pulses from two different sources
Yeah, I had the same problem. I need to count pulses from encoders so I need at least 2 interrupts.