Kontron MOPSlcdLX User Manual Page 15

  • Download
  • Add to my manuals
  • Print
  • Page
    / 31
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 14
KTD-S0006-B Page 12 Watchdog and Backlight
MOPSlcdLX Software Guide
4.2 Backlight Example
#include <stdio.h>
#include <dos.h>
#include <conio.h>
#define JIDA16_INT 0x15
#define BACKL_OUT 0xEA29
#define BACKL_IN 0xEA28
#define JIDA_ID 0x4648
#define BOARD_NUM 1
void WriteBacklight (unsigned char value)
{
union REGS regs;
regs.x.ax = BACKL_OUT;
regs.x.dx = JIDA_ID;
regs.h.cl = BOARD_NUM;
regs.h.ch = value;
int86 (JIDA16_INT, &regs, &regs);
}
unsigned char ReadBacklight (void)
{
union REGS regs;
regs.x.ax = BACKL_IN;
regs.x.dx = JIDA_ID;
regs.h.cl = BOARD_NUM;
int86 (JIDA16_INT, &regs, &regs);
return regs.h.ch;
}
void main (void)
{
unsigned char val;
char str [32];
WriteBacklight (0x80);
val = ReadBacklight ();
sprintf (str, "\n%02X\n", val);
printf (str);
}
Page view 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 30 31

Comments to this Manuals

No comments