On Mon, 3 Dec 2001, Konstantinos Bibis wrote: > Hello, > i'm using a 16F877 PIC. > I've written a small program in C. > It is divided in 8 states, and each has it's own delay. I'm using delay_ms() > to specify the delay. > I wanted to define lets say a=100, b=359, c=7890, so in the program i can > write delay_ms(a), delay_ms(b),delay_ms(c) etc, instead of writing tha > actual number in seconds. I tried defining: long int a = 100(didint work), > and later saw in the manual that delay_ms() is expecting a number in > milliseconds. > > Is there a simple way to get aroound it ? Get around what? I've used delay_ms()for delays up to several seconds... with a long int the maximum delay would be 65565ms or 65.535 seconds. The delay_ms() function does delay some number of milliseconds, there is also delay_us() for microsecond delays and delay_cycles() for waiting some number of instruction cycles. What are you trying to do, exactly? Dale -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads