How to use LGT8F328P SSOP20 shared pins?

Hi everyone,

I was intrigued by the low price so I purchased a so-called Pro Mini EVB board which is based on the SSOP20 version of the LGT8F328P . What puzzles me most is that some pins (i.e. 3/4, 8/9 and 10/11) are shared somehow. I've been using Nano and Pro Mini clones for years, but this is the first time I come across shared pins. Could someone tell me how can I use, say, pins 3 and 4 as digital inputs at the same time? Or pins 8 as input and 9 as an output?

Thanks in advance,

Rubem

I will take a SWAG as I do not have the documation and schematics for this board. Shared pins generally indicates the pin can be used for more than one function but not two or more concurrently. For example a pin as an output and input at the same time. I2C would be an example, it is either a A/D input or I2C but not both concurrently. Hopefully this helps.

The (engish) datasheet is highly confusing for me.

image

Based on the above image, pin 3 of the board (equals pin 3 of the SSOP package) contains a mix of below.

  1. PD3/INT1/OC2B*
  2. PD4/DAO/T0/XCK
  3. PF4/OC1B/ICP3

Don't ask me how it's done, might be with fuses.

The best place (that I encountered while researching a bit) to ask questions might be Discussions · dbuezas/lgt8fx · GitHub.

Lets take some simple ones. Pins 20 and 19. They can be used as A/D inputs, Port I/O or I2C. Assuming you are using I2C, the pins are programed and dedicated to that function via your software. To use I2C you give up the usage of two A/D converter channels (ADC4 & ADC5) and two I/O ports (PC$ & PC%). Now lets use use them as A/D converters, you then gave up I2C and two I/O ports. etc. Pins can perform multiple functions, it is up to the designer to determine what gets connected to what and the programer to make them do that. If you use SPI you give up 12, 13, 14 and another pin for chip select if needed. Look at it this way, two items cannot occupy the same space at the same time. These designations can be changed at any time, this allows a few pins (very precious items) to fill a lot more applications. Note pin sharing is not a defined standard but is up to the individual manufacturer if they want to do it and what and how it is shared. Sharing can be different in different packages.

I believe you are right. I didn't have the time to test the board yet, but your post makes a lot of sense, that's probably how it's done. Thanks for now!

But those are the usual alternate functions. Now compare with the same processor in another package.

And the board tracks for pin 3 in below.


Board pin 3 states 3 and 4 and those are (I think) the shared pins that OP is talking about.

Board pin 3 states 3 and 4 and those are (I think) the shared pins that OP is talking about.

Yes, the photo below is the same board I have with the SSOP20. The shared pins are marked AS 3/4, 8/9 and 10/11. There is always a potential confusion about what the term "pin" means for Arduino users. In my case, I'm not referring to the physical pins in the chip encapsulation, but the logical Arduino pins D3/D4, D8/D9 and D10/D11.

@sterretje, thanks for pointing this out.