tswaehn avatar tswaehn committed 8e804a3 Merge

Merge

Comments (0)

Files changed (5)

 // mini libs
 #include ".\general\types.h"
 #include ".\general\delay.h"
+#include <.\general\my_math.h>
 #include ".\general\TickTimer.h"
+
 #include ".\drivers\i2c_interface.h"
 #include ".\drivers\lcd_hd44780.h"
 #include ".\drivers\HYT_371.h"
 }
 #endif
 
+/*
+   just start a new conversion. in single shot mode
+   a single conversion will be triggered and the device
+   returns to sleep mode. in continous mode the cyclic
+   conversion of measurements will be started.
 
+*/
 uint08 DS1621_startConversion( uint08 addr ){
 
 	uint08 devicePresent;

general/TickTimer.c

  *  3. make sure interrupts are generally enabled
  *  4. done
  *
- *  call "onTickTimerSec()" or "onTickTimerMin" to check if a second or minute
+ *  call "onTickTimerSec()" or "onTickTimerMin()" to check if a second or minute
  *  has passed
  *
  *
  *
-/*
-       #pragma code ISR_HIGH = 0x2008
 
-        void high_isr(){
-            _asm
-
-            goto incTimer
-
-            _endasm
-        }
-
-        #pragma code ISR_LOW = 0x2018
-
-        void low_isr(){
-            _asm
-
-            goto incTimer
-
-            _endasm
-        }
-
-	#pragma code
         */
 int counter=0;
 int usec=0;
 uint08 minute=38;
 uint08 hour=21;
 
-// timer runs at 1.0ms
-//#pragma interrupt incTimer
+// timer runs at 200.0ms
 void tickTimerISR(void){
 
     if (PIR1 & 0x02){

general/my_math.c

+
+#include "main.h"
+
+sint16 abs(sint16 value){
+	if (value <0){
+		value = value * -1;	
+	}
+	
+	return value;
+}

general/my_math.h

+
+#ifndef __MY_MATH__
+#define __MY_MATH__
+
+sint16 abs(sint16 value);
+
+
+
+#endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.