針對目前使用的RS232接口數字化B超鍵盤存在PC主機啟動時不能設置BIOS,提出一種PS2鍵盤的設計方法。基于W78E052D單片機,采用8通道串行A/D轉換器設計了8個TGC電位器信息采集電路,電位器位置信息以鍵盤掃描碼序列形式發送,正交編碼器信號通過XC9536XL轉換為單片機可接收的中斷信號,軟件接收到中斷信息后等效處理成按鍵。結果表明,在滿足開機可設置BIOS同時,又可實現超聲特有功能,不需要專門設計驅動程序,接口簡單,成本低。
Abstract: Aiming at the problem of the digital ultrasonic diagnostic imaging system keyboard with RS232 interface currently used couldn?蒺t set the BIOS when the PC boot, this paper proposed a design method of PS2 keyboards. Based on W78E052D microcontroller,designed eight TGC potentiometers information acquisition circuit with 8-channel serial A/D converter, potentiometer position information sent out with keyboard scan code sequentially.The control circuit based on XC9536 CPLD is used for converting the mechanical actions of the encoders into the signals that can be identified by the MCU, software received interrupt information and equivalently treatmented as key. The results show that the BIOS can be set to meet the boot, ultrasound specific functionality can be achieved at the same time, it does not require specially designed driver,the interface is simple and low cost.
結合單片機和M a t l a b 兩者的優點,基于事件驅動的中斷通信機制,提出一種Matlab 環境下PC 機與
單片機實時串行通信及數據處理的方法;完成單片機數據采集系統與PC 機的RS-232/RS-485 串行通
信及其通信數據的分析處理、文件存儲、F I R 濾波及圖形顯示;簡化系統開發流程,提高開發效率。
該方法已成功應用于一個P I C 1 6 F 8 7 6 單片機應用系統實例之中
本書提供用J B u i l d e r開發數據庫應用程序、創建分布式應用程序以及編寫J a v a B e a n
組件的高級資料。它包括下列幾個部分:
• 第一部分是“開發數據庫應用程序”,它提供關于使用J b u i l d e r的D a t a E x p r e s s數據
庫體系結構的信息,并解釋原始數據組件和類之間的相互關系,以及怎樣使用它
們來創建你的數據庫應用程序。它還解釋怎樣使用Data Modeler(數據模型器)和
Application Generator(應用程序生成器)創建數據驅動的客戶機/服務器應用程
序。
• 第二部分是“開發分布式應用程序”,它提供關于使用ORB Explorer、用J B u i l d e r
創建多級的分布應用程序、調試分布式應用程序、用J a v a定義C O R B A接口以及
使用s e r v l e t等的信息。
• 第三部分是“創建J a v a B e a n”,它解釋怎樣開發新的J a v a B e a n組件,描述在組件
開發中涉及的任務, 怎樣使用B e a n s E x p r e s s創建新的J a v a B e a n,以及關于屬性、
事件、B e a nIn f o類和其他方面的詳細情況。
實現最優二叉樹的構造;在此基礎上完成哈夫曼編碼器與譯碼器。 假設報文中只會出現如下表所示的字符:
字符 A B C D E F G H I J K L M N
頻度 186 64 13 22 32 103 21 15 47 57 1 5 32 20 57
字符 O P Q R S T U V W X Y Z , .
頻度 63 15 1 48 51 80 23 8 18 1 16 1 6 2
要求完成的系統應具備如下的功能:
1.初始化。從終端(文件)讀入字符集的數據信息,。建立哈夫曼樹。
2.編碼:利用已建好的哈夫曼樹對明文文件進行編碼,并存入目標文件(哈夫曼碼文件)。
3.譯碼:利用已建好的哈夫曼樹對目標文件(哈夫曼碼文件)進行編碼,并存入指定的明文文件。
4.輸出哈夫曼編碼文件:輸出每一個字符的哈夫曼編碼。