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

Why PD6? #47

Open
jirkaptr opened this issue Apr 20, 2021 · 2 comments
Open

Why PD6? #47

jirkaptr opened this issue Apr 20, 2021 · 2 comments

Comments

@jirkaptr
Copy link

jirkaptr commented Apr 20, 2021

When using a programmer made from ARDUINO UNO, NANO and possibly LEONARDO it would be convenient to use the connector originally designed for ICSP. For this case it would be necessary to use one of the terminals MISO, MOSI, SCK instead of PD6. What conditions would have to be met?
Will the modification of the https://github.com/ElTangas/jtag2updi/blob/master/source/sys.h file meet all requirements?

@ElTangas
Copy link
Owner

You can change the default values to others, if you prefer.

@homer1013
Copy link

homer1013 commented Oct 23, 2023

**I also had this question and started digging in to the code.

I have changed from Pin 6 (PD6) to Pin 11 (PB3) in order to utilize the ICSP pin header.

If you'd like to do so also, go to the "sys.h" file and find the arduino family for your project, ie. Arduino Uno R3 (ATmega328 P)

For my example I am using an Uno R3, see below for what's changed.**

#elif defined (AVR_ATmega_Mini) || defined(ARDUINO_AVR_LARDU_328E)
//For ATmega8/88/168/328 (P, PB) parts

ifndef HVLED_PORT

define HVLED_PORT B

endif

ifndef HVLED_PIN

define HVLED_PIN 0

endif

ifndef HOST_USART

define HOST_USART 0

endif

ifndef UPDI_PORT

define UPDI_PORT B // Pin 11 (PB3) ADDED

define UPDI_PORT D // Pin 6 (PD6) ORIGINAL

endif

ifndef UPDI_PIN

define UPDI_PIN 3 // Pin 11 (PB3) ADDED

define UPDI_PIN 6 // Pin 6 (PD6) ORIGINAL

endif

**I removed the (#)'s for this comment only, Be sure to replace the (#)'s before uploading code

I hope this helps out anyone stuck right now
-Homer**

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

3 participants