S
Stephen Inkpen
Here is my code:
SIGNAL(SIG_SPI)
{
spiTransferComplete = TRUE;
puts("int\r\n");
}
// set SS (PB4) as output
sbi(PORTB, 7);
sbi(DDRB, 7);
cbi(DDRB, 6);
sbi(DDRB, 5);
sbi(DDRB, 4); // SS must be output for Master mode to work
outp((1<<MSTR) | (1<<SPE) | (1<<SPR0), SPCR);
// clear status register
inp(SPSR);
spiTransferComplete = TRUE;
// enable SPI interrupt
sbi(SPCR, SPIE);
sei();
Is there any reason why my interrupt isn't getting fired when I call:
outp(data, SPDR);
Thanks,
Stephen Inkpen
Email Code: EA701JXZ2
SIGNAL(SIG_SPI)
{
spiTransferComplete = TRUE;
puts("int\r\n");
}
// set SS (PB4) as output
sbi(PORTB, 7);
sbi(DDRB, 7);
cbi(DDRB, 6);
sbi(DDRB, 5);
sbi(DDRB, 4); // SS must be output for Master mode to work
outp((1<<MSTR) | (1<<SPE) | (1<<SPR0), SPCR);
// clear status register
inp(SPSR);
spiTransferComplete = TRUE;
// enable SPI interrupt
sbi(SPCR, SPIE);
sei();
Is there any reason why my interrupt isn't getting fired when I call:
outp(data, SPDR);
Thanks,
Stephen Inkpen
Email Code: EA701JXZ2