Hi All,
I am not sure if this question has been clearly answered for DUE, sorry if double posting ( I only found info pe MEGA or UNO ).
I am controlling some optocouplers ( 4N35 ) that are powered by a 2N3904 in order to not exceed the SAM3X chip current, something like this:
digitalPin -> resistor -> transistor 2n3904 -> optocoupler GND
+3.3 V -> resistor -> optocoupler +
Here is the setup code that take care of that part:
for (int count=0;count<24;count++) {
pinMode(cameras[count], OUTPUT);
digitalWrite(cameras[count], LOW);
}
There are 24 pins in that array.
There are a couple of question and behaviours that I am not sure are 100% normal.
- On power on, immediately after plugging the AC adaptor or USB the output go HIGH for a fraction of a seconds
- On serial connect all pins go HIGH for a fraction of a second ( I understand this is normal ? How can this be avoided ? )
Another thing, after powering on the board ( usb or ac, doesn't matter ) the pins go high for a short time, then go low about 2 seconds then go high and low very fast again. Something like this:
Power ON: HIGH <> LOW, wait 2 seconds then HIGH <> LOW
After this sequence the board starts to respond to serial and behave normally.
The boot sequence takes about 3.. 4 seconds ( with two HIGH <> LOW flaps ) is this normal ?
Also on some situations after only touching the metal of the USB plug to the metal of the USB connector on the board triggers a LOW <> HIGH flap.
Thanks !!!