Hey guys,
It seems that the Arduino Due is really sensitive. It seems to always get itself unrecognized by my computer. This is the first time that restarting my computer hasn't fixed this. Could anyone give me some advice?
When I try to plug it in, Windows says "USB device not recognized", so I try to reinstall the drivers but I see that they are already up to date and recognized by my operating system (windows 7 64-bit). When I go into the properties, I see that the device status is "Windows has stopped this device because it has reported problems. (Code 43)". In the arduino IDE, it sees the Arduino Due (Programming Port) on COM7, but when I go to select a port, the option is unselectable. I tried hitting the erase button on the Due, but that didn't help. I also unplugged it and plugged it back in, that didn't help.
The last thing I tried to do was implement some port manipulation using the analog inputs A0-A11. Specifically, I wanted to enable writing to bit20 of port B, and then write a 0 then 1 in it in the loop (with a 250 ms delay). Here's the code:
void setup() {
//Set all PORTB bits to inputs by disabling write register
PIOB->PIO_OWDR = 0xFFFFFFFF;
//Set bit 20 of PORTB (Analog input A11 on Due) as output
PIOB->PIO_OWER = 0x100000;
}
void loop() {
//Set A11 (ADC clock) to 0V then 3.3V to trigger ADC
PIOB->PIO_ODSR = 0x0; // could also use "= 0<<20;"
PIOB->PIO_ODSR = 0x100000; // could also use "= 1<<20;"
delay(250);
}
Did I mess my Due up with this code?