Author Topic: HELP! - Serial Monitor positively doesn't work on DigiX  (Read 12244 times)

DROBNJAK

  • Newbie
  • *
  • Posts: 14
HELP! - Serial Monitor positively doesn't work on DigiX
« on: June 27, 2014, 11:50:33 am »
I am on Win 7 64-bit, Arduino IDE 1.5.6-r2, all DigiX add-ons installed and working correctly. I downloades Blink successfuly and Blink works. It is recognized on PC each time, on COM30 etc. I select DigiX Standard in IDE.

SD card is 1GB, type SD2, formate FAT-16 and it works flawlessly in Adafruit SD Card Brakout. Card was formated using SDFormater, which is official standard. I tried it both on Leonardo and Mega and it worked on both. As well it reads OK from PC.

When I insert that same card into a slot and load standard example sketches for SD card: CardInfo, Datalogger, they don't work. I even inserted a delay(8000); in setup() before Serial.begin(9600), because it sometimes does help. I left CS at pin 4, because DigiX Wiki said so.

Still nada, nilch, zero. Any ideas?
« Last Edit: June 29, 2014, 08:25:08 am by DROBNJAK »

DROBNJAK

  • Newbie
  • *
  • Posts: 14
Re: SD Card positively doesn't work on DigiX
« Reply #1 on: June 28, 2014, 03:57:52 am »
OK, I tried it on a second PC. Just installed DigiX's IDE, without upgrade to 1.5.6-r2, just kept DigiX's 1.5.5-r2. Serial Monitor worked fine.

- Now back to the first PC. Both are having USB 2.0s. Reinstalled it all back to DigiX's 1.5.5-r2. S.M. doesn't work.

- I tried the same code on Leonardo, and it works. So it's not a code, its board/driver combo.

- I tried installing 1.5.6-r2, without DigiX and running only as Due on Native USB Port. Again, S.M. shows nothing.

- I pulled all the odhter USB devices, to avoid conflicts. Again, S,M. shows nothing.

Any clues to this mistery? Serial Monitor is quite important. HELP!
« Last Edit: June 28, 2014, 11:10:32 pm by DROBNJAK »

Amus3d

  • Newbie
  • *
  • Posts: 31
Re: HELP! - Serial Monitor and SD Card positively don't work on DigiX
« Reply #2 on: June 29, 2014, 04:01:55 am »
i had similer problem, i used a usb extension cable and the digiX didn't like it for some reason, once i connected it with one usb cable it worked fine.  and try using board "DigiStump DigiX Standard" not native.
« Last Edit: June 29, 2014, 04:04:34 am by Amus3d »

DROBNJAK

  • Newbie
  • *
  • Posts: 14
Re: HELP! - Serial Monitor and SD Card positively don't work on DigiX
« Reply #3 on: June 29, 2014, 04:14:07 am »
Thanks, you might be onto something, because on another PC it all works fine.

But USB cable that goes into DigiX and Leonardo is not pure mini-USB B. Do you know the name of that version of mini-USB that DigiX is using?

Problem is that mini-USB cable that DigiX is using is not just mini-B version. Normal mini-Bs won't go into DigiX, or Leonardo, for that matter.
« Last Edit: June 29, 2014, 04:21:02 am by DROBNJAK »

Amus3d

  • Newbie
  • *
  • Posts: 31
Re: HELP! - Serial Monitor and SD Card positively don't work on DigiX
« Reply #4 on: June 29, 2014, 05:31:58 am »
the cable that fitted into the digix was ok, but it didn't work if i used a usb extension cable, but they did work in the arduino mega and leonardo but not the digiX.

if you use Board "Arduino Due (Native USB Port)" you dont get access to all of digiX extras
you need "DigiStump DigiX Standard" which should be at the bottom of the board selection list.

DROBNJAK

  • Newbie
  • *
  • Posts: 14
Re: HELP! - Serial Monitor and SD Card positively don't work on DigiX
« Reply #5 on: June 29, 2014, 07:53:02 am »
"Arduino Due (Native USB Port)" was just something I was trying in order to test all the variables.

DigiX still doesn't print to Serial Monitor, no matter what I try. One thing that emerged in the last attempt was, that SD Card sketch from Examples, actually works. So, it all wroks, except S.M.

Is there anything I can do to tweak drivers directly?
« Last Edit: June 29, 2014, 08:26:49 am by DROBNJAK »

Amus3d

  • Newbie
  • *
  • Posts: 31
Re: HELP! - Serial Monitor positively doesn't work on DigiX
« Reply #6 on: June 29, 2014, 10:36:37 am »
you have this line after Serial.begin(9600);

 //DigiX trick - since we are on serial over USB wait for character to be entered in serial terminal
  while(!Serial.available()){
    Serial.println("Enter any key to begin");
    delay(1000);
  }

?? if you have i can't think of anything. ive had no problems with Serial as long as this line is present.
« Last Edit: June 29, 2014, 10:42:19 am by Amus3d »

DROBNJAK

  • Newbie
  • *
  • Posts: 14
Re: HELP! - Serial Monitor positively doesn't work on DigiX
« Reply #7 on: June 29, 2014, 11:06:12 am »
Thx, I'll try it.

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: HELP! - Serial Monitor positively doesn't work on DigiX
« Reply #8 on: June 29, 2014, 11:59:17 am »
You know, that "Serial" is ambiguous?
As long, as you have selected an original DUE as board, "Serial" is an alias for "Serial0", when you select the DigiX it is an alias for "SerialUSB".
That is the cause, that I avoid using Serial at all in my programs, to make sure, that they run with both board settings the same.

Using "SerialUSB" for your tests, would make sure, that the Serial output goes with all Board settings to the right place.
« Last Edit: June 30, 2014, 12:13:21 am by gogol »

DROBNJAK

  • Newbie
  • *
  • Posts: 14
Re: HELP! - Serial Monitor positively doesn't work on DigiX
« Reply #9 on: June 29, 2014, 12:12:50 pm »
Quote
You know, that "Serial" is ambiguous?

Didn't know much about that. I've seen that a guy who designed Teensy3.0 said that programming serial comms for ARMs processor was extremely difficult, because MCU was playing hide and seek. But it went over my head as more than what I can understand.

Quote
As long, as you have selected an original DUE as board, "Serial" is an alias for "Serial1", when you select the DigiX it is an alias for "SerialUSB".
That is the cause, that I avoid using Serial at all in my programs, to make sure, that they run with both board settings the same.

Using "SerialUSB" for your tests, would make sure, that the Serial output goes with all Board settings to the right place.

What is SerialUSB? What library do I need to load? So, I should use SerialUSB and choose DigiX?

DROBNJAK

  • Newbie
  • *
  • Posts: 14
Re: HELP! - Serial Monitor positively doesn't work on DigiX
« Reply #10 on: June 29, 2014, 01:09:52 pm »
OK, I replaced Serial with SerialUSB, on DigiX (not Due) and it didn't work?

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: HELP! - Serial Monitor positively doesn't work on DigiX
« Reply #11 on: June 30, 2014, 12:39:15 am »
The given example runs on my DigiX as well on an original DUE, when the cable is connected to the native board.

Code: [Select]

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#msg6145
Read the whole thread, as there might be other implications discussed there.

DROBNJAK

  • Newbie
  • *
  • Posts: 14
Re: HELP! - Serial Monitor positively doesn't work on DigiX
« Reply #12 on: June 30, 2014, 01:39:42 am »
@gogol: Huge thanks. I'll try the given code in the evening.

Just one q: with the code you gave me, do I connect as DigiX or as Due?

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: HELP! - Serial Monitor positively doesn't work on DigiX
« Reply #13 on: June 30, 2014, 04:36:13 am »
For the answer just to quote myself:
The given example runs on my DigiX as well on an original DUE, when the cable is connected to the native board.

DROBNJAK

  • Newbie
  • *
  • Posts: 14
Re: HELP! - Serial Monitor positively doesn't work on DigiX
« Reply #14 on: July 03, 2014, 09:55:43 am »
I'd tried two installations, both according to Digistump's recomendations: DigiX (1.5.5-r2) and Arduino's 1.5.6-r2. Weather I choose DigiX or Due, from Tools/Board menu, doesn't make difference.

Can you upload a standard blink-program to your DigiX?
>> Yes, I did Blink, changed blinking speed etc., both with DigiX and 1.5.6-r2. No problem.

Can you upload my example from above?
>> Yes, in both DigiX and 1.5.6-r2, loads and it doesn't report any errors.

How are those programs reacting?
>> I would say that programs work inside DigiX board, but they positvely refuse to show output in Serial Monitor. In your program, I can type in letters, but they are not sent back. If I install DigiX's IDE than Example's sketch File/Examples/SD/Datalogger writes analog output to the SD card and Blink blinks. If I install Arduino's 1.5.6-r2 (w. DigiX addons copied in), than DigiX's extras show in all menus and Blink works fine. Can't confirm about SD card writing.

>> Both installations, DigiX's and 1.5.6-r2 (w. DigiX), positively refuse to show anything on Serial Monitor.

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.
>> I think they work normaly, no problems there. Sometimes I see Bossa Program Port (COM36) driver, but that self-corrects and I see DigiX or Due, depending on the setup.

Which COM-Port appears in your device manager, when you press ERASE followed by RESET ?
>> Usually Bossa Program Port (COM36). Than I follow that with sketch upload from IDE and than it changes to Digistump Digix (COM37).

Which COM-Port appears, after you have succesfully uploaded a program?
>> Same as the above, Digistump Digix (COM37).

Read the whole thread, as there might be other implications discussed there.
>> Yeah, I can't find anything that relates to me.
« Last Edit: July 03, 2014, 09:59:29 am by DROBNJAK »