ahmar123
Newbie level 5

Lack of CODE or SYNTAX Tags: Added by moderator
Why we use 120 to create a delay of 1ms ,
*/ In this code i create a delay of 500ms using j<120 , whats the reason we use this , i verify the delay using logic analyzer
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 /*#include<reg51.h> sbit led = P2^0; void delay(); void delay() { unsigned int i, j; for(i = 0; i < 500; i++) { for(j = 0; j < 120; j++){ } } } void main() { while(1) { led = 1; delay(); led = 0; delay(); } }
*/ In this code i create a delay of 500ms using j<120 , whats the reason we use this , i verify the delay using logic analyzer
Last edited by a moderator: