2

I have made a custom board based on the Arduino Due but have some problems with the Serial communication with the 16u2 chip.

i have usb connection with the 16u2 chip and was able to load the arduino-due usb serial hex over the usb port. the usb now shows up as arduino com port. now when i try to load a sketch it says No device found on COM12. the SAM chip is erased but it can't load the new sketch.

now when i load a sketch with a simple serial print at 115200 over the native port. the SAM chip is programmed correctly. when i open the serial monitor i receive data but it is garbage! the garbage is always different. the sketch is at 115200 and the monitor also at 115200.

this would explain why it can't upload a sketch with the 16u2.

the same sketch on a original arduino due works fine.

the transmit an receive led are blinking.

What would cause this garbage in the connection where do i start looking?

14
  • 1
    You mean the serial speed or the actual chip speed? Commented Apr 5, 2016 at 11:04
  • 1
    Alright thank you for the tip! will try to messure the frequency of the TX. Commented Apr 5, 2016 at 11:09
  • 1
    Incorrect crystal or incorrect fuse settings. Testing the TX is a good way of measuring the clock speed. You get a ratio of what you want and what you measure, then apply that ratio to the clock speed you want - the result is the actual clock speed. Commented Apr 5, 2016 at 11:14
  • 1
    was not able to get a frequency test but did a speed test sketch on a original Due and 2 of my own builds. The Due runs at 6745 Millis and my own at 6281 Millis so it seems to be running slower then the original Due. the crystal used is: link. i don't have any knowledge of fuse settings so will have to read into this. if i have a different crystal would this need different fuse settings than a original Due? Commented Apr 8, 2016 at 20:02
  • 1
    I have checked and it seems that they are 12pF and the datasheet for the crystal says it needs a 8pF. Could this be the solution so my problem? Commented Apr 8, 2016 at 20:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.