chipKIT® Development Platform

Inspired by Arduino™

32bit IO?

Created Thu, 02 Feb 2012 08:18:20 +0000 by ghare


ghare

Thu, 02 Feb 2012 08:18:20 +0000

Hi all,

I am waiting for a chipKIT-MAX32 to arrive and thought I would start to have a look at how to drive it. I need to interface to a 32bit data bus, however on the pinouts I've seen, the port registers only seem to be 16bit. Can 2 ports be mapped to a single 32bit register and read with a single read instruction??


EmbeddedMan

Thu, 02 Feb 2012 14:02:26 +0000

No, I don't believe they can. I don't think you can do a single instruction write of 32 pins of I/O at once.

Why can't you do it as two 16 bit writes?

*Brian


ghare

Thu, 02 Feb 2012 19:31:58 +0000

I guess I will have to. I was hoping, being a 32bit processor, I would be able to do 32 bit IO and save time as I need to sample at around 400ksps.


EmbeddedMan

Thu, 02 Feb 2012 21:02:42 +0000

Well, depending upon what you want to do with it, 400Ks/s might be easily doable.

For example, if you need to take two 16 bit reads of I/O ports and write those two 16 bit values into RAM for later analysis, that takes 10 instructions at 80MHz so if that's all you were doing you could sample at about 8MHz. (I just tested this in the sim.)

It's quite likely that you'll need to do other things at the same time, but it's good to understand what the top speed is.

*Brian


ghare

Fri, 03 Feb 2012 03:26:23 +0000

Basically I will just be packetizing it and spitting it out on Ethernet.


GeneApperson

Thu, 09 Feb 2012 20:21:29 +0000

The PIC32 is a microcontroller, not a microprocessor. It does not have any processor busses that are externally accessible. The closest is the parallel master port (PMP), which is an i/o peripheral that can be used to drive an external bus. This can be programmed for various types of bus cycles.

The PIC32 i/o ports are 16 bits wide (although not all bits are implemented in all ports). There is no way to do a 32-bit wide i/o operation in a single instruction.

Gene Apperson Digilent