I2C and UART on one port XMega

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

Hi all!

I'm using Xmega256a3u in this project. 

Before closing the scheme, would like to know if someone checked (hopefully successfully ) option of using I2C and UART on same port.

I assume, there should be no problem.

I will check it probably in few days, but meanwhile... 

Thanks for you help!(not only in this discussion)

 

Thanks!
Dan

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

What do you mean by, "on the same port" ?

 

It should be clear that you can't do both I2C and UART simultaneously on the same pins...

 

EDIT

 

Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8386-8-and-16-bit-AVR-Microcontroller-ATxmega64A3U-128A3U-192A3U-256A3U_datasheet.pdf

 

currently still at Atmel Rev E, 09/2014.

 

Tables 32-3 to 32-6 on pages 62-63 show you the Ports C-F Alternate Function options - including UART and I2C.

 

So just pick ones where the I2C and UART functions don't "collide" on the same pins

 

Last Edited: Wed. Jan 24, 2018 - 08:55 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, awneil,

 

It is more then clear, they can't be on same pins.

What do you mean by, "on the same port" ?

 

For example, PORTE. 

More specifically, PORTE PIN0 - SDA, PIN1 - SCL, PIN6 - RxD, PIN7 - TxD

Thanks!
Dan

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

see my edit to #2 while you were typing!

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

Thanks, again!

 

if someone checked

But I was looking for confirmation from the real world)

 

In any case, I just found a way to separate this channels.

 

  

Thanks!
Dan

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

I have used the following usage at PORTF of xmega128a1u.
It worked perfectly.

 

PF0:SDA
PF1:SCL
PF2:UART0-RXD
PF3:UART0-TXD
PF6:UART1-RXD
PF7:UART1-TXD

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

Thanks a lot, kabasan!

Thanks!
Dan