After much searching online, I have yet to discover a GCBASIC "port-to-pin" map for the Arduino mega 2560.
So I made one that can be used as an include file.
It simply maps the correct port to the digital or analogue pins as numbered on an arduino PCB.
@Rikki. If it acceptable by you I would like to include in the next release. Can you repost with the header below? Then, I can use as the license is then correct.
' Library to allow the Arduino mega2560 to work with GCBASIC
' Copyright (C) 2018 R. White
' This library is free software; you can redistribute it and/or
' modify it under the terms of the GNU Lesser General Public
' License as published by the Free Software Foundation; either
' version 2.1 of the License, or (at your option) any later version.
' This library is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
' Lesser General Public License for more details.
' You should have received a copy of the GNU Lesser General Public
' License along with this library; if not, write to the Free Software
' Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
' 28/02/2018 Created by R. White based on the works of Hugh Considine. The original works was the the UNO_328p.h pin map
' Used to connect the correct GCBASIC port to the relevant pin as labelled on an Arduino mega 2560
' i.e GCBasic PORTE.0 corresponds to the pin marked DIGITAL_0 on an Arduino mega 2560 PCB
' usage example #define BUZZER DIGITAL_12
' usage example set BUZZER out
Nice. Anobium
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@anobium Thanks ! I'm more than happy for this to be included in any releases. Hopefully it will help coders to use the mega 2560 more easily. That preamble you sent is now added to the top of the attached file.
That is the exact diagram I was working from. Didn't think to upload it. The analogue ports can also become digital ports, though before this diagram was published I hadn't realized that. They are not marked on the dozen or so arduino mega 2560 pcbs I own
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Rikki, Anobium sent me the unofficial uno diagram. I found it handy.
This link is handy info for arduino boards https://www.robot-italy.com/en/blog/progetti/450
ps I guess you like mega 2560.
Last edit: stan cartwright 2018-03-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After much searching online, I have yet to discover a GCBASIC "port-to-pin" map for the Arduino mega 2560.
So I made one that can be used as an include file.
It simply maps the correct port to the digital or analogue pins as numbered on an arduino PCB.
Enjoy
Last edit: Rikki 2018-02-28
Nice piece of work.
@Rikki. If it acceptable by you I would like to include in the next release. Can you repost with the header below? Then, I can use as the license is then correct.
Nice. Anobium
@anobium Thanks ! I'm more than happy for this to be included in any releases. Hopefully it will help coders to use the mega 2560 more easily. That preamble you sent is now added to the top of the attached file.
File has been moved to the release Gold build. Item 499 in the release notes.
Thank you.
Here's an unofficial diagram of the board as well.
That is the exact diagram I was working from. Didn't think to upload it. The analogue ports can also become digital ports, though before this diagram was published I hadn't realized that. They are not marked on the dozen or so arduino mega 2560 pcbs I own
test
@Rikki, Anobium sent me the unofficial uno diagram. I found it handy.
This link is handy info for arduino boards https://www.robot-italy.com/en/blog/progetti/450
ps I guess you like mega 2560.
Last edit: stan cartwright 2018-03-07