试试这个 int temp ;
temp = P3_5 ; whlie( 1 ) { if( temp != P3_5 ) { number ++ ; temp = P3_5 ; } } ; 这样对上升沿和下降沿都计数。
发表时间:2003年9月4日12:48:40