This commit is contained in:
Dan
2022-09-20 01:09:07 -04:00
parent 361a828c46
commit 2e0754c38e

View File

@@ -2,3 +2,16 @@
#include <avr/interrupt.h>
#include <util/delay.h>
void InitUSI(void) {
DDRB |= (0 << PB0); //set DI as input
USICR = 0 ; //disable USI
GIFR = 1 <<PCIF; //Clear pin change interupt flag
GIMSK |= 1<<PCIE; //Enable pin change interrupts
PCMSK |= 1<<PCINT0; //Enable pin change on pin 0
}
int main(void) {
}