; .\pwrboard.SRC generated from: pwrboard.c
; COMPILER INVOKED BY:
;        C:\Programme\Keil\C51\BIN\C51.EXE pwrboard.c LARGE OPTIMIZE(6,SPEED) BROWSE INCDIR(..\..\..\..\Common\device\inc;..\..\..\..\Common\device\common) DEFINE(FX) DEBUG OBJECTEXTEND SRC(.\pwrboard.SRC)

$NOMOD51

NAME	PWRBOARD

TB81	BIT	0C0H.3
INT2CLR	DATA	0A1H
SM01	BIT	0C0H.7
SM11	BIT	0C0H.6
INT4CLR	DATA	0A2H
EI2C	BIT	0E8H.1
AC	BIT	0D0H.6
SM21	BIT	0C0H.5
EA	BIT	0A8H.7
APTR1FZ	BIT	0B0H.0
APTR2FZ	BIT	0B0H.1
IE	DATA	0A8H
DPH1	DATA	085H
PI2C	BIT	0F8H.1
GPIFSGLDATLX	DATA	0BEH
FL	BIT	0D0H.1
DPL1	DATA	084H
EXF2	BIT	0C8H.6
REN1	BIT	0C0H.4
IP	DATA	0B8H
RI	BIT	098H.0
CY	BIT	0D0H.7
TI	BIT	098H.1
SPC_FNC	DATA	08FH
INT6	BIT	0D8H.3
RCAP2H	DATA	0CBH
SP	DATA	081H
OV	BIT	0D0H.2
RCAP2L	DATA	0CAH
C_T2	BIT	0C8H.1
EP2468STAT	DATA	0AAH
AUTOPTRH1	DATA	09AH
RCLK	BIT	0C8H.5
GPIFSGLDATLNOX	DATA	0BFH
AUTOPTRH2	DATA	09DH
EXIF	DATA	091H
TCLK	BIT	0C8H.4
EUSB	BIT	0E8H.0
AUTOPTRL1	DATA	09BH
AUTOPTRL2	DATA	09EH
PCON	DATA	087H
GPIFSGLDATH	DATA	0BDH
RESI	BIT	0D8H.4
EP01STAT	DATA	0BAH
TMOD	DATA	089H
TCON	DATA	088H
EXTACC	BIT	0A8H.7
PUSB	BIT	0F8H.0
IE0	BIT	088H.1
IE1	BIT	088H.3
B	DATA	0F0H
CP_RL2	BIT	0C8H.0
AUTOPTRSETUP	DATA	0AFH
ACC	DATA	0E0H
ES0	B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CKCON	DATA	08EH
F0	BIT	0D0H.5
ERESI	BIT	0D8H.5
PSW	DATA	0D0H
RB81	BIT	0C0H.2
?PR?InitController?PWRBOARD              SEGMENT CODE 
?PR?MainLoop?PWRBOARD                    SEGMENT CODE 
?PR?Delay_10?PWRBOARD                    SEGMENT CODE 
?XD?PWRBOARD         SEGMENT XDATA 
	PUBLIC	wait_ii
	PUBLIC	wait_i
	PUBLIC	Delay_10
	PUBLIC	MainLoop
	PUBLIC	InitController

	RSEG  ?XD?PWRBOARD
         wait_i:   DS   2
        wait_ii:   DS   2
; //-----------------------------------------------------------------------------
; //	File:		
; //  13.01.09   Implementation 
; //-----------------------------------------------------------------------------
; #include "lp.h"
; #include "lpregs.h"
; #include "pwrboard.h"   
; 
; 
; 
; extern volatile BOOL   Sleep;
; unsigned short wait_i;
; unsigned short wait_ii;
; 
; 
; void InitController()

	RSEG  ?PR?InitController?PWRBOARD
InitController:
			; SOURCE LINE # 16
; {
			; SOURCE LINE # 17
;    // set up ports
;   
;   // PORT A  ->  LEDs
;   OEA =  0xFF;      // bin 11111111     	  //   '1' => µC output      '0' = µC input 
			; SOURCE LINE # 21
	MOV  	OEA,#0FFH
;   IOA =  0x00;		// all LEDs off
			; SOURCE LINE # 22
	CLR  	A
	MOV  	IOA,A
;   
;   // PORT B  ->  SD-Card & LCD signals
;   OEB = 0xEE;	    // bin 11101110           //   '1' => µC output      '0' = µC input 
			; SOURCE LINE # 25
	MOV  	OEB,#0EEH
;   IOB = 0x00;
			; SOURCE LINE # 26
	MOV  	IOB,A
; 
;   // PORT C  ->  Buttons, DAC/ADC signals
;   OEC = 0xD0;  		// bin 11000000 	      //   '1' => µC output      '0' = µC input 
			; SOURCE LINE # 29
	MOV  	OEC,#0D0H
;   IOC = 0x00;
			; SOURCE LINE # 30
	MOV  	IOC,A
; 
;   // PORT D  ->  LCD data ports
;   OED = 0xFF;  		// bin 11111111 	      //   '1' => µC output      '0' = µC input 
			; SOURCE LINE # 33
	MOV  	OED,#0FFH
;   IOD = 0x00;
			; SOURCE LINE # 34
	MOV  	IOD,A
; 
;   // PORT E  ->  SPI & DAC & SD-Card signals
;   OEE = 0x3F;  		// bin 00111111 	      //   '1' => µC output      '0' = µC input 
			; SOURCE LINE # 37
	MOV  	OEE,#03FH
;   IOE = 0x00;
			; SOURCE LINE # 38
	MOV  	IOE,A
; 
; 
; }
			; SOURCE LINE # 41
	RET  	
; END OF InitController

; 
; 
; void MainLoop()

	RSEG  ?PR?MainLoop?PWRBOARD
MainLoop:
	USING	0
			; SOURCE LINE # 44
; 	{
			; SOURCE LINE # 45
; 	 IOB = 0xFF;
			; SOURCE LINE # 46
	MOV  	IOB,#0FFH
; 	 Delay_10();
			; SOURCE LINE # 47
	LCALL	Delay_10
; 	 IOB = 0x00;
			; SOURCE LINE # 48
	CLR  	A
	MOV  	IOB,A
; 	 Delay_10();
			; SOURCE LINE # 49
	LCALL	Delay_10
; 	 IOB = 0xFF;
			; SOURCE LINE # 50
	MOV  	IOB,#0FFH
; 	 Delay_10();
			; SOURCE LINE # 51
	LCALL	Delay_10
; 	 IOB = 0x00;
			; SOURCE LINE # 52
	CLR  	A
	MOV  	IOB,A
; 	 Delay_10();
			; SOURCE LINE # 53
	LCALL	Delay_10
; 	}
			; SOURCE LINE # 54
	RET  	
; END OF MainLoop

; 
; 
; 
; 
; void Delay_10()		                 // Delay 

	RSEG  ?PR?Delay_10?PWRBOARD
Delay_10:
			; SOURCE LINE # 59
;     { 
			; SOURCE LINE # 60
; 			 #pragma asm			 // Assembler Code
; 			 	NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 			 	NOP
	  NOP
; 				NOP
	  NOP
; 
	  
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 				NOP
	  NOP
; 			 	NOP
	  NOP
; 			
	  
; 			 #pragma endasm
; 	}
			; SOURCE LINE # 84
	RET  	
; END OF Delay_10

	END
