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 revision Previous revision
Next revision
Previous revision
brainmsp430 [2016/01/30 17:01]
admin
brainmsp430 [2019/08/06 17: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.1454169664.txt.gz ยท Last modified: 2016/01/30 17:01 by admin