Hello.All
I have a question please excuse me if it is silly. In picbasic pro RCTIME is somehow ambiguous. Look at this code :
Main:
HIGH RA.0 ' charge the capacitor
PAUSEUS 250 ' for 250 us
RCTIME RA.0, 1,Result ' measure discharge time
PAUSE 100
GOTO Main
1. RCTIME suppose to return the discharge time of the capacitor . High RA.0 set pin RA.0 to +5v. 250uS delay inserted to give time for C to charge. RCTIME starts timing the discharge . When 1.4v reached the timer stops and discharge time is stored in Result. I cannot see the start time here , if it is stars at RCTIME instruction, there is 250uS has not been taken into account and therefor the timing is not accurate. Am I correct here?.
2. Is the voltage level to switch from high to low 1.4v or 1.3v as some say ?.
3. Is the time returned by RCTIME instruction actually RC time ( T=RC where the voltage suppose to be at 36.2% of the supply voltage, for this formula to be true)? . Is the voltage 1.4v correspond to 36.2% of 5v so we can take it as RC time?. Actually 36.2% of 5 is 1.81 not 1.4 or 1.3.
I roved the internet but could not find an answer.
Please any help.
Obaid
I have a question please excuse me if it is silly. In picbasic pro RCTIME is somehow ambiguous. Look at this code :
Main:
HIGH RA.0 ' charge the capacitor
PAUSEUS 250 ' for 250 us
RCTIME RA.0, 1,Result ' measure discharge time
PAUSE 100
GOTO Main
1. RCTIME suppose to return the discharge time of the capacitor . High RA.0 set pin RA.0 to +5v. 250uS delay inserted to give time for C to charge. RCTIME starts timing the discharge . When 1.4v reached the timer stops and discharge time is stored in Result. I cannot see the start time here , if it is stars at RCTIME instruction, there is 250uS has not been taken into account and therefor the timing is not accurate. Am I correct here?.
2. Is the voltage level to switch from high to low 1.4v or 1.3v as some say ?.
3. Is the time returned by RCTIME instruction actually RC time ( T=RC where the voltage suppose to be at 36.2% of the supply voltage, for this formula to be true)? . Is the voltage 1.4v correspond to 36.2% of 5v so we can take it as RC time?. Actually 36.2% of 5 is 1.81 not 1.4 or 1.3.
I roved the internet but could not find an answer.
Please any help.
Obaid
Last edited: