I just received my SuperPro and I am trying to figure out where the 52 digital
I/Os are on the board -- when I count the pins identified on the SuperPro
pinout diagram I count 42 + 2 for RXD1 and TXD1 which only comes to 44 -- I
need to use at least 48 + 2 for I2C . Does this mean I need to use the analog
ports as quasi digital ports to get the other 6 ports or are they missing being
identified on the drawing -- I see 2 pins on the top left above and to the left
of P2.2 with no identification but that still leaves me short in my count ??
Dual use AD pins
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: Dual use AD pins
The AD pins can be turned into true digital IOs, by programming the selection in
the PINSEL register. Details on that are in the NXP LPC2103 user manual.
The code that executes before your BASIC program is started sets those to be AD
inputs.
There are 52 inputs shown on the schematic, though 2 are used for RXD0,TXD0
debug and P2.10 is read at reset time to determine whether the NXP ISP (in
circuit programming) mode should be entered, so you must not drive it during
reset.
the PINSEL register. Details on that are in the NXP LPC2103 user manual.
The code that executes before your BASIC program is started sets those to be AD
inputs.
There are 52 inputs shown on the schematic, though 2 are used for RXD0,TXD0
debug and P2.10 is read at reset time to determine whether the NXP ISP (in
circuit programming) mode should be entered, so you must not drive it during
reset.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: Dual use AD pins
My Flash memory usage ends at 0x3fdc(16348). I could use the next 4K block that
starts at ox4000, and ends at 0x4fff, or to allow for expansion, I should use
the block that starts at 0x5000, and ends at 0x5fff.
Is that a 4K block of Bytes or Integers? Flash memory has 32K bytes(0x7fff).
starts at ox4000, and ends at 0x4fff, or to allow for expansion, I should use
the block that starts at 0x5000, and ends at 0x5fff.
Is that a 4K block of Bytes or Integers? Flash memory has 32K bytes(0x7fff).
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: Dual use AD pins
On the LPC2103, Flash blocks are 4K bytes. Most anytime I talk about ARM memory
it's in bytes.
If your program stops at 0x3fdc (I assume you dumped memory to find that out,
@3f00 80 would show 0s, and 0xffff in blocks not written.)
Then 0x5000 would allow the program some room to grow. @5000 should show
FFFFFFFF in all locations, if you program is not using it.
it's in bytes.
If your program stops at 0x3fdc (I assume you dumped memory to find that out,
@3f00 80 would show 0s, and 0xffff in blocks not written.)
Then 0x5000 would allow the program some room to grow. @5000 should show
FFFFFFFF in all locations, if you program is not using it.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: Dual use AD pins
I used the ASM Listing to determine the memory usage.
How can I dump memory?
How can I dump memory?
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: Dual use AD pins
But you can do the same in C, by #include "breakpoint.h" and then calling
breakpoint() in the C code.
The newest sample.c does that and does a call to that when main exits.
breakpoint() in the C code.
The newest sample.c does that and does a call to that when main exits.