aboutsummaryrefslogtreecommitdiff
path: root/testing/examples/PIC32/BlinkingLeds.c
blob: 027f59ac3072d8e3ddbc87ee281ede3540991fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <plib.h>
int main(void)
{
	int i;
	mPORTDClearBits(BIT_0);
	mPORTDSetPinsDigitalOut(BIT_0);
	mPORTDClearBits(BIT_1);
	mPORTDSetPinsDigitalOut(BIT_1);
	mPORTDClearBits(BIT_2);
	mPORTDSetPinsDigitalOut(BIT_2);
	
	while(1)
	{
		for(i = 0; i < 500000; i++)
			mPORTDToggleBits(BIT_0);
		for(i = 0; i < 500000; i++)
			mPORTDToggleBits(BIT_1);
		for(i = 0; i < 500000; i++)
			mPORTDToggleBits(BIT_2);
	}

	return 0;
}