Virtual Ports on Xmega8E5

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

I'm running into an issue trying to map Virtual Ports on a Xmega8E5. According to the datasheet it has the Virtual Port capability, however the PORTCFG_t structure doesn't contain the mapping or control registers as stated in the AVR1313 Appnote. How are virtual ports supposed to be setup on the E5 chips?

iox8e5.h:
/* I/O port Configuration */
typedef struct PORTCFG_struct
{
    register8_t MPCMASK;  /* Multi-pin Configuration Mask */
    register8_t reserved_0x01;
    register8_t reserved_0x02;
    register8_t reserved_0x03;
    register8_t CLKOUT;  /* Clock Out Register */
    register8_t reserved_0x05;
    register8_t ACEVOUT;  /* Analog Comparator and Event Out Register */
    register8_t SRLCTRL;  /* Slew Rate Limit Control Register */
} PORTCFG_t;
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

Since there are four ports on the E5's and four virtual ports, there is no need to map them; they are already mapped:

VPORT0 - Virtual port A
VPORT1 - Virtual port C
VPORT2 - Virtual port D
VPORT3 - Virtual port R

Just go ahead and use them (untested).

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

snigelen wrote:

Just go ahead and use them (untested).

It works! Tested.

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

Thanks to both of you! Some things have come up and I've been unable to get my to micros lately. Appreciate it!

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

I too tried several hours of web searching and trying different statements to get the virtual ports working on the E5 Xmegas and finally ran across this post. Thanks guys! Much appreciated!!

Marty
:D