The given example runs on my DigiX as well on an original DUE, when the cable is connected to the native board.
int led = 13;
#define MySerial SerialUSB
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
MySerial.begin(19200);
while(!MySerial.available()){
MySerial.println("Enter any key to begin");
delay(1000);
}
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
MySerial.println("HIGH ####");
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
MySerial.println("LOW");
delay(1000); // wait for a second
}
The difference between the DigiX and the DUE is, that the DUE has two USB-connectors. The first is the native port, which is directly connected to the SAM3X8E (which is the only port the DigiX has). The second one, which is missing with the DigiX is the so called programming port. That port is connected to an Mega 16U2 chip, which connects to the Serial0-Port of the SAM3X8E. The DUE calls this port the "Programming Port".
The native port has one disadvantage: When there is no Arduino-program flashed to the chip, or the program is erroneous the USB device appears with an own VID/PID (Bossa/SAM-BA) to the host computer, and Windows associates in that case another COM-port name. This is in some cases one problem, users are fighting with, when they use the wrong COM-ports.
The other problem arises, that the selection of the board (DUE vs. Digix) changes the meaning of "Serial". While Serial connects with the DUE to Serial0 it is only visible from a host, when you connect a serial to USB converter between pin0/oin1 and the host computer. Because of that problem, I tend to use macros, in the beginning of my sketches, where I define the right connection.
But now some questions:
Can you upload a standard blink-program to your DigiX?
Can you upload my example from above?
How are those programs reacting?
How are those programs reacting, when you disconnect the boards from your computer, after uploading the code and reconnecting them to another USB port for testing!
make sure, that the DigiX will appear with another COM-port, when it is connected to another USB port.
Which COM-Port appears in your device manager, when you press ERASE followed by RESET ?
Which COM-Port appears, after you have succesfully uploaded a program?
You may have a problem like:
http://digistump.com/board/index.php/topic,1277.msg6145.html#msg6145Read the whole thread, as there might be other implications discussed there.