Moderators: adafruit_support_bill, adafruit
if I try to move the Waveshield pin D3 to a free pin (in WavePinDefs.h)
// pin analog 16 is DAC serial clock
/** Data direction register for DAC clock. */
#define MCP_DAC_SCK_DDR PIN16_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SCK_PORT PIN16_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SCK_BIT PIN16_BITNUMVincent14 wrote:@adafruit_support : No, my jumpers (four wires ?) are soldered to my Waveshield I can't move them easilyLionel (constructor of the Rotoshield) said it's possible to move this pins only by editing the library, is it true ?
@xl97 : 1) & 2) It's O.K, my other shield only use D3, D5 and D11 in common, but i don't use part of it where using D11. I have to use D3 or D5 on my other shield, that's why I try to move them in the WaveShield library.
3) What is "DAC" ? I've tried to move pin 3 (the comment and 3 lines following) on an other free pin but after upload, my shield could not make a sound.
If I want to set an analog pin, do I have something like that ?
- Code: Select all
// pin analog 16 is DAC serial clock
/** Data direction register for DAC clock. */
#define MCP_DAC_SCK_DDR PIN16_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SCK_PORT PIN16_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SCK_BIT PIN16_BITNUM
The pins of the other library are not removables at all (it's the wiring of the motors).
Thank both of you for your supportSay me if I'm not clear, It's not easy to explain in another language for me.
// use arduino pins A3(D17), D4, D7, D8 for DAC
// pin A3/D17 is DAC chip select
/** Data direction register for DAC chip select. */
#define MCP_DAC_CS_DDR PIN17_DDRREG
/** Port register for DAC chip select. */
#define MCP_DAC_CS_PORT PIN17_PORTREG
/** Port bit number for DAC chip select. */
#define MCP_DAC_CS_BIT PIN17_BITNUM
// pin D4 is DAC serial clock
/** Data direction register for DAC clock. */
#define MCP_DAC_SCK_DDR PIN4_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SCK_PORT PIN4_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SCK_BIT PIN4_BITNUM
// pin D7 is DAC serial data in
/** Data direction register for DAC serial in. */
#define MCP_DAC_SDI_DDR PIN7_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SDI_PORT PIN7_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SDI_BIT PIN7_BITNUM
// pin D8 is LDAC if used
#if USE_MCP_DAC_LDAC
/** Data direction register for Latch DAC Input. */
#define MCP_DAC_LDAC_DDR PIN8_DDRREG
/** Port register for Latch DAC Input. */
#define MCP_DAC_LDAC_PORT PIN8_PORTREG
/** Port bit number for Latch DAC Input. */
#define MCP_DAC_LDAC_BIT PIN8_BITNUM
#endif // USE_MCP_DAC_LDAC// use arduino pins 2, 3, 4, 5 for DAC
// pin 2 is DAC chip select
/** Data direction register for DAC chip select. */
#define MCP_DAC_CS_DDR PIN2_DDRREG
/** Port register for DAC chip select. */
#define MCP_DAC_CS_PORT PIN2_PORTREG
/** Port bit number for DAC chip select. */
#define MCP_DAC_CS_BIT PIN2_BITNUM
// pin 3 is DAC serial clock
/** Data direction register for DAC clock. */
#define MCP_DAC_SCK_DDR PIN3_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SCK_PORT PIN3_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SCK_BIT PIN3_BITNUM
// pin 4 is DAC serial data in
/** Data direction register for DAC serial in. */
#define MCP_DAC_SDI_DDR PIN4_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SDI_PORT PIN4_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SDI_BIT PIN4_BITNUM
// pin 5 is LDAC if used
#if USE_MCP_DAC_LDAC
/** Data direction register for Latch DAC Input. */
#define MCP_DAC_LDAC_DDR PIN5_DDRREG
/** Port register for Latch DAC Input. */
#define MCP_DAC_LDAC_PORT PIN5_PORTREG
/** Port bit number for Latch DAC Input. */
#define MCP_DAC_LDAC_BIT PIN5_BITNUM
#endif // USE_MCP_DAC_LDAC

// use arduino pins 2, 3, 4, 5 for DAC
// pin 2 is DAC chip select
/** Data direction register for DAC chip select. */
#define MCP_DAC_CS_DDR PIN2_DDRREG
/** Port register for DAC chip select. */
#define MCP_DAC_CS_PORT PIN2_PORTREG
/** Port bit number for DAC chip select. */
#define MCP_DAC_CS_BIT PIN2_BITNUM
// pin 3 is DAC serial clock
/** Data direction register for DAC clock. */
#define MCP_DAC_SCK_DDR PIN3_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SCK_PORT PIN3_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SCK_BIT PIN3_BITNUM
// pin 4 is DAC serial data in
/** Data direction register for DAC serial in. */
#define MCP_DAC_SDI_DDR PIN4_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SDI_PORT PIN4_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SDI_BIT PIN4_BITNUM
// pin 5 is LDAC if used
#if USE_MCP_DAC_LDAC
/** Data direction register for Latch DAC Input. */
#define MCP_DAC_LDAC_DDR PIN5_DDRREG
/** Port register for Latch DAC Input. */
#define MCP_DAC_LDAC_PORT PIN5_PORTREG
/** Port bit number for Latch DAC Input. */
#define MCP_DAC_LDAC_BIT PIN5_BITNUM
#endif // USE_MCP_DAC_LDAC
// pin 3 is DAC serial clock
/** Data direction register for DAC clock. */
#define MCP_DAC_SCK_DDR PIN3_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SCK_PORT PIN3_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SCK_BIT PIN3_BITNUM// pin 7 is DAC serial clock
/** Data direction register for DAC clock. */
#define MCP_DAC_SCK_DDR PIN7_DDRREG
/** Port register for DAC clock. */
#define MCP_DAC_SCK_PORT PIN7_PORTREG
/** Port bit number for DAC clock. */
#define MCP_DAC_SCK_BIT PIN7_BITNUM


Return to Arduino Shields from Adafruit
Users browsing this forum: Exabot [Bot] and 5 guests