use UPDI line for serial comunication with my computer #501
-
i'm new the UPDI programming and i have a doubt. Can i use the Serial library and the UPDI pin (PA0) for comunication or i need some extra connection and connect RXD,TXD to TXO,RXI of my sparkfun "Serial Basic Breakout"? P.S. i don't want to use OPTIBOOT for memory need. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I would recommend to use the TXD/RXD with another Serial to USB adapter. That way you don't need to replug anything and can keep another terminal window open connected to your RXD/TXD pins for debugging, while you upload new versions of your sketch via the UPDI wire. At least that's how I use it. I also use low memory parts and therefore have written a very minimal sketch that can just print some debugging info over serial. It consumes about 400 bytes, so I incorporate that in my sketch during development and once done delete it from the final version. Sketch example is in this thread |
Beta Was this translation helpful? Give feedback.
-
UPDI programing and serial debug use a differerent pin of the microcontroller (and TX and RX need to not be connected in the way that they are) so no, you cannot use the UPDI line for that. I have attempted, without much success to date to make a serial adapter that would swtich modes based on the states of the modem control pin (IDE serial monitor asserts them, serialupdi does not) but have not managed to assemble any successfuly enough to determine whether there are critical design flaws, or I'm just doing a psis poor job of assembly - no real excuse for why I'm having so much trouble, but I've put multiple ICs on different ones baclwards. lifted traces wjhen tryingm to rework, had one work for a short time then smoke,.It was rather depressing considering that it was a simple board with simple parts on it. and I'm at 0/4 succcessful buiild. Recommed use a second serial adapter for debug serial. I have been persuing trrying to get an affordable usable chip for a dual serial adapter, but so far no luck. Though a friend says he knows a guy in shenzhen who might be able to score some of the parts I need. The problem is that it's too expensive and bulky yo get a 2 port USB hub chip and use that. with a pair of ch340's |
Beta Was this translation helpful? Give feedback.
-
I have thus far failed to assemble a board that I have been confdent is free of assembly/soldering defects such rthat I can analyze it's failure mode. I do not really have time to work on this when I need to release 2.4.0 after fixing a major bug I just found, without which I can' |
Beta Was this translation helpful? Give feedback.
UPDI programing and serial debug use a differerent pin of the microcontroller (and TX and RX need to not be connected in the way that they are) so no, you cannot use the UPDI line for that. I have attempted, without much success to date to make a serial adapter that would swtich modes based on the states of the modem control pin (IDE serial monitor asserts them, serialupdi does not) but have not managed to assemble any successfuly enough to determine whether there are critical design flaws, or I'm just doing a psis poor job of assembly - no real excuse for why I'm having so much trouble, but I've put multiple ICs on different ones baclwards. lifted traces wjhen tryingm to rework, had one …