Application of digital signature technology in han

  • Detail

Application of digital signature technology in handheld devices

Abstract: Aiming at the high-cost paper signature in the current logistics industry, this paper analyzes the advantages of digital signature, takes LCD control chip SED1335 and touch screen control chip ADS7846 as examples, puts forward a method of digital signature acquisition on handheld devices, and gives the implementation process of hardware and software

key words: digital signature LCD touch screen SED1335 ADS7846

electronic signature technology is a technology that collects and verifies personal signatures through electronic devices and binds information together to achieve the same effect as paper signature, so as to realize paperless office. In the goods distribution market, the preferred technology to reduce paper as delivery evidence is signature collection technology. When problems occur in business exchange, digital signature will be strong evidence. Therefore, it is hoped that a small, simple and easy to operate handheld signature information collector can replace the commonly used paper signature

1 hardware circuit and its working principle

in many application fields, the touch screen is the basic input device, and the display screen is the output device. To complete the acquisition of signature and other images, you need to input information on the touch screen and display the input information on the display screen. In this paper, SED1335 LCD controller is used to read and write data to LCD screen, and ADS7846 is used to collect data to four wire resistance touch screen. The following describes the hardware implementation process

1.1 LCD controller

SED1335 is a LCD controller produced by Seiko Epson company in Japan. It has the strongest function among similar products. Its structure is shown in Figure 1. The hardware structure of SED1335 can be divided into interface part, internal control part and driving part of driving LCD module LCM. The interface part consists of instruction input buffer, data input buffer, data output buffer and flag register. The selection of these buffer channels is jointly controlled by pin A0 and read and write operation signals. The core of the control unit SED1335 is composed of an oscillator, a functional logic circuit, a display RAM management circuit, a character library and its management circuit, and a timing generator for generating driving timing. The operating frequency of the oscillator can be selected in the range of 1 ~ 10MHz. SED1335 can quickly interpret the instruction code sent by MPU at a high working frequency, put the parameters into the corresponding registers, and trigger the operation of the corresponding logic function circuit. The control part can manage 64KB display RAM, display the embedded character generator and the extended character generator cgram or excgrom. The driving part has the synthetic display ability of each display area, the organization function of transmitting data and the timing pulse signal required for the liquid crystal display module to account for only 5% of the total sales

1.2 ADS7846 touch screen controller

ADS7846 is a new generation of 4-wire resistive touch screen controller compatible with ADS7843 launched by burr Brown company of the United States. Through mechanical touch, the position signal of the touch point can be quickly obtained. It is a typical a/D converter with continuous approximation register. It is internally equipped with + 2.5V reference voltage. The serial interface of microprocessor can measure temperature and touch pressure. It has programmable 8-bit or 12 bit resolution (maximum accuracy can be distinguished 4096) × 4096 points) and automatically enter the low power consumption mode. The power consumption is 750 at 2.7V voltage and 125kHz conversion rate μ W; In off mode, the power consumption is only 0.5 μ W。 Tssop-16 and ssop-16 packages are available. The pin functions are shown in Table 1

pin name function description + VCC logic positive power supply x +, y + is connected to the positive electrode X -, Y - is connected to the negative electrode GND of the touch screen, and Vbat power supply monitoring input terminal penirq interrupt output terminal VREF reference voltage input and output terminal

dout serial data output terminal DCLK external clock input terminal DIN serial data input terminal busy signal output terminal (low level effective) Cs chip selection

in order to complete an A/D conversion, when a touch event occurs on the touch screen, Penirq is low level. The controller detects that penirq is at low level and sends control word to ADS7846 through serial port. When the chip selection CS is low level, after DIN inputs the 8-bit mode control word on the rising edge of DCLK, dout obtains the output corresponding to the control word on the falling edge of DCLK. Fig. 2 is the timing diagram of ADS7846 under each conversion to 16 clock cycles

1.3 touch display circuit

the hardware circuit of terminal touch display is shown in Figure 3. The circuit is mainly composed of microcontroller, LCD and LCD controller, touch screen and touch screen controller, memory, power supply circuit and other parts. The microprocessor adopts W78E58 of Winbond company. This single chip microcomputer is compatible with the industrial standard MCS-51 series single chip microcomputer. It has 3 16 bit timers, 12 interrupt sources, 2 interrupt priorities, 2 enhanced serial ports, 32KB flash EPROM, Programmable Watchdog and double dptr pointers. Two pieces of 62256 are used as the display memory and signature data memory of LCD respectively. The controller of LCD touch screen adopts the controller introduced in the first two sections

the LCD screen used in the design is pda320240a produced by Beijing PENGYUAN company. Pda320240 LCD is a dot matrix display with high precision, which has the advantages of small volume, light weight, flexible display and so on. It has two display modes: text display and graphic display. In order to provide users with a simpler operation interface, many auxiliary function modules of the display screen have been integrated. For pda320240a, only 18 signal lines need to be operated (pin definitions are listed in Table 2) to complete the corresponding display function

pin name function description el1 and EL2 display backlight input line x +, y + is connected to the positive electrode X -, Y - connected to the negative electrode CL1 of the touch screen to display the data latch pulse signal Cl2 display enable signal input penirq interrupt output terminal d0 ~ D3 display the data input line VDD + 5V power supply VSS grounding input line VLCD display driving power supply (+ 18) FLM frame scanning signal input line reset LCD reset disp display screen driving output (grounding)

it can be seen from Fig. 3 that there are four analog signals x +, X -, y +, Y -, It is converted into quantized digital coordinates through ADS7846. After coordinate conversion, it is controlled and displayed on the LCD screen by SED1335. After signing, the image information is read through xd0 ~ xd3 on SED1335, and the signature information is collected and stored in ram62256 (1). The serial port on W78E58 can transmit the signature data to the printer through RS-232-C or wirelessly transmit it to other devices through Bluetooth interface

2 software design

the software implementation of digital signature is to convert the touch coordinates into display coordinates in real time and display them directly on the screen. Then how can many experimental machine manufacturers choose the experimental machine produced by Jinan assay? Give it to the LCD controller for processing, and store the image information such as signature according to the displayed format. The practice shows that this method has strong operability and fast processing speed

the process is shown in Figure 4. MCU is always in the state of waiting for touch after power on. Once INT0 is detected as low level, and INT0 is still low level after 10ms delay, touch occurs. Execute the touch control program touch () to obtain the 12 bit precision coordinate touch of the touch position_ XY, calculate the display coordinate sign on the screen_ XY. Judge whether it is a signature area through coordinates. If so, the touch point will be displayed on the screen. After signing, the touch control program will be jumped out through coordinate judgment, and all information in the signature box will be read out and saved

there are many ways to save data. One is to record the coordinates of the current point and store it in the storage every time an effective touch event occurs; Second, after the signature is completed, scan the signature box displayed on the LCD screen by line, read the data in the signature box, and then store it in the memory. Compare the above two methods. The first one is because each point corresponds to two signature coordinates, for 160 × The signature box of 50 dot matrix has a storage capacity of up to 160 when it is completely blackened × fifty × 2 = 16000 bytes, so this method is more suitable for the collection of a small amount of data; The second method is relatively flexible. Regardless of the number of signatures, the storage capacity of the same signature box is up to 160 × 50/8=1000 bytes, so we use this method

3 application example

at present, whether it is China's postal service or goods delivery company, its goods delivery confirmation information is stored in the form of paper media, and its information collection and use are very inconvenient. For example, the operation of package delivery is that after the postal delivery personnel verify the recipient's certificate, the package recipient fills in the corresponding receiving information on the package form and signs for receipt, and the signed package form is handed over to the post office for storage by the delivery personnel. Now we use the hand-held equipment developed by us for delivery confirmation to replace the original paper signature, in which the signature data is compressed and encoded. Small amount of data and strong confidentiality; The data is stored in nonvolatile memory and can be recovered in case of power failure; The signature data can be sent to the upper computer through the Bluetooth module on the device. After touching the secret, the data can be restored to the state at the time of signature

4 Conclusion

the digital signature handheld device controlled by 51 series single chip microcomputer composed of SED1335 and ADS7846 has the advantages of low cost and clear signature effect. In the embedded field, with the continuous emergence of new devices, some microcontrollers (such as Epson Series MCU and Motorola Longzhu chip) can directly drive the LCD display, which can greatly reduce the design of hardware circuit. (end)

Copyright © 2011 JIN SHI