bugAVR C Runtime Library - Bugs: bug #25300, Additional i/o port names


bug #25300: Additional i/o port names

Submitted by:  None
Submitted on:  Sun Jan 11 11:46:27 2009  
Category: Feature RequestSeverity: 1 - Wish
Priority: 6Item Group: Header files
Status: NonePercent Complete: 50%
Assigned to: NoneOriginator Email: -unavailable-
Open/Closed: OpenRelease: Any
Fixed Release: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sat Dec 19 10:22:40 2009, comment #7:

Hi, I'm successfully using your patch, thanks for your work! When do you think this can be included in some release?

Grygoriy Fuchedzhy <gry>
Tue Apr 28 13:06:53 2009, comment #6:

I reworked the header for ATmega640/1280/2560/641/1281/2561 so that when a 64pin device is use, missing pin definition are not declared. It use the same mechanism that was already in place in that file.

This patch also fix issue where USART Rx 0 and XCLK where missing the '0'.

This patch against HEAD and not against the previously committed patch.

(file #18037)

Frédéric Nadeau <fnadeau>
Fri Apr 17 17:58:26 2009, comment #5:

As a side note...

Even if the patch include modification to the script, anyone attempting to regenerate the patch using the script will fail to do so since I modified some AVR Studio XML file that were bogus.

Just so it does not confuse anyone.

Frédéric Nadeau <fnadeau>
Fri Apr 17 17:53:35 2009, comment #4:


Latest patch against HEAD,
- Duplicate issue
- Now Output Compare that are Inverted are named OCXY_N:
#define OC1D_N_DDR DDRB
#define OC1D_N_PIN PINB
#define OC1D_N_BIT 4

Comments are welcome.

(file #17941)

Frédéric Nadeau <fnadeau>
Mon Mar 30 18:41:29 2009, comment #3:

I have attaced a newly generated patch against HEAD

vector now have number in the following format:
XXXXX_vect_num 4

pin definition looks like:
#define XX_DDR DDRD
#define XX_PIN PIND
#define XX_BIT 5

Patch to the xml folder is also included. This has helped to generate the new io header and I don't beleived it is used for anything else.

(file #17837)

Frédéric Nadeau <fnadeau>
Thu Mar 26 20:23:03 2009, comment #2:

I'm including 2 files:

added pin definition
added an INTERRUPT_num

Some device have no pin definition since XML files lack information.
Some device like ATmega1280/1281 use the same io file, however the 1281 has less pin, should consider using the already existing _ATmegaxx1_ and _ATmegaxx0_ define
Some device may contain errors since the XML are crappy

(file #17813, file #17814)

Frédéric Nadeau <fnadeau>
Tue Jan 13 09:16:38 2009, comment #1:

Patches welcome, as doing this change requires modifying a lot of header files.

Eric Weddington <arcanum>
Project Administrator
Sun Jan 11 11:46:27 2009, original submission:

It's a common thing when single pin on a device represents several features, for example atmega8:
PB5 can be used as regular i/o port or SCK for SPI interface
PB4 can be used as regular i/o port or MISO for SPI interface
PB3 can be used as regular i/o port or MOSI for SPI interface
PB2 can be used as regular i/o port or SS for SPI interface
PD0 can be used as regular i/o port or RX for usart
PD1 can be used as regular i/o port or TX for usart
Almost every pin have several meanings. So if I'm trying to build software wich communicates using for example SPI interface, i have to use some of i/o ports in another meaning(write logical 1/0 to SS pin to select/deselect slave device) So i think it's a good idea to put such definitions to headers:

for example:
#define SS PB2
#define MOSI PB3
#define MISO PB4
#define SCK PB5

#define RX PD0
#define TX PD1



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #18037:  iomxx0_1.patch added by fnadeau (21kB - application/octet-stream - iomxx0_1,h patch against HEAD)
file #17941:  io.patch.bz2 added by fnadeau (25kB - application/x-bzip)
file #17837:  io.patch.bz2 added by fnadeau (25kB - application/x-bzip)
file #17813:  io.patch added by fnadeau (479kB - application/octet-stream - patch to the include/avr directory and to the xml(code that help generate the patched io files))
file #17814:  xml.patch added by fnadeau (21kB - application/octet-stream - patch to the include/avr directory and to the xml(code that help generate the patched io files))


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by gry (Posted a comment)
  • -unavailable- added by fnadeau (Updated the item)
  • -unavailable- added by arcanum (Posted a comment)

    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Nov 16 18:07:56 2012arcanumPriority9 - Immediate=>6
    Fri Nov 16 17:58:50 2012arcanumAssigned toarcanum=>None
      Originator Email=> -unavailable-
    Tue Apr 28 13:06:53 2009fnadeauAttached File-=>Added iomxx0_1.patch, #18037
    Fri Apr 17 17:53:35 2009fnadeauAttached File-=>Added io.patch.bz2, #17941
    Mon Mar 30 23:54:45 2009arcanumPercent Complete0%=>50%
      Assigned toNone=>arcanum
    Mon Mar 30 23:54:44 2009arcanumPriority1 - Later=>9 - Immediate
    Mon Mar 30 18:41:29 2009fnadeauAttached File-=>Added io.patch.bz2, #17837
    Thu Mar 26 20:23:03 2009fnadeauAttached File-=>Added io.patch, #17813
      Attached File-=>Added xml.patch, #17814
    Tue Jan 13 09:16:38 2009arcanumSeverity3 - Normal=>1 - Wish
      Priority5 - Normal=>1 - Later

    Back to the top

    Powered by Savane 3.1-cleanup1