cancel
Showing results for 
Search instead for 
Did you mean: 

HOW to CONFIG P4 PORT?

wdcai
Associate II
Posted on October 08, 2004 at 05:34

HOW to CONFIG P4 PORT?

9 REPLIES 9
wdcai
Associate II
Posted on May 17, 2011 at 12:02

HI,ALL

I wanto to know whether the P4 PORT can be used as GPIO but at the same time,TCM0,TCM1 can be used as timers?

Thanks!
wdcai
Associate II
Posted on May 17, 2011 at 12:02

no anybody can give me some advice?thanks !

neil2
Associate II
Posted on May 17, 2011 at 12:02

Which device are you referring to?

wdcai
Associate II
Posted on May 17, 2011 at 12:02

uPSD33XX

wdcai
Associate II
Posted on May 17, 2011 at 12:02

Hi,ALL

We know when t0,t1 are working in timer mode, p3.4 and p3.5 are also working as GPIO mode in 8051, So I think if TCM is working in soft timer mode, the P4 port can be used as GPIO,is it right?

Thanks!
neil2
Associate II
Posted on May 17, 2011 at 12:02

P4 is shared with the PCA (programmable counter array) see the data sheet

www.st.com/stonline/books/pdfdocs/9685.pdf I can't see any reference to TCM0 and TCM1, but any P4 pin that you're not using as cex0 cex1 cex2 or ec1 can be used as gpio.

wdcai
Associate II
Posted on May 17, 2011 at 12:02

P4 port in uPSD33XX can work in 4 modes, capture,timer, toggle mode and PWM, only in timer mode(the clock of timer is from OSC), no any pins need to be configed as input or output, for example , in capture mode , input pins are needed, in toggle and pwm modes, outpout pins are needed, so I think all pins of P4 port may be configed as GPI/O when timer mode is working.

Are you agree with me?

Thanks!
neil2
Associate II
Posted on May 17, 2011 at 12:02

I now see what you mean, I didn't study the data sheet closely. I'm not sure if P4.0 4.1 and 4.2 can be used, but the others can be used if you're not using PWM or not using P4.3 as a clock source.

shin
Associate
Posted on May 17, 2011 at 12:02

Quote:

On 2004-08-11 08:15, dclx200 wrote:

HI,ALL

I wanto to know whether the P4 PORT can be used as GPIO but at the same time,TCM0,TCM1 can be used as timers?

Thanks!