Arduino Pins are offset by 3?STK500v2 bootloader only loaded on power on reset, not on pin/WDT resetsHow can I control the arduino interface using luaArduino Digital Update Pins Instead of Write?Using an Arduino uno to program a standalone ATmega2560Cannot upload sketches to Arduino Uno R3 — avrdude: stk500_recv(): programmer is not respondingPin reading between arduinosArduino light blinking not working after stopping node.js programI2C communication Raspberry Pi 3 and ArduinoPackage manager for Arduino BoardsArduino on Eclipse
If Manufacturer spice model and Datasheet give different values which should I use?
Can I make popcorn with any corn?
XeLaTeX and pdfLaTeX ignore hyphenation
Patience, young "Padovan"
What is the command to reset a PC without deleting any files
Copycat chess is back
What do you call a Matrix-like slowdown and camera movement effect?
Do airline pilots ever risk not hearing communication directed to them specifically, from traffic controllers?
Pronouncing Dictionary.com's W.O.D "vade mecum" in English
Motorized valve interfering with button?
How is it possible to have an ability score that is less than 3?
How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)
Can I interfere when another PC is about to be attacked?
What defenses are there against being summoned by the Gate spell?
How old can references or sources in a thesis be?
Is there a familial term for apples and pears?
How is this relation reflexive?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Why is "Reports" in sentence down without "The"
A Journey Through Space and Time
What Brexit solution does the DUP want?
Is there a minimum number of transactions in a block?
What typically incentivizes a professor to change jobs to a lower ranking university?
Arduino Pins are offset by 3?
STK500v2 bootloader only loaded on power on reset, not on pin/WDT resetsHow can I control the arduino interface using luaArduino Digital Update Pins Instead of Write?Using an Arduino uno to program a standalone ATmega2560Cannot upload sketches to Arduino Uno R3 — avrdude: stk500_recv(): programmer is not respondingPin reading between arduinosArduino light blinking not working after stopping node.js programI2C communication Raspberry Pi 3 and ArduinoPackage manager for Arduino BoardsArduino on Eclipse
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
int led = PH6+3;//this is equal to PH6 or D9?!?
why is it offset by 3? I should be able to use PH6 without the +3 in the arduino IDE. I am using a custom board but I have double checked that the pins are matching to where i want them to go. It would be way easier to use the PIN NAMES rather then arduino names.
Im using a ATMEGA2560 on my custom board.
arduino IDE version is 1.8.5
arduino avr arduino-ide
|
show 3 more comments
int led = PH6+3;//this is equal to PH6 or D9?!?
why is it offset by 3? I should be able to use PH6 without the +3 in the arduino IDE. I am using a custom board but I have double checked that the pins are matching to where i want them to go. It would be way easier to use the PIN NAMES rather then arduino names.
Im using a ATMEGA2560 on my custom board.
arduino IDE version is 1.8.5
arduino avr arduino-ide
I'm using bare-metal avr instead of arduino but PH6 is propably a macro constant and this is equal to some constant + 3. Did you copy/paste this code or whats the problem? There is no macro for pin that you want to use?
– dunajski
Mar 8 at 6:11
Its more I want to be able to accurately use the pins by what the Atmel datasheet calls them. So somewhere there is a header file I need to find and fix the Macro Constants?
– user2175468
Mar 8 at 6:17
I think you are using this macros wrong and there is a macro for your pin. What pin do you want to use?
– dunajski
Mar 8 at 6:24
1
@user2175468 No, avr io definitons are consistent as it's just bit position in a Byte. If you want something more consistent, you can make your own core (if it doesn't exist already) with better mapping. You can take a look on MightyCore or MegaCore, there are several layouts mappings
– KIIV
Mar 8 at 6:26
1
You can, but you should use direct port manipulation instead of arduino super slow wrappers
– KIIV
Mar 8 at 6:31
|
show 3 more comments
int led = PH6+3;//this is equal to PH6 or D9?!?
why is it offset by 3? I should be able to use PH6 without the +3 in the arduino IDE. I am using a custom board but I have double checked that the pins are matching to where i want them to go. It would be way easier to use the PIN NAMES rather then arduino names.
Im using a ATMEGA2560 on my custom board.
arduino IDE version is 1.8.5
arduino avr arduino-ide
int led = PH6+3;//this is equal to PH6 or D9?!?
why is it offset by 3? I should be able to use PH6 without the +3 in the arduino IDE. I am using a custom board but I have double checked that the pins are matching to where i want them to go. It would be way easier to use the PIN NAMES rather then arduino names.
Im using a ATMEGA2560 on my custom board.
arduino IDE version is 1.8.5
arduino avr arduino-ide
arduino avr arduino-ide
edited Mar 8 at 6:18
user2175468
asked Mar 8 at 6:05
user2175468user2175468
11
11
I'm using bare-metal avr instead of arduino but PH6 is propably a macro constant and this is equal to some constant + 3. Did you copy/paste this code or whats the problem? There is no macro for pin that you want to use?
– dunajski
Mar 8 at 6:11
Its more I want to be able to accurately use the pins by what the Atmel datasheet calls them. So somewhere there is a header file I need to find and fix the Macro Constants?
– user2175468
Mar 8 at 6:17
I think you are using this macros wrong and there is a macro for your pin. What pin do you want to use?
– dunajski
Mar 8 at 6:24
1
@user2175468 No, avr io definitons are consistent as it's just bit position in a Byte. If you want something more consistent, you can make your own core (if it doesn't exist already) with better mapping. You can take a look on MightyCore or MegaCore, there are several layouts mappings
– KIIV
Mar 8 at 6:26
1
You can, but you should use direct port manipulation instead of arduino super slow wrappers
– KIIV
Mar 8 at 6:31
|
show 3 more comments
I'm using bare-metal avr instead of arduino but PH6 is propably a macro constant and this is equal to some constant + 3. Did you copy/paste this code or whats the problem? There is no macro for pin that you want to use?
– dunajski
Mar 8 at 6:11
Its more I want to be able to accurately use the pins by what the Atmel datasheet calls them. So somewhere there is a header file I need to find and fix the Macro Constants?
– user2175468
Mar 8 at 6:17
I think you are using this macros wrong and there is a macro for your pin. What pin do you want to use?
– dunajski
Mar 8 at 6:24
1
@user2175468 No, avr io definitons are consistent as it's just bit position in a Byte. If you want something more consistent, you can make your own core (if it doesn't exist already) with better mapping. You can take a look on MightyCore or MegaCore, there are several layouts mappings
– KIIV
Mar 8 at 6:26
1
You can, but you should use direct port manipulation instead of arduino super slow wrappers
– KIIV
Mar 8 at 6:31
I'm using bare-metal avr instead of arduino but PH6 is propably a macro constant and this is equal to some constant + 3. Did you copy/paste this code or whats the problem? There is no macro for pin that you want to use?
– dunajski
Mar 8 at 6:11
I'm using bare-metal avr instead of arduino but PH6 is propably a macro constant and this is equal to some constant + 3. Did you copy/paste this code or whats the problem? There is no macro for pin that you want to use?
– dunajski
Mar 8 at 6:11
Its more I want to be able to accurately use the pins by what the Atmel datasheet calls them. So somewhere there is a header file I need to find and fix the Macro Constants?
– user2175468
Mar 8 at 6:17
Its more I want to be able to accurately use the pins by what the Atmel datasheet calls them. So somewhere there is a header file I need to find and fix the Macro Constants?
– user2175468
Mar 8 at 6:17
I think you are using this macros wrong and there is a macro for your pin. What pin do you want to use?
– dunajski
Mar 8 at 6:24
I think you are using this macros wrong and there is a macro for your pin. What pin do you want to use?
– dunajski
Mar 8 at 6:24
1
1
@user2175468 No, avr io definitons are consistent as it's just bit position in a Byte. If you want something more consistent, you can make your own core (if it doesn't exist already) with better mapping. You can take a look on MightyCore or MegaCore, there are several layouts mappings
– KIIV
Mar 8 at 6:26
@user2175468 No, avr io definitons are consistent as it's just bit position in a Byte. If you want something more consistent, you can make your own core (if it doesn't exist already) with better mapping. You can take a look on MightyCore or MegaCore, there are several layouts mappings
– KIIV
Mar 8 at 6:26
1
1
You can, but you should use direct port manipulation instead of arduino super slow wrappers
– KIIV
Mar 8 at 6:31
You can, but you should use direct port manipulation instead of arduino super slow wrappers
– KIIV
Mar 8 at 6:31
|
show 3 more comments
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55057606%2farduino-pins-are-offset-by-3%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55057606%2farduino-pins-are-offset-by-3%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I'm using bare-metal avr instead of arduino but PH6 is propably a macro constant and this is equal to some constant + 3. Did you copy/paste this code or whats the problem? There is no macro for pin that you want to use?
– dunajski
Mar 8 at 6:11
Its more I want to be able to accurately use the pins by what the Atmel datasheet calls them. So somewhere there is a header file I need to find and fix the Macro Constants?
– user2175468
Mar 8 at 6:17
I think you are using this macros wrong and there is a macro for your pin. What pin do you want to use?
– dunajski
Mar 8 at 6:24
1
@user2175468 No, avr io definitons are consistent as it's just bit position in a Byte. If you want something more consistent, you can make your own core (if it doesn't exist already) with better mapping. You can take a look on MightyCore or MegaCore, there are several layouts mappings
– KIIV
Mar 8 at 6:26
1
You can, but you should use direct port manipulation instead of arduino super slow wrappers
– KIIV
Mar 8 at 6:31