06.07.2013 Views

Final Report - Claymore - Grand Valley State University

Final Report - Claymore - Grand Valley State University

Final Report - Claymore - Grand Valley State University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

int current_target = 0;<br />

int destination = 0;<br />

int current_step =<br />

int i;<br />

-1;<br />

unsigned int CNT_timer1;<br />

//The delay time<br />

volatile unsigned int CLK_ticks<br />

= 0; //The current number of ms since<br />

last increment of CLK_seconds<br />

volatile unsigned<br />

since<br />

start<br />

int CLK_seconds = 0; //The current number of seconds<br />

/*-------------------------------<br />

Interrupt Stuff ---------------------<br />

----------*/<br />

SIGNAL(SIG_OVERFLOW1) / /The interrupt calls this function<br />

{<br />

CLK_ticks += (NUM_INTERRUPTS*10);<br />

if(CLK_ticks >= 1000)<br />

{<br />

beginning<br />

}<br />

}<br />

CLK_ticks -= 1000;<br />

CLK_seconds++;<br />

//Counts the number of seconds from the<br />

IO_update();<br />

TCNT1 = CNT_timer1;<br />

void CLK_setup(void) //Starts the interrupt service<br />

routine<br />

{<br />

TCCR1A = (0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!