I notice in your examples for the DK3200 PortA (peripheral mode) is used for lcd data.
In the past I have used P0 (address/data) for lcd data - this method was also used on the DK900 dev boards - is this possible with the uPSD. I cannot see any reason why not but thought I would check here before I try it. This would then free PortA for GPIO. Many Thanks sjo
(http://www.st.com/stonline/books/pdf/docs/9188.pdf), Port 0 and Port 2 are dedicated external address and data bus and can NOT be used as GP I/O or Peripheral I/O mode.
As I said before attaching an lcd to P0 is quite common on the 8051 world so I thought I would try it anyway.
I have done this on the DK900 kit with an 8031 attached. It can be done and works very well. I have attached the code so everyone else can use a lcd on P0, thus saving a port. The only improvements is to use either PA or PB (bits 0,1) for the RS and RW lines , this would save having to use the cpld. Simply write 0x03 to the CONTROL register (address out) and set the DIRECTION as output - this can be done at runtime. Regards sjo