cancel
Showing results for 
Search instead for 
Did you mean: 

urgent - SPI data reading problem

jrajeev
Associate II
Posted on March 21, 2006 at 08:25

urgent - SPI data reading problem

2 REPLIES 2
jrajeev
Associate II
Posted on May 17, 2011 at 12:10

We are using uPSD3333dv-40U6 microcontroller in one of our products. We have an ADC which operates over SPI.

We have a problem in reading the output of the ADC through SPIRXD pin.

We are using PORT 1 for SPI.

The ADC is taking the clock and other inputs and generating the proper output. The output is normally at5 3.3 v level.

But when we connect the output to the SPIRXD pin it is getting the output to 0.7V level which falls in the zero band of the processor.

So the value read is always 0.

We tried the same code running on the microcontroller evaluation maodule which consists upsd3334D chip. We are able to read the value properly

Is there any problem with the SPI on PORT 1 for upsd333DV-40U6 chip.

when we configure PORT 4 for SPI we are reading a voltage level of 3.3V on both 3333 and 3334

When we configure PORT 1 for SPI we read 1V on 3333 and 3.3V on 3334.

we tried different methods to solve the problem. But we are unable

Please do help us. We need it urgently.

raghu1
Associate
Posted on May 17, 2011 at 12:10

Hi,

There shoould be some difference between the uPSD3400 development kit and your project hardware board. and one more thing is there is a difference between your PORT1 and PORT4 functionality.PORT1 can be used in GPIO,ADC and (TIMER2,UART1,SPI) modes.PORT4 can be used in GPIO,PCA and (TIMER2,UART1,SPI) modes.If you see the difference here,the ADC is used on PORT1 and PCA is used on PORT4 rest of other modes are common to your both PORTS.

you have to take care about other additional pins of microcontroller like AVCC,VREF and PSDGND+AGND, If you don't use your 10-bit internal ADC.you should not connect all the three pins to the ground and keep AVCC and VREF open if you don't use internal ADC.If you connect AVCC to ground,the SPI RXD pin will misbehave and it will not allow your pin as input.I think AVCC pin will be used for internal pull-up voltage for PORT1 pins,if you use external analog supply voltage for internal ADC.If you don't give extrenal analog voltage to AVCC pin,PORT1 may use 3.3Volts for pull-up voltage from the other power supply pins of micro.Iam not sure but i am doubting...

What i observed on 3334 development kit is ,internal ADC is configured on PORT1 in the demo application and AVCC and Vref pins were connected to 3.3V.

Please take care about AVCC pin when you use PORT1 in SPI mode.you will not face this problem when you operate SPI on PORT4 due to AVCC pin is not related to PORT4 pins.

I am sure that this logic will work out.

I did not find much details about AVCC pin in the given uPSD3333 microcontroller datasheet.

Raghu

INDIA.