You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
567 B
34 lines
567 B
#include "StdAfx.h"
|
|
#include "Timer.h"
|
|
#include "SysClock.h"
|
|
#include "Ports.h"
|
|
#include "ISA.h"
|
|
#include "A2D.h"
|
|
|
|
void main(void)
|
|
{
|
|
// startup delay
|
|
XINT nStartup = 30000;
|
|
|
|
// enable VDD monitor and Clock missing
|
|
SFRPAGE = 0;
|
|
RSTSRC = 0x06; // PORSF = 1;
|
|
|
|
// disable software watchdog timer
|
|
WDTCN = 0x0DE;
|
|
WDTCN = 0x0AD;
|
|
|
|
// small delay
|
|
while( nStartup-- );
|
|
|
|
// init hardware
|
|
SystemClock_Init();
|
|
Port_Init();
|
|
HiResTimer0_Init( 48 );
|
|
HiResTimer1_Init( 48 );
|
|
ADC0_Init();
|
|
ISA_Init();
|
|
|
|
// main loop
|
|
ISA_Serve();
|
|
}
|