How can I implement 16-bit parallel bus on SAMA5D4-xplained

For SAMA5D2 Xplained, SAMA5D3 Xplained and SAMA5D4 Xplained

Moderator: nferre

User avatar
BlackMesa
Location: Vilnius
Posts: 9
Joined: Thu Oct 05, 2017 2:02 pm

How can I implement 16-bit parallel bus on SAMA5D4-xplained

Thu Nov 09, 2017 1:00 pm

Hi,
I am thinking about connecting external ADC (something like LTC1603) to SAMA5D4-xplained board via parallel bus. Firstly I thought that EBI (External Bus Interface) will solve my problem, but later realized that there are no pins on the board to simply connect that ADC to EBI. Then I would have to solder wires somewhere on board, I don't want that...

Other way to do that is to use PIO. Is PIO not the same as GPIO? What is the main difference? I remember GPIO from STM32 microcontrollers and these two interfaces looks identical to me :roll:
If I use PIO, is there a way to read all 16 PIO pins at same time and get whole 16-bit number?
It would be easy if all 16 pins in sequence would have connectors on board something like this:
PB3 -> bit 0
PB4 -> bit 1
PB5 -> bit 2
...
PB18 -> bit 15
Then I have just to read Port's PIO Pin Data Status Register and shift it. But if somewhere in the middle (e.g. PB6) is a pin without connector, can I skip that pin and read 16 bit value without processing every value in software?

Maybe there are some other ways to get around this problem... Any suggestions?
blue_z
Location: USA
Posts: 1547
Joined: Thu Apr 19, 2007 10:15 pm

Re: How can I implement 16-bit parallel bus on SAMA5D4-xplained

Fri Nov 10, 2017 2:43 am

BlackMesa wrote:Is PIO not the same as GPIO?
No, not the way that Atmel uses these terms in their datasheets. GPIO functionality is a subset of the PIO subsystem.
Other manufacturers (IIRC e.g. Broadcom) conflate pin control and GPIOs, and label the entire topic "GPIO".

BlackMesa wrote: What is the main difference?
(Your previous question argued that they were the same, but yet there's a difference?)
Some pins of the SoC have dedicated functionality, e.g. for power, ground, clocks, and memory bus.
Rather than dedicate the limited number of pins to specific peripherals, SoCs offer maximum design versatility by having a configurable abundance of peripherals and programmable functionality of pins.

PIO is for the control and management of the SoC pins that have programmable functionality.
Such a pin (or "I/O line") can be assigned (i.e. connected) to a peripheral device for a specific function, e.g. the TxD pin of a USART or an input to the ADC.
The assignment of this functionality is referred to as "pin multiplexing".
When a pin is not assigned to any peripheral function, then that pin is available as a GPIO.
(Linux implements a similar distinction between pin-control and GPIOs. )

BlackMesa wrote:If I use PIO, is there a way to read all 16 PIO pins at same time and get whole 16-bit number?
Yes, as long as all bits are contained in one PIO controller.

BlackMesa wrote:Maybe there are some other ways to get around this problem... Any suggestions?
You fail to mention the program environment.

Regards

Return to “SAMA5 Xplained”

Who is online

Users browsing this forum: No registered users and 2 guests