cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with using the PA Port!!!

daniel52079
Associate II
Posted on June 28, 2004 at 04:29

Problems with using the PA Port!!!

6 REPLIES 6
daniel52079
Associate II
Posted on May 17, 2011 at 12:01

Hello Forum-Members!

I've got a Problem with using the Ports PA0-PA7 at the uPSD3200 - Development Board!

At my PSDsoft Express Project i've declareted this Ports to GP I/O Mode. And the Problem is if i want to set a Port to Zero it doesn't work it always stays on high!!! I tried the same expressions with Port B and Port D and there is no problem!!!!! only with the A Port!

Is it possible that the LCD-Display always forces a highpegel on the Ports????

If it's like i've said, what can i do to use the Ports without using the LCD Display???

Please help! if you've got a idea!

Regards

DANIEL

My expressions for example:

Code:

PSD_REGS UPSD_xreg _at_ PSD_REG_ADDR;

this are my init:

UPSD_xreg.CONTROL_A = 0x00;

UPSD_xreg.DIRECTION_A = 0xFF;

UPSD_xreg.DRIVE_A |= 0xFF;

and this i use in my programm!!!

UPSD_xreg.DATAOUT_A &= 0x00;

normaly every A Port should be set to low;
sjo
Associate II
Posted on May 17, 2011 at 12:01

When you say you have done what I have written do you mean:

PSD_REGS UPSD_xreg _at_ PSD_REG_ADDR;

UPSD_xreg.CONTROL_A = 0x00; // reset state

UPSD_xreg.DRIVE_A = 0x00; // reset state

UPSD_xreg.DIRECTION_A = 0xFF; // define as output

UPSD_xreg.DATAOUT_A = 0x00; // set PA0-7 low

will set all porta low (push/pull output).

also make sure you are not setting the vm register, eg.

PSD8xx_reg.VM |= 0x80;

comment out this line if defined, bit7 needs to be low.

Regards

sjo
sjo
Associate II
Posted on May 17, 2011 at 12:01

Setting the drive select register high will cause the io to either be open-drain or high slew, check datasheet for porta details.

For push/pull you need to leave the drive select at reset state 0x00.

Regards

sjo
daniel52079
Associate II
Posted on May 17, 2011 at 12:01

Hello!

I read the Manual and i've done what your had written! but do not work at all? May be there could be a problem with the PSDsoft project! I'd copied from the USP-Example and had set the PA - Ports to GP I/O!!!

Now I've a really strange Output on the Ports!!! all Ports are low exept the Port PA5 it's high!! It's really strange! And i don't know what to do!!!!

But the most strange thing is, that the source code if i change DATAOUT_A to _B it works correctly on Port B!

Please help, I'm really despaired!! :\

regards

DANIEL
joseph2399
Associate II
Posted on May 17, 2011 at 12:01

I wonder if you cleaned out all the LCD related stuff in your PSDsoft project. Go back through the reports and check to make sure there is nothing related to the LCD display. If you don't see anything and still have trouble, I suggest you start a new PSDsoft project and give that a try. That way you can at least be sure there is nothing related to the LCD and port A.

daniel52079
Associate II
Posted on May 17, 2011 at 12:01

Thank you all !!!!!

sjo you are right! the mistake was in the .VM line!! the PIO bit was enabled!!

Thank you very much for helping me!!!

Best regards

DANIEL