Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help with circuit #77

Open
paulskirk53 opened this issue Feb 15, 2021 · 2 comments
Open

help with circuit #77

paulskirk53 opened this issue Feb 15, 2021 · 2 comments

Comments

@paulskirk53
Copy link

Hi, I was wondering if you might be able to point me at some help to understand the pyupdi electronic circuit - connecting Rx and Tx with a resistor. What does that do and how does it help with UPDI? The reason for my question is that I'm using an FTDI board for the updi upload. but also want to use the same board for serial comms on a 4809 UART. I posted on the avrfreaks forum and got a circuit diagram in response which I'm working to understand the logic of, but to do that I have to get my head around what happens when the Tx and Rx on a serial port are connected with a 4k7 resistor. Many thanks for your help,
Paul
btw pyupdi works fine to upload code to my 4809 - thanks.

@mraardvark
Copy link
Owner

Hi Paul - its no magic, its just contention-mitigation. UPDI is bidirectional on a single pin while the CDC uses two pins. Communications start with the CDC sending over TX (driving high and low) and UPDI will respond. The CDC's idle state is '1', so the TX line can technically still be driving this '1' state out while the UPDI response comes back. Putting the resistor in place will allow the UPDI response through to RX despite TX driving '1'. The resistor value thus depends somewhat on drive-strength of your CDC-USB adapter...

@paulskirk53
Copy link
Author

Thanks very much for this - much appreciated, my electronics knowledge is just about up to understanding what you've said :). So if I've got it right, CDC Tx is used to 'activate' UPDI on the target and UPDI Tx and Rx take place on the one wire. The resistor (cleverly) allows it to be a one wire comms system keeping Tx and Rx separate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants