All pastes #439395 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-04-14 07:04 UTC
rendered paste body
#include <p24fj128ga010.h>
#define DELAY	8000
#define ALIVE 1

main()
{
	TRISA = 0xff00;	// all PORTA as output
	T1CON = 0x8030; // TMR1 on, prescale 1:256 Tclk/2
	
	while( ALIVE)
	{
		//1.
		PORTA = 0xff;	
		TMR1 = 0;
		while ( TMR1 < DELAY)
		{
		}

		// 2.
		PORTA = 0;
		TMR1 = 0;
		while ( TMR1 < DELAY)
		{
		}
	} // main loop
} // main