What is Port R ??

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Been looking at the XMEGA-E manual and the data sheet for the ATxmega(8/16/32)E5. There are references to a "Port R". The block diagram on the data sheet, where I first noticed it, seems to associate it with "OSC/CLK CTRL" and there are two pins named PR0 and PR1.

PR0 and PR1 are given functions XTAL1 and XTAL2, TOSC1 and TOSC2, and a small variety of other functions.

Can someone describe what this two-pin "port" is all about?

Thanks
Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
PR0 and PR1 are given functions XTAL1 and XTAL2
Correct, that's where the crystal goes if you are using one, otherwise they are normal I/Os.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK!

Thanks
Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TOSC1 and TOSC2 are not on PR0 and PR1. Some places in the datasheets mention that, but in other places it shows TOSC1 and TOSC2 are on PORTE. In my case using the atxmega64a3u, official word from atmel was TOSC1 and TOSC2 are on PE0 and PE1.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

TOSC1 and TOSC2 are not on PR0 and PR1. Some places in the datasheets mention that, but in other places it shows TOSC1 and TOSC2 are on PORTE. In my case using the atxmega64a3u, official word from atmel was TOSC1 and TOSC2 are on PE0 and PE1.

??? Remember that the question was about the E5 family. As far as I can tell, it does not have a port E.

I went through a few of the different family datasheets. While XTAL1/2 seem to be on PR0/1, TOSC1/2 are on different ports on different families, and in at least one case are dedicated to only that function, and not an alternate function of an I/O port.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, this is specifically about E5 family.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
While XTAL1/2 seem to be on PR0/1,
That's where I have a crystal and it's working. :-)

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All this was triggered when I looked at the pinout of the E5 series. There is a PortA and a PortC and a PortD and this stunted 2-pin PortR and NO PortB .

It seemed like an odd combination (leaving out PortB instead of something named PortA or PortD) and this odd little fractional "PortR". I am pretty sure there is some sort of precedent but it just struck me as puzzling. Why not a fractional PortB ? What is magic about "R"?

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
leaving out PortB
PORTB has pretty much the same stuff as PORTA for Xmegas, so they have dropped duplicate functions for the smaller chip.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I thought Port "A" was generally the "A"nalog port, with the ADC and DAC, etc.

Port B is a normal Digital I/O port.

Port R is the external Xtal Port, and with the higher pin count generally available on the Xmegas the Xtal was moved to its own "Port". This means that one can have a "full" 8 bit port for driving external hardware without having to kludge up the I/O across two ports.

The Xtal pins were called "Port" R because they can be used as general I/O pins if one isn't using the external Xtal function, and to be consistent with the pin naming convention used throughout the AVR lineup. Nowhere in the Tiny or Mega lineup are the Xtal pins ONLY called Xtal1 and Xtal2, they are always PortX.Y, with alternate functions being the Xtal usage.

The Xtal1/2 have always been on PortR on all of the various Xmegas I've thus far worked with.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you look at say the Xmega128A1 (and A3?) you will see that PORTB has the same ANALOG peripherals as PORTA, others have some analog stuff on PORTB.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh well. Some much for that theory...

I think the other part about breaking out the 2 pins for the Xtal to their own Port is still valid.

Maybe.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The port naming conventions were set by the original XMEGA A1. I like the fact that they are consistent across the entire range. Ports A and B have analogue stuff. C is always the first digital port. R is always the port with the XOSC connections. Makes porting software easy.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Makes porting software easy.

LOL--I think there is a pun in there.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is my first concentrated exposure to Xmegas, so I have no history of what the other ones do.

Its a Brave New World!

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Its a Brave New World!
You will need to update your avatar once you get going, no more hair or beard...

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is that an Xtreme makeover? Maybe a moose face? How about sheep face?

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!