- 66 -
Appendix
4.5 Digital I/O Setting
Below are the source codes written in assembly & C, please take them
for Digital I/O application examples.
C Language Code
/*
*/
/*
I have been a long time to write program by C. */
/*
*/
/*-----
Include Header Area -----*/
#include "math.h"
#include "stdio.h"
#include "dos.h"
/*-----
routing, sub-routing -----*/
void main()
outportb(0x2e, 0x07); /* point to logical device */
outportb(0x2e+1, 0x07); /* Select logical device 7 */
outportb(0x2e, 0x72); /* Select Index 72h */
outportb(0x2e+1, 0xC0); /* Set 72h bit7=1; Unit Second */
/* Set 72h bit7=0; Unit Minute */
/* Set 72h bit6=1; WDT output
through KRST Enable*/
/* Set 72h bit6=0; WDT output
through KRST Disable*/
outportb(0x2e, 0x7); /* Set Index 7h */
outportb(0x2e+1, 0x00); /* Set 7h to 00h */
outportb(0x2e, 0x7); /* Set Index 7h */
outportb(0x2e+1, 0x0); /* Set 7h to 0h ( unit time) */
}
Содержание EmCORE-i2702
Страница 1: ...EmCORE i2702 3 5 Miniboard User s Manual Version 1 0 2010 10 ...
Страница 2: ...This page is intentionally left blank ...
Страница 5: ... Introduction 1 Chapter 1 Introduction ...
Страница 11: ... Introduction 1 10 Board Dimensions ...
Страница 13: ... Installation 2 Chapter 2 Installation Chapter 2 Installation ...
Страница 15: ... 11 Installation 2 2 Jumpers and Connectors ...
Страница 40: ... 36 BIOS 3 Chapter 3 BIOS ...
Страница 50: ... 46 BIOS OnChip IDE Device 3 6 Integrated Peripherals ...
Страница 57: ... 53 BIOS 3 9 PC Health Status System Temperature 5V CPU Temperature CPU FAN Speed 3 3V ...
Страница 66: ... 62 Appendix 4 Chapter 4 Appendix Chapter 4 Appendix ...