sparkey
 Senior Member
 Joined: 15/06/2011 Location: AustraliaPosts: 819 |
| Posted: 05:57am 30 Jun 2011 |
|
|
|
55 CLS
90 SETPIN 11,3
100 SETPIN 1,1 PIN 1 'set as input
125 SETPIN 10,8 PIN 10 'set as output
130 REM
470 REM SETTICK 100,1000 'start timer in 100ms
490 ' Normal Program. do stuff
510 'On Time, 10ms
520 REM SETTICK 10,2000
540 PIN(10)=1
560 REM IRETURN
580 REM
700 'Off Time, 100ms
720 REM SETTICK 100,1000
740 PIN(10)=0
760 REM IRETURN
780 REM
820 temp = 0
826 ?
840 FOR I = 1 TO 500
860 temp1 =PIN(1)
880 temp = temp + temp1
900 NEXT I
910 LOCATE 5,0
920 ? ,, temp /(0.0185) / 500
925 ?
930 LOCATE 10,50
940 ? ,"THE BATTERIES ARE"
941 ?
942 REM LOCATE 10,0
947 ? ," AT THIS VOLTAGE"
960 LOCATE 1500,120
980 ? " THE FREQUENCY OUTPUT IS ";PIN(11);"Hz "
985 ?
990 ? " SQUARE WAVE"
1200 GOTO 820
the rem statements are so i can still run the freq counter and the voltmeter ...both are displayed in txt form on the screen ...
but the settick program wont run so i placed it as the first program to run then the volt meter then the freq counter problems in the ticcker it puts the output of a pin hig then low basically a square wave out but i cannot get it to run ....
any help answers would bee appreiaciated ...thank you ...regards ... technicians do it with least resistance |