2017年11月15日

pinConfigurations/ID-292

#define LATCH01 27
#define LATCH01_ON (CORE_PIN27_PORTSET = (1<<15))
#define LATCH01_OFF (CORE_PIN27_PORTCLEAR = (1<<15))

#define LATCH02 20
#define LATCH02_ON (CORE_PIN20_PORTSET = (1<<5))
#define LATCH02_OFF (CORE_PIN20_PORTCLEAR = (1<<5))

#define LATCH03 21
#define LATCH03_ON (CORE_PIN21_PORTSET = (1<<6))
#define LATCH03_OFF (CORE_PIN21_PORTCLEAR = (1<<6))

#define LATCH04 18
#define LATCH04_ON (CORE_PIN18_PORTSET = (1<<3))
#define LATCH04_OFF (CORE_PIN18_PORTCLEAR = (1<<3))

#define LATCH05 16
#define LATCH05_ON (CORE_PIN16_PORTSET = (1<<0))
#define LATCH05_OFF (CORE_PIN16_PORTCLEAR = (1<<0))

#define LATCH06 15
#define LATCH06_ON (CORE_PIN15_PORTSET = (1<<0))
#define LATCH06_OFF (CORE_PIN15_PORTCLEAR = (1<<0))

#define LATCH07 17
#define LATCH07_ON (CORE_PIN17_PORTSET = (1<<1))
#define LATCH07_OFF (CORE_PIN17_PORTCLEAR = (1<<1))

#define CLOCK01 25
#define CLOCK01_ON (CORE_PIN25_PORTSET = (1<<5))
#define CLOCK01_OFF (CORE_PIN25_PORTCLEAR = (1<<5))

#define DATA01 26
#define DATA01_ON (CORE_PIN26_PORTSET = (1<<14))
#define DATA01_OFF (CORE_PIN26_PORTCLEAR = (1<<14))

#define LEDred 7 // LED on D7
#define LEDred_ON (CORE_PIN7_PORTSET = (1<<2))
#define LEDred_OFF (CORE_PIN7_PORTCLEAR = (1<<2))

#define LEDgrn 8 // LED on D8
#define LEDgrn_ON (CORE_PIN8_PORTSET = (1<<3))
#define LEDgrn_OFF (CORE_PIN8_PORTCLEAR = (1<<3))

#define LED 9 // LED on D9
#define LED_ON (CORE_PIN9_PORTSET = (1<<3))
#define LED_OFF (CORE_PIN9_PORTCLEAR = (1<<3))

#define LED2red 38 // LED on D38
#define LED2red_OFF (CORE_PIN38_PORTSET = (1<<11)) //inverted
#define LED2red_ON (CORE_PIN38_PORTCLEAR = (1<<11))

#define LED2grn 37 // LED on D38
#define LED2grn_OFF (CORE_PIN37_PORTSET = (1<<10))
#define LED2grn_ON (CORE_PIN37_PORTCLEAR = (1<<10))

#define LED2 39 // LED on D39
#define LED2_OFF (CORE_PIN39_PORTSET = (1<<17))
#define LED2_ON (CORE_PIN39_PORTCLEAR = (1<<17))

#define buttonPin01 11 // Button Pin on D11
#define button_State1 (CORE_PIN11_PINREG & (1<<6))

#define buttonPin02 36 // Button Pin on D36
#define button_State2 (CORE_PIN36_PINREG & (1<<9))

#define buttonPin03 3 // Button Pin on D3
#define button_State3 (CORE_PIN3_PINREG & (1<<12))

#define buttonPin04 4 // Button Pin on D4
#define button_State4 (CORE_PIN4_PINREG & (1<<13))

#define buttonPin05 5 // Button Pin on D5
#define button_State5 (CORE_PIN5_PINREG & (1<<7))

#define buttonPin06 6 // Button Pin on D6
#define button_State6 (CORE_PIN6_PINREG & (1<<4))

#define LEDvol 28 // LED on D28
#define LEDvol_ON (CORE_PIN28_PORTSET = (1<<16))
#define LEDvol_OFF (CORE_PIN28_PORTCLEAR = (1<<16))

#define LEDvol2 13
#define LEDvol2_ON (CORE_PIN13_PORTSET = (1<<5))
#define LEDvol2_OFF (CORE_PIN13_PORTCLEAR = (1<<5))

#define SAMPCLK_STATE (CORE_PIN19_PINREG & (1<<2)) //sampling clock in
#define SAMPCLK_MASK (CORE_PIN19_CONFIG = PORT_PCR_IRQC(0)) //masking sampling clock in
#define SAMPCLK_ACTV (CORE_PIN19_CONFIG = PORT_PCR_IRQC(9)) //activate sampling clock in

#define CS01 29
#define CS01_ON (CORE_PIN29_PORTSET = (1<<18))
#define CS01_OFF (CORE_PIN29_PORTCLEAR = (1<<18))

#define LDAC01 33
#define LDAC01_ON (CORE_PIN33_PORTSET = (1<<24))
#define LDAC01_OFF (CORE_PIN33_PORTCLEAR = (1<<24))

#define SCK01 30
#define SCK01_ON (CORE_PIN30_PORTSET = (1<<19))
#define SCK01_OFF (CORE_PIN30_PORTCLEAR = (1<<19))

#define DAC16 40
#define DAC16_ON (CORE_PIN40_PORTSET = (1<<28))
#define DAC16_OFF (CORE_PIN40_PORTCLEAR = (1<<28))

#define DAC16_2 31
#define DAC16_2_ON (CORE_PIN31_PORTSET = (1<<10))
#define DAC16_2_OFF (CORE_PIN31_PORTCLEAR = (1<<10))

#define SD01 32
#define SD01_ON (CORE_PIN32_PORTSET = (1<<11))
#define SD01_OFF (CORE_PIN32_PORTCLEAR = (1<<11))


#define PC_STATE1 (CORE_PIN22_PINREG & (1<<1)) // pitch osc in
#define PC_STATE2 (CORE_PIN23_PINREG & (1<<2)) // volume osc in
posted by Yasuski at 01:05| open.Theremin