From 5264bd66223c5e384e627f2501b9d8518c2df1a3 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Wed, 12 Feb 2020 13:25:44 -0600 Subject: e --- Lab_2B.X/lab2b_c.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Lab_2B.X/lab2b_c.c') diff --git a/Lab_2B.X/lab2b_c.c b/Lab_2B.X/lab2b_c.c index b33d126..f7150c9 100644 --- a/Lab_2B.X/lab2b_c.c +++ b/Lab_2B.X/lab2b_c.c @@ -16,7 +16,7 @@ #pragma config FCKSM = CSECME // Clock Switching and Monitor (Clock switching is enabled, // Fail-Safe Clock Monitor is enabled) #pragma config FNOSC = FRCPLL // Oscillator Select (Fast RC Oscillator with PLL module (FRCPLL)) -#define PERIOD 20 +#define PERIOD 30 //DEFINTIONS void writeColor(int r, int g, int b); @@ -113,10 +113,9 @@ void writeColor(int r, int g, int b) { } void delay(int delay_in_ms) { - int i = 0; - while (i < delay_in_ms) { + int i; + for (i = 0; i < delay_in_ms; i++) { wait_1ms(); - i++; } } -- cgit v1.2.3