Society of Robots - Robot Forum
Software => Software => Topic started by: galannthegreat on January 30, 2009, 12:08:23 PM
-
can i use the statement "#use delay(20000000)" to get my MCU clocked at 20MHz with a crystal or do i have to set it to HS mode?
-
First off, What MCU are you using? Please provide the appropriate amount of information.
-
PIC 16F877a
20 MHz crystal
I'm using the CCS C compiler
-
I could be wrong as its been ~2 years since I've used CCSC, but I remember that the delay for CCSC is a 16 bit variable. Just look up the delay function in the manual you got with CCSC when you bought it.
So you can't go above delay(65535)
If you wanted more, just do this:
for(i=0;i<21;i++)
delay(50000);