Old fashion design for PC-104
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

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #include "StdAfx.h"
  2. #include "Timer.h"
  3. #include "SysClock.h"
  4. #include "Ports.h"
  5. #include "ISA.h"
  6. #include "A2D.h"
  7. void main(void)
  8. {
  9. // startup delay
  10. XINT nStartup = 30000;
  11. // enable VDD monitor and Clock missing
  12. SFRPAGE = 0;
  13. RSTSRC = 0x06; // PORSF = 1;
  14. // disable software watchdog timer
  15. WDTCN = 0x0DE;
  16. WDTCN = 0x0AD;
  17. // small delay
  18. while( nStartup-- );
  19. // init hardware
  20. SystemClock_Init();
  21. Port_Init();
  22. HiResTimer0_Init( 48 );
  23. HiResTimer1_Init( 48 );
  24. ADC0_Init();
  25. ISA_Init();
  26. // main loop
  27. ISA_Serve();
  28. }