Go Down

Topic: How to send the Debug prints over USB in Leonardo Using USART. (Read 362 times) previous topic - next topic

pradeepsalloju

hi guys...
i am trying to send the serial prints to serial console (Serial Terminal in My computer) using the serial.print(); function in Arduino Leonardo board.

I observed that , Leonardo initializing the USART registers internally when Serial.begin() ; function was called (as defined in HardwareSerial.cpp and HardwareSerial.h) , and when Serial.print("Hello world"); called Data is sending over to the UDR register in USART. but hardware connection was to D+ and D- USB pins on board and which were connected to the CPU USB port. finally i am not understanding how that USART data is printing on Serial Console over USB communication can anyone can help in understanding this data transmission.

Robin2


i am trying to send the serial prints to serial console


finally i am not understanding how that USART data is printing on Serial Console over USB communication can anyone can help in understanding this data transmission.


I'm not sure whether Serial.print() works properly for you and you are just interested in how that is done, OR whether Serial.print() does not work.

If Serial.print() does not work please post your code.

I have never had problems with Serial.print() on my Leoonardo, but I have not studied the underlying code.

...R

Grumpy_Mike

Serial.print on the Leonardo does not use the hardware UART, that is used by Serial1.print and goes only to the hardware pins 0 & 1.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy