AXIOMTEK AX93304 User Manual

AX93304
User’s Manual
ii
This manual has been carefully checked and believed to contain accurate information. Axiomtek Co., Ltd. assumes no responsibility for any infringements of patents or any third partys rights, and any liability arising from such use.
Axiomtek does not warrant or assume any legal liability or responsibility for the accuracy, completeness or usefulness of any information in this document. Axiomtek does not make any commitment to update the information in this manual.
Axiomtek reserves the right to change or revise this document and/or product at any time without notice.
No part of this document may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Axiomtek Co., Ltd.
Copyright 2017 Axiomtek Co., Ltd.
All Rights Reserved January 2017, Version A1 Printed in Taiwan
iii
ESD Precautions
The boards have integrated circuits sensitive to static electricity. To prevent chipsets from electrostatic discharge damage, please take care of the following jobs with precautions:
Do not remove boards or integrated circuits from their anti-static packaging until you are
ready to install them.
Before holding the board or integrated circuit, touch an unpainted portion of the system
unit chassis for a few seconds. It discharges static electricity from your body.
Wear a wrist-grounding strap, available from most electronic component stores, when
handling boards and components.
Trademarks Acknowledgments
Axiomtek is a trademark of Axiomtek Co., Ltd. Windows® is a trademark of Microsoft Corporation.
IBM, PC/AT, PS/2, VGA are trademarks of International Business Machines Corporation. Intel® is a trademark of Intel Corporation.
Other brand names and trademarks are the properties and registered brands of their respective owners.
iv
Table of Contents
Disclaimers ..................................................................................................... ii
ESD Precautions ........................................................................................... iii
Chapter 1 Overview ................................................. 1
1.1 Scope ................................................................................................... 1
1.2 Concept ................................................................................................ 1
Chapter 2 LCM Function specification ................... 3
2.1 System Information ............................................................................. 3
2.2 Data transaction method .................................................................... 3
2.3 AX93304 Function Command ............................................................. 3
2.4 Data transaction pattern ..................................................................... 5
Chapter 3 Control Procedure ................................. 7
3.1 LCM Font Table.................................................................................... 8
AX93304 Users Manual
Overview 1
Chapter 1
Overview
1.1 Scope
The AX93304 LCM module is developed by AXIOMTEK CO., LTD.. It is used for message display which can be programmed to display certain messages through function code. The LCD screen of the LCM supports 2x16 character display.
1.2 Concept
The host system can communicate with AX93304 LCM module. It can decode commands and then trigger the LCM in order to show string and do function enabling through this way. The LCM comes with four key buttons and can pass back the value of function key to COM port for functionality.
AX93304 Users manual
2 Overview
This page is intentionally left blank.
AX93304 Users Manual
LCM Function specification 3
Chapter 2
LCM Function specification
2.1 System Information
1. The host system communicates with LCM module through COM PORT a. Baud Rate = 9600 b. Data Bits = 8 c. Stop Bits = 1 d. Parity Check = None
2. COM Port only use two signal wires for Tx & Rx
3. The host system and the LCM module connect with each other by the pin to pin cable
4. LCM is for 2x16 character display. It can show 16 characters per row, supporting up to 32 characters in two rows. If the string length is over 32 characters, additional will be stored in the RAM of LCM. However, the additional will not be shown off.
2.2 Data transaction method
The transaction is to call API Library by the sample code, then to active the function call.
2.3 AX93304 Function Command
To get the key pressing status, a read key command can be issued to this module, which will check the key-pressing status and reply accordingly. The following are the commands which we can provide.
1. Backlight Control Mode(0xFB, 0xFC): Transmit one byte ASCII 0xFB to turn on LCM backlight Transmit one byte ASCII 0xFC to turn off LCM backlight
2. Keypad listen Mode(0xFD): Transmit one byte ASCII 0xFD to listen key pressing status
3. Command Mode(0xFE):
Command function
1 byte command header
1 byte command function
0xFEh
0x??h
1.
Clear LCM
out(0xFEh)
out(0x01h)
2.
Home cursor
out(0xFEh)
out(0x02h)
3.
LCM Display off
out(0xFEh)
out(0x08h)
4.
LCM Display on
out(0xFEh)
out(0x0Ch)
5.
Cursor on
out(0xFEh)
out(0x0Dh)
6.
Cursor blink on
out(0xFEh)
out(0x0Eh)
7.
Shift cursor left
out(0xFEh)
out(0x10h)
8.
Shift cursor right
out(0xFEh)
out(0x14h)
9.
Shift display left
out(0xFEh)
out(0x18h)
10.
Shift display right
out(0xFEh)
out(0x1Ch)
11.
Set CGRAM address
out(0xFEh)
out(0x40h+offset)
12.
Set cursor position
out(0xFEh)
out(0x80h+Location)
AX93304 Users manual
4 LCM Function specification
Display Address This command can be used to place the cursor at any location. The corresponding address for each character on the screen is as bellows:
Line 1
Character
Location
(addressing)
Character
Location
(addressing)
1
00 9 08
2
01
10
09
3
02
11
0A 4 03
12
0B
5
04
13
0C
6
05
14
0D
7
06
15
0E
8
07
16
0F
Line 2
Character
Location
(addressing)
Character
Location
(addressing)
1
40 9 48
2
41
10
49
3
42
11
4A
4
43
12
4B 5 44
13
4C 6 45
14
4D 7 46
15
4E
8
47
16
4F
4. scape Mode(0xFF): Transmit one byte ASCII 0xFF to escape chars like 0xFB, 0xFC, 0xFD, 0xFE, 0xFF
AX93304 Users Manual
LCM Function specification 5
2.4 Data transaction pattern
API Library
[Host system->AX93304] _init_com(coom,9600,8,1,0); initialize COM Portreturn any value is error parameter, “0”
value is correct. API function
// ccom=1,2,3,4 ;Baud=1200-115200;D_bits=Data bits;S_bits=Stop bits;Prty=Parity bit int _init_com(int ccom,unsigned long baud,int D_bits,int S_bits,int Prty);
_Tx_data(char txd); Send character to LCM
API function
// Pass character to LCM int _Tx_data(char txd);
[AX93304->Host system] _Rx_key(); access the value of button key in AX93304 (LCM), the value is, SW1:0x4E SW2:0x4D SW3:0x4B SW4:0x47 API function
// Read keypad from LCM ,Return ‘N’:SW_1 ‘M’:SW_2 ‘K’:SW_3 ‘G’:SW_4 int _Rx_key(void);
Please refer to the lcm.c sample code for more details in function call
AX93304 Users manual
6 LCM Function specification
This page is intentionally left blank.
AX93304 Users Manual
Control Procedure 7
Chapter 3
Control Procedure
Data out port
HOST SYSTEM COM PORT
AX93304 → LCM
FUNCTION KEY
AX93304
HOST SYSTEM COM PORT
Program file control
Linux Kernel 2.4 / 2.6
Sample code(lcm.c)
Call
API Library(lib93304.so )
Control
LCM
FUNCTION KEY
Control
API Library (lib93304.so )
Call
LCM Sample code(lcm.c)
Steps:
File 93304v2-bsp-user-<x.x.x>.tar.gz
tar zxvf 93304v2-bsp-user-<x.x.x>.tar.gz cd ax93304v2 make (Install ax93304 lcm API shared Library in your system) cd demo make (Compile lcm demo program)
AX93304 Users manual
8 Control Procedure
3.1 LCM Font Table
English font type with Arabic numerals is the same with ASCII code. However, the rule does not include another special character.
Loading...