contiguous bits on a port

Questions on other types of hardware and getting it talking to the ARM CPU
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

contiguous bits on a port

Post by YahooArchive »

>from the help line
>I am devising a new optical instrument with an LCD alpha-numeric display as the
user display. I ( I think) need to address the display as a byte with 3 more
lines as control. Each time I look at the port numbers for the SuperPro LPC1756
I see port numbers missing! For example, I can see port 1 as 0,1,4,8,9,10,
etc... What about P1.2, or P1.3? How can I address a byte with a consecutive
set of port pins? I'm sure there's a solution I've overlooked, but can you
explain?

Port 2 has a contiguous set of bits P2(0)-P2(10)

As you state the other ports don't bring all the pins out. You'd have to ask
NXP why they chose the bits they did for that package.



garofolo
Posts: 6
Joined: Fri Dec 07, 2012 2:54 pm

Re: contiguous bits on a port

Post by garofolo »

I too have been perplexed by these missing pins. I have been using Port 2 pins 0 - 7 as my 8-bit data bus. Now I am wanting to use some high speed A/D & D/A chips that have a 16-bit wide data bus. How could I do this? I could write some code that shifts data around to make it "line up" with the available pins, but that seems like it would slow my high speed data acquisition. I know that NXP makes a 100-pin version of the LPC1756 cpu. The 100-pin chip is not missing any port pins. Is there a 100-pin version of the SuperPro? Will BasicTools work with the 100-pin chip?

AMDlloydsp
Posts: 99
Joined: Mon Apr 15, 2013 3:51 pm
Location: NE Central FL

Re: contiguous bits on a port

Post by AMDlloydsp »

Although I haven't yet had to do it, I believe all of the gpio pins are able to be mapped to individual bytes in SRAM, and subsequently "bit banded" back into "byte equivalent" words in memory. Basically, if I understand the method correctly, you create a two-tiered table in RAM. On table points to the various non-contiguous bits you want to map into a byte, then the second table maps those pointers into contiguous bytes of memory.

It'll require a long, deep drink from the 5-meg LPC1756 users' manual to understand it, but that's essential reading for the heavy-duty user.

I'm bumping up against a deadline where I have to map an external video display to a SuperPro, so I might have to learn bit-banding myself, soon.

Lloyd

Post Reply