Hocam tabi ki o komutla olmaz çünkü eğer f1 tusuna bakıp delay_ms komutunun özelliklerine bakarsaniz maksimum 65535 yazilacagini görürsünüz.
[TD="class: hcp3, bgcolor: #d8edff"]Parameters:[/TD]
[TD="class: hcp3, bgcolor: #d8edff"]
time - a variable 0-65535(int16) or a constant 0-65535
Note: Previous compiler versions ignored the upper byte of an int16, now the upper byte affects the time.
[/TD]
[TD="class: hcp4"]Returns:[/TD]
[TD="class: hcp5"]undefined
[/TD]
[TD="class: hcp3, bgcolor: #d8edff"]Function:[/TD]
[TD="class: hcp3, bgcolor: #d8edff"]This function will create code to perform a delay of the specified length. Time is specified in milliseconds. This function works by executing a precise number of instructions to cause the requested delay. It does not use any timers. If interrupts are enabled the time spent in an interrupt routine is not counted toward the time.
The delay time may be longer than requested if an interrupt is serviced during the delay. The time spent in the ISR does not count toward the delay time.
[/TD]
[TD="class: hcp4"]Availability:[/TD]
[TD="class: hcp5"]All devices
[/TD]
[TD="class: hcp3, bgcolor: #d8edff"]Requires:[/TD]
[TD="class: hcp3, bgcolor: #d8edff"]#use delay
[/TD]
[TD="class: hcp4"]Examples:[/TD]
[TD="class: hcp5"]#use delay (clock=20000000)
delay_ms( 2 );
void delay_seconds(int n) {
for (;n!=0; n- -)
delay_ms( 1000 );
}
[/TD]
[TD="class: hcp3, bgcolor: #d8edff"]Example Files:[/TD]
[TD="class: hcp3, bgcolor: #d8edff"]ex_sqw.c
[/TD]
[TD="class: hcp4"]Also See: [/TD]
[TD="class: hcp5"]delay_us(), delay_cycles(), #use delay
[/TD]
/// sonra gerekn yere bunu yaz.
delay_ms(60000); // 1dakikaya karsilik gelir , 180 kere islem yapilir.