User Tools

Site Tools


brainmsp430

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
brainmsp430 [2016/01/30 16:01] adminbrainmsp430 [2019/08/06 15:11] (current) admin
Line 142: Line 142:
 unsigned long millis(){ unsigned long millis(){
  return doublemillis >> 1; // Double Millisecondy divided by 2  return doublemillis >> 1; // Double Millisecondy divided by 2
 +}
 +
 +// -------------------------- Interrupts ------------------------------------------
 +#pragma vector=WDT_VECTOR
 +__interrupt void WDT(void){
 + doublemillis++;
 +}
 +
 +#pragma vector=TIMER0_A0_VECTOR    // Timer0 A0 interrupt service routine
 +__interrupt void Timer0_A0 (void) {
 +   P1OUT ^= 0x04;                  // Toggle output P1.2
 } }
  
brainmsp430.txt · Last modified: 2019/08/06 15:11 by admin

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki