DA-660-8/16-LXUser’s Manual
Programmer’s Guide
5-10
Baudrate inaccuracy
Divisor = 921600/Target Baudrate. (Only Integer part)
ENUM = 8 * (921600/Target - Divisor) ( Round up or down)
Inaccuracy = ( (Target Baud Rate – 921600/(D (ENUM/8))) / Target Baud Rate )* 100%
E.g.,
To calculate 500000 bps
Divisor = 1, ENUM = 7,
Inaccuracy = 1.7%
*The Inaccuracy should be less than 2% for reliability.
Special Note
1.
If the target baudrate is not a special baudrate (e.g. 50, 75, 110, 134, 150, 200, 300, 600, 1200,
1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600), the termios
cflag will be set to the same flag.
2.
If you use stty to get the serial information, you will get a speed equal to 0.
LCM
The DA-660 only supports text mode display, with screen size of 16 cols by 8 rows. The device
node is
/dev/lcm
. See the examples given below. We provide a private struct defined as follows:
typedef struct lcm_xy {
int x; // col value, the arrange is 0 – 15
int y; // raw value, the arrange is 0 – 7
} lcm_xy_t;
Examples
int ioctl(fd, IOCTL_LCM_GOTO_XY, lcm_xy_t *pos);
Move the cursor position to x(col),y(raw) position. The argument 3 is the new position value.
int ioctl(fd, IOCTL_LCM_CLS, NULL);
Clears the LCM display.
int ioctl(fd, IOCTL_LCM_CLEAN_LINE, NULL);
Change one line to all spaces in the current row, and move the cursor to the 0 column of this row.
int ioctl(fd, IOCTL_LCM_GET_XY, lcm_xy_t *pos);
Get the current cursor position. The value will be returned in argument 3.
int ioctl(fd, IOCTL_LCM_BACK_LIGH_ON, NULL);
Turns the LCM backlight on.
int ioctl(fd, IOCTL_LCM_BACK_LIGHT_OFF, NULL);
Turns the LCM backlight off.