Uno pin connection: Atmega16u2 & ATmega328P

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












On my Uno, I set up the HoodLoader2 (link below) so I can program both the ATMega16u2 and the ATmega328P. I can communicate between the two using the serial port. However, I need the serial port to communicate between the Uno and the PC. Can I communicate between the 328 and 16u2 using a common digital pin? All I need to communicate is a simple yes/no state, preferably in both directions. In other words: can I connect a digital pin (say 12) on the Uno to, say, PB1 pin on the 16u2's ICSP header, set pin 12 value to HIGH on the 328P, then read that state on the 16u2 via PB1? And vice versa, via another pair of pins? There's a Q that's close to what I want (link below) and the user there (@jsotola) seems to have the knowledge, but I can't comment under his comment, as I don't have 50 reputation.



HoodLoader2



Accessing digital pins from the ATMega16u2










share|improve this question

























    up vote
    1
    down vote

    favorite












    On my Uno, I set up the HoodLoader2 (link below) so I can program both the ATMega16u2 and the ATmega328P. I can communicate between the two using the serial port. However, I need the serial port to communicate between the Uno and the PC. Can I communicate between the 328 and 16u2 using a common digital pin? All I need to communicate is a simple yes/no state, preferably in both directions. In other words: can I connect a digital pin (say 12) on the Uno to, say, PB1 pin on the 16u2's ICSP header, set pin 12 value to HIGH on the 328P, then read that state on the 16u2 via PB1? And vice versa, via another pair of pins? There's a Q that's close to what I want (link below) and the user there (@jsotola) seems to have the knowledge, but I can't comment under his comment, as I don't have 50 reputation.



    HoodLoader2



    Accessing digital pins from the ATMega16u2










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      On my Uno, I set up the HoodLoader2 (link below) so I can program both the ATMega16u2 and the ATmega328P. I can communicate between the two using the serial port. However, I need the serial port to communicate between the Uno and the PC. Can I communicate between the 328 and 16u2 using a common digital pin? All I need to communicate is a simple yes/no state, preferably in both directions. In other words: can I connect a digital pin (say 12) on the Uno to, say, PB1 pin on the 16u2's ICSP header, set pin 12 value to HIGH on the 328P, then read that state on the 16u2 via PB1? And vice versa, via another pair of pins? There's a Q that's close to what I want (link below) and the user there (@jsotola) seems to have the knowledge, but I can't comment under his comment, as I don't have 50 reputation.



      HoodLoader2



      Accessing digital pins from the ATMega16u2










      share|improve this question













      On my Uno, I set up the HoodLoader2 (link below) so I can program both the ATMega16u2 and the ATmega328P. I can communicate between the two using the serial port. However, I need the serial port to communicate between the Uno and the PC. Can I communicate between the 328 and 16u2 using a common digital pin? All I need to communicate is a simple yes/no state, preferably in both directions. In other words: can I connect a digital pin (say 12) on the Uno to, say, PB1 pin on the 16u2's ICSP header, set pin 12 value to HIGH on the 328P, then read that state on the 16u2 via PB1? And vice versa, via another pair of pins? There's a Q that's close to what I want (link below) and the user there (@jsotola) seems to have the knowledge, but I can't comment under his comment, as I don't have 50 reputation.



      HoodLoader2



      Accessing digital pins from the ATMega16u2







      arduino-uno pins atmega16u2






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 15 at 6:48









      MrSparkly

      344




      344




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          You could use from PB1 to PB3 from 16u2 (SCK, MOSI, MISO) wich are exposed to its ICSP.
          Add a wire from one of them to your atmega328 :)






          share|improve this answer




















          • Thanks. What does "PB" stand for? Is this a "normal", digital pin, with HIGH and LOW states?
            – MrSparkly
            Aug 15 at 7:05










          • It means port B (PB1 physical pin 15 to PB3 pin 17). Don’t Know how hoddler name the pins :) here you’ll fins the uno schematic arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
            – Bouc
            Aug 15 at 7:09











          • This is the original ATmega pin naming and stands for Port B, pin 1. all the pins are separated into banks (ports) of 8 pins each. For pin functions, refer to the relevant datasheet: ww1.microchip.com/downloads/en/DeviceDoc/…
            – mystery
            Aug 15 at 8:54










          • It seems that SCK MOSI and MISO correspond to D1, D2 and D3 (github.com/NicoHood/HoodLoader2/wiki/…) on the 16u2. And yes they are digital « normal ;) » pins
            – Bouc
            Aug 15 at 12:59











          Your Answer





          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("schematics", function ()
          StackExchange.schematics.init();
          );
          , "cicuitlab");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "540"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2farduino.stackexchange.com%2fquestions%2f55314%2funo-pin-connection-atmega16u2-atmega328p%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          You could use from PB1 to PB3 from 16u2 (SCK, MOSI, MISO) wich are exposed to its ICSP.
          Add a wire from one of them to your atmega328 :)






          share|improve this answer




















          • Thanks. What does "PB" stand for? Is this a "normal", digital pin, with HIGH and LOW states?
            – MrSparkly
            Aug 15 at 7:05










          • It means port B (PB1 physical pin 15 to PB3 pin 17). Don’t Know how hoddler name the pins :) here you’ll fins the uno schematic arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
            – Bouc
            Aug 15 at 7:09











          • This is the original ATmega pin naming and stands for Port B, pin 1. all the pins are separated into banks (ports) of 8 pins each. For pin functions, refer to the relevant datasheet: ww1.microchip.com/downloads/en/DeviceDoc/…
            – mystery
            Aug 15 at 8:54










          • It seems that SCK MOSI and MISO correspond to D1, D2 and D3 (github.com/NicoHood/HoodLoader2/wiki/…) on the 16u2. And yes they are digital « normal ;) » pins
            – Bouc
            Aug 15 at 12:59















          up vote
          3
          down vote



          accepted










          You could use from PB1 to PB3 from 16u2 (SCK, MOSI, MISO) wich are exposed to its ICSP.
          Add a wire from one of them to your atmega328 :)






          share|improve this answer




















          • Thanks. What does "PB" stand for? Is this a "normal", digital pin, with HIGH and LOW states?
            – MrSparkly
            Aug 15 at 7:05










          • It means port B (PB1 physical pin 15 to PB3 pin 17). Don’t Know how hoddler name the pins :) here you’ll fins the uno schematic arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
            – Bouc
            Aug 15 at 7:09











          • This is the original ATmega pin naming and stands for Port B, pin 1. all the pins are separated into banks (ports) of 8 pins each. For pin functions, refer to the relevant datasheet: ww1.microchip.com/downloads/en/DeviceDoc/…
            – mystery
            Aug 15 at 8:54










          • It seems that SCK MOSI and MISO correspond to D1, D2 and D3 (github.com/NicoHood/HoodLoader2/wiki/…) on the 16u2. And yes they are digital « normal ;) » pins
            – Bouc
            Aug 15 at 12:59













          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          You could use from PB1 to PB3 from 16u2 (SCK, MOSI, MISO) wich are exposed to its ICSP.
          Add a wire from one of them to your atmega328 :)






          share|improve this answer












          You could use from PB1 to PB3 from 16u2 (SCK, MOSI, MISO) wich are exposed to its ICSP.
          Add a wire from one of them to your atmega328 :)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 15 at 7:01









          Bouc

          923




          923











          • Thanks. What does "PB" stand for? Is this a "normal", digital pin, with HIGH and LOW states?
            – MrSparkly
            Aug 15 at 7:05










          • It means port B (PB1 physical pin 15 to PB3 pin 17). Don’t Know how hoddler name the pins :) here you’ll fins the uno schematic arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
            – Bouc
            Aug 15 at 7:09











          • This is the original ATmega pin naming and stands for Port B, pin 1. all the pins are separated into banks (ports) of 8 pins each. For pin functions, refer to the relevant datasheet: ww1.microchip.com/downloads/en/DeviceDoc/…
            – mystery
            Aug 15 at 8:54










          • It seems that SCK MOSI and MISO correspond to D1, D2 and D3 (github.com/NicoHood/HoodLoader2/wiki/…) on the 16u2. And yes they are digital « normal ;) » pins
            – Bouc
            Aug 15 at 12:59

















          • Thanks. What does "PB" stand for? Is this a "normal", digital pin, with HIGH and LOW states?
            – MrSparkly
            Aug 15 at 7:05










          • It means port B (PB1 physical pin 15 to PB3 pin 17). Don’t Know how hoddler name the pins :) here you’ll fins the uno schematic arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
            – Bouc
            Aug 15 at 7:09











          • This is the original ATmega pin naming and stands for Port B, pin 1. all the pins are separated into banks (ports) of 8 pins each. For pin functions, refer to the relevant datasheet: ww1.microchip.com/downloads/en/DeviceDoc/…
            – mystery
            Aug 15 at 8:54










          • It seems that SCK MOSI and MISO correspond to D1, D2 and D3 (github.com/NicoHood/HoodLoader2/wiki/…) on the 16u2. And yes they are digital « normal ;) » pins
            – Bouc
            Aug 15 at 12:59
















          Thanks. What does "PB" stand for? Is this a "normal", digital pin, with HIGH and LOW states?
          – MrSparkly
          Aug 15 at 7:05




          Thanks. What does "PB" stand for? Is this a "normal", digital pin, with HIGH and LOW states?
          – MrSparkly
          Aug 15 at 7:05












          It means port B (PB1 physical pin 15 to PB3 pin 17). Don’t Know how hoddler name the pins :) here you’ll fins the uno schematic arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
          – Bouc
          Aug 15 at 7:09





          It means port B (PB1 physical pin 15 to PB3 pin 17). Don’t Know how hoddler name the pins :) here you’ll fins the uno schematic arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
          – Bouc
          Aug 15 at 7:09













          This is the original ATmega pin naming and stands for Port B, pin 1. all the pins are separated into banks (ports) of 8 pins each. For pin functions, refer to the relevant datasheet: ww1.microchip.com/downloads/en/DeviceDoc/…
          – mystery
          Aug 15 at 8:54




          This is the original ATmega pin naming and stands for Port B, pin 1. all the pins are separated into banks (ports) of 8 pins each. For pin functions, refer to the relevant datasheet: ww1.microchip.com/downloads/en/DeviceDoc/…
          – mystery
          Aug 15 at 8:54












          It seems that SCK MOSI and MISO correspond to D1, D2 and D3 (github.com/NicoHood/HoodLoader2/wiki/…) on the 16u2. And yes they are digital « normal ;) » pins
          – Bouc
          Aug 15 at 12:59





          It seems that SCK MOSI and MISO correspond to D1, D2 and D3 (github.com/NicoHood/HoodLoader2/wiki/…) on the 16u2. And yes they are digital « normal ;) » pins
          – Bouc
          Aug 15 at 12:59


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2farduino.stackexchange.com%2fquestions%2f55314%2funo-pin-connection-atmega16u2-atmega328p%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay