When I configure certain digital pins to be inputs, I can not longer update the DACs. Rather strangely, I can configure pin 8, 9, 10, and 12 as inputs without problem, but setting pins 11 and 13 to be inputs stops communication with the DACS. There is no issue if they are configured as outputs. For example, the following works as expected with DAC1 ramping
#include <analogShield.h> //Include to use analog shield.
#include <SPI.h> //required for ChipKIT but does not affect Arduino
void setup()
{
pinMode(12, INPUT);
}
unsigned int ramp = 2000;
void loop() {
// put your main code here, to run repeatedly:
analog.write(1, ramp);
ramp++;
}
If pinMode(12, INPUT) is changed to either pinMode(11, INPUT) or pinMode(13, INPUT), DAC1 does not ramp. The same behaviour is seen on all DACS. Any ideas why? Thanks in advance.
Question
wowden
Hi,
When I configure certain digital pins to be inputs, I can not longer update the DACs. Rather strangely, I can configure pin 8, 9, 10, and 12 as inputs without problem, but setting pins 11 and 13 to be inputs stops communication with the DACS. There is no issue if they are configured as outputs. For example, the following works as expected with DAC1 ramping
If pinMode(12, INPUT) is changed to either pinMode(11, INPUT) or pinMode(13, INPUT), DAC1 does not ramp. The same behaviour is seen on all DACS. Any ideas why? Thanks in advance.
I am using this library: https://github.com/wespo/analogShield
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.