Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
main.c
Package: length.rar [view]
Upload User: sdjqgc
Upload Date: 2022-08-06
Package Size: 2404k
Code Size: 2k
Category:
Embeded-SCM Develop
Development Platform:
Asm
- //========================================================================
- // The information contained herein is the exclusive property of
- // Sunnnorth Technology Co. And shall not be distributed, reproduced,
- // or disclosed in whole in part without prior written permission.
- // (C) COPYRIGHT 2003 SUNNORTH TECHNOLOGY CO.
- // ALL RIGHTS RESERVED
- // The entire notice above must be reproduced on all authorized copies.
- //========================================================================
- //========================================================================================
- // 工程名称: ultrasonic_low.spj
- // 功能描述: 超声波测距模组V2.0,短距测距程序
- // 涉及的库: CMacro1016.lib SACMV26e.lib
- // 组成文件: main.c ultrasonic_App.c Speech.c IRQ.c
- // DataOS_A.asm hardware.asm isr.asm key.asm Resource.asm
- // 硬件连接:
- //
- // 维护记录: 2006-03-01 V2.0(该版本号相对于原有超声波模组的版号)
- //=========================================================================================
- //========================================================================
- // 文件名称: main.c
- // 功能描述:
- // 维护记录: 2006-03-01 V2.0
- //========================================================================
- #include "SPCE061A.h"
- #include "ultrasonic_App.h"
- //========================================================================
- // 语法格式: int main(void)
- // 实现功能: 主程序
- // 参数: 无
- // 返回值: int 无意义
- //========================================================================
- void F_Key_Scan_Initial(void);
- void F_Key_Scan_ServiceLoop(void);
- unsigned int SP_GetCh(void);
- void Speech_Resource(unsigned int iSpeechIndex);
- void Speech_Result(unsigned int uiResult);
- int main(void)
- {
- unsigned int uiKey;
- unsigned int Back_data;
- F_Key_Scan_Initial();
- Initial_ult();
- while(1)
- {
- uiKey = SP_GetCh();
- switch(uiKey)
- {
- case 0: break;
- case 1:
- Back_data = measure_Times(0);
- if(Back_data==0)
- Speech_Resource(12); //结果为0时表示测量出错,播放"咚"
- else
- Speech_Result(Back_data);
- break;
- case 2:
- break;
- case 3: break;
- default: break;
- }
- F_Key_Scan_ServiceLoop();
- *P_Watchdog_Clear = 0x0001;
- }
- }