Digital I/O Setting - ROHS EmCORE-i2702 User Manual

3.5”
Table of Contents

Advertisement

outportb(0x2e, 0x07);
outportb(0x2e+1, 0x07);
outportb(0x2e, 0x72);
outportb(0x2e+1, 0xC0);
through KRST Enable*/
through KRST Disable*/
outportb(0x2e, 0x7);
outportb(0x2e+1, 0x00);
outportb(0x2e, 0x7);
outportb(0x2e+1, 0x0);
}

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()
/* point to logical device */
/* Select logical device 7 */
/* Select Index 72h */
/* Set 72h bit7=1; Unit Second */
/* Set 72h bit7=0; Unit Minute */
/* Set 72h bit6=1; WDT output
/* Set 72h bit6=0; WDT output
/* Set Index 7h */
/* Set 7h to 00h */
/* Set Index 7h */
/* Set 7h to 0h ( unit time) */
- 66 -
Appendix
*/
*/

Advertisement

Table of Contents
loading

Table of Contents