Location:
Search - unsigned char
Search list
Description: 存储空间的例子,unsigned char idata _buffer [16] _at_ 0xB0
unsigned char data _buffer [16] _at_ 0x60
unsigned char pdata pdata_buffer [16] _at_ 0xFF60
unsigned char xdata xdata_buffer [16] _at_ 0x0200 -storage space example,unsigned char idata idata_buffer [16] _at_ 0xB0 unsigned char data data_buffer [16] _at_ 0x60 unsigned char pdata pdata_buffer [16] _at_ 0xFF60 unsigned char xdata xdata_buffer [16] _at_ 0x0200
Platform: |
Size: 9383 |
Author: 张天河 |
Hits:
Description: c语言中写二进制数。引用例子:
#define Bin(n) LongToBin(0x##n##l)
void main(void)
{
unsigned char c
c = Bin(10101001) // c = 0xA9
}
-Write binary number in C language. Cited code:
#define Bin(n) LongToBin(0x##n##l)
void main(void)
{
unsigned char c
c = Bin(10101001) // c=0xA9
}
Platform: |
Size: 9920 |
Author: 张天河 |
Hits:
Description: 拼音输入法杳询函数: unsigned char code * py_ime(unsigned char input_py_val[])
input_py_val为已输入的拼音码字符串头指针,
反回值为中文的起始地址,当为0时,杳询失败
-Pinyin input method disappear with the function : * unsigned char code py_ime (unsigned char input_py_val []) input_py_val to have imported the first alphabet code string pointer, anti-values back to the starting address of the Chinese, to 12:00 a.m., with the enhancement of failure
Platform: |
Size: 15483 |
Author: 黄永 |
Hits:
Description: 可预置的8位计数器程序的主要部分分析
#include <AT89X51.H> //器件配置文件
#define uchar unsigned char //变量类型的宏定义
#define uint unsigned int
uchar code SEG7[10]={0x03,0x9f,0x25,0x0d,0x99, //0~9的数码管段码
0x49,0x41,0x1f,0x01,0x09}
uchar data cnt[8] //在data区定义8位长度的数组,用来存放计数值
uchar data pre_cnt[8] //在data区定义8位长度的数组,用来存放预置值
sbit drv=P3^4 //定义输出驱动端
bit set_flag //定义工作标志
bit out_flag //定义输出标志
bit keydown_flag //键按下标志
-can preset counter the eight major part of the process analysis # include
Platform: |
Size: 21028 |
Author: wyq |
Hits:
Description: 一个用C51实现单片机的中文输入法,拼音输入法杳询函数: unsigned char code * py_ime(unsigned char input_py_val[])
input_py_val为已输入的拼音码字符串头指针,反回值为中文的起始地址,当为0时,杳询失败
-a C51 with the Chinese input method, Pinyin input method disappear with the function : * unsigned char code py_ime (unsigned char input_py_val []) input_py_val to have imported the first alphabet code string pointer, to the value of anti-Chinese starting addresses, to 12:00 a.m., with the enhancement of failure
Platform: |
Size: 22016 |
Author: 钟高祥 |
Hits:
Description: /*** *5510单片机测试程序
基本测试成功
2005-8-25
write By CW
*** *** *** ****/
#include <reg52.h>
#include <absacc.h>
#define uint unsigned int
#define uchar unsigned char-/******* 5510 microcontroller basic test procedure successfully tested 2005-8-25 wr ite By CW ***************************************** * / # include
Platform: |
Size: 15760 |
Author: wangxing |
Hits:
Description: // Canny算子
void Canny(LPBYTE pGray, SIZE sz, double sigma, double dRatLow,
double dRatHigh, LPBYTE pResult)
{
//经过高斯滤波后的图像
LPBYTE pGaussSmooth
pGaussSmooth = new unsigned char[sz.cx*sz.cy]
//x方向导数的指针
int *pGradX
pGradX = new int[sz.cx*sz.cy]
//y方向
int *pGradY
pGradY = new int[sz.cx*sz.cy]
//梯度的幅度
int *pGradMag
pGradMag = new int[sz.cx*sz.cy]
//对原图高斯滤波
GaussianSmooth(sz,pGray,pGaussSmooth,sigma)
//计算方向导数和梯度的幅度
Grad(sz,pGaussSmooth,pGradX,pGradY,pGradMag)
//应用非最大抑制
NonmaxSuppress(pGradMag,pGradX,pGradY,sz,pResult)
//应用Hysteresis,找到所有边界
Hysteresis(pGradMag,sz,dRatLow,dRatHigh,pResult)
delete[] pGradX
pGradX = NULL
delete[] pGradY
pGradY = NULL
-/ / Canny operator void Canny (LPBYTE pGray. SIZE sz, double sigma, double dRatLow. double dRatHigh. LPBYTE pResult) (/ / after Gaussian filtering of images LPBYTE pGaussS mooth unsigned pGaussSmooth = new char [sz.cx * sz.cy] / / x direction derivative indicators pGradX pGradX int * = new int [ sz.cx * sz.cy] / / int * y direction pGradY pGradY = new int [sz.cx * sz.cy] / / gradient magnitude int * pGradMag pGradMag = new int [sz.cx * sz.cy] / / maximum Gaussian filter to GaussianSmo oth (sz, pGray, pGaussSmooth. sigma) / / calculate derivative and the gradient range Grad (sz. pGaussSmooth, pGradX, pGradY. pGradMag) / / non-application of the biggest inhibition NonmaxSuppress (pGradMa g, pGradX, pGradY, sz, pResult) / / Application Hysteresis, find all border Hysteresis (pGradMag, sz, dRa
Platform: |
Size: 54607 |
Author: 王学金 |
Hits:
Description: 此软件包包含了模拟I2C C51程序软件包和ZLG7290的C51程序然后包。
软件包的接口界面:
(1) bit ISendByte(uchar sla,uchar c) (无子地址)写单字节数据 (现行地址写)
(2) bit IRcvByte(uchar sla,uchar *c) (无子地址)读单字节数据 (现行地址读)
(3) bit ISendStr(uchar sla,uchar suba,uchar *s,uchar no)(有子地址)读N字节数据
(4) bit IRcvStr(uchar sla,uchar suba,uchar *s,uchar no) (有子地址)写N字节数据
(5) bit ISendStr(uchar sla,uchar *s,uchar no) (无子地址)写多字节数据
(6) bit IRcvStr(uchar sla,uchar *s,uchar no) (无子地址)读单字节数据
(7) unsigned char ZLG7290_SendData(unsigned char SubAdd,unsigned char Data)
(8) void ZLG7290_SendBuf(unsigned char * disp_buf,unsigned char num)
(9) unsigned char ZLG7290_SendCmd(unsigned char Data1,unsigned char Data2)
(10)unsigned char ZLG7290_GetKey()
-This package contains the I2C C51 process simulation software packages and Wire procedure, and then the C51 packets. The package interface : (1) bit ISendByte (uchar acids, uchar c) (no sons address) to write single-byte data (current addresses to write) (2) bit IRcvByte (uchar acids, uchar * c) (no sons address) Reading single-byte data (the current address of Reading) (3) bit ISendSt r (uchar acids, uchar SUBA, uchar * s, uchar no) (a sub-address) Reading N bytes of data (4) bit IRcvStr (s uchar la, uchar SUBA, uchar * s, uchar no) (a sub-address) N byte write data (5) bit ISendStr (uchar cleavage, uchar * s, uchar no) (no sons address) to write multi-byte data (6) bit IRcvStr (s uchar la, uchar * s, uchar no) (no sons address) Reading single-byte data (7) unsigned char ZLG72 90_SendData
Platform: |
Size: 13491 |
Author: 梁立林 |
Hits:
Description: c8051f020 实时时钟模块程序 内含IIC模块程序/********************** SYSTEM CLOCK 8M********************************/
extern unsigned char xdata currenttime[16]={0}
extern unsigned char xdata settime[16]={
0x00, // control regesiter 1
0x00, // control regesiter 2
0x01, //current second
0x19, //current minute
0x20, //current hour
0x29, //current data
0x04, //current week
0x07, //current month
0x05, //current year
0x00, // alarm value reset
0x00, // alarm value reset
0x00, // alarm value reset
0x00, // alarm value reset
0x00, // clk out disable
0x00, // close timer
0x00,
}
/*********************************************************************/
extern void Current_Time ( void )
extern void Set_Time ( void ) -C8051f020 real-time clock module containing procedures IIC module procedures /********* * * * SYSTEM CLOCK 8M ************** ******************/ extern unsigned char OS ta currenttime [16] = (0) extern unsigned char x settime data [16] = (0x00, / / control regesiter an 0x00, / / control regesiter two 0x01, / / current second 0x19, / / current minute 0x20, / / 0x29 current hour. / / current data 0x04, / / current week hex 07. / / current month 0x05, / / 0x00 current year. / / reset alarm value 0x00, / / reset alarm value 0x00, / / reset alarm value 0x00, / / reset alarm value 0x00, / / clk out disable 0x00, / / close timer 0x00, /**************************************) *******************************/ extern gift id Current_Time (void) extern void Set_Time (v oid)
Platform: |
Size: 30014 |
Author: 梁立林 |
Hits:
Description: C51的一些误区和注意事项(ZT)
1)C忌讳绝对定位。 常看见初学者要求使用_at_,这是一种谬误,把C当作ASM看待了。在C中变量
的定位是编译器的事情,初学者只要定义变量和变量的作 用域,编译器就把一个固定地址给这个
变量。怎么取得这个变量的地址?要用指针。比如unsigned char data x 后,x的地址就是...
-C51 some errors and attention to the business (ZT) 1) C taboo absolute positioning. See beginners often require the use of _at_, this is a fallacy, ASM C as a treat. C variables in the positioning of the compiler things, as long as the definition of beginners variable and the variable scope, Compiler put a fixed address to this variable. How the variables made the address? Use indicators. Unsigned char data such as x, x is the address ...
Platform: |
Size: 189132 |
Author: DCH555 |
Hits:
Description: 24C01的读写程序,C51源代码
调用方式:write_8bit(unsigned char ch) ﹫2001/03/23
函数说明:内函数,私有,用户不直接调用。-24C01 literacy procedures, called C51 source code form : write_8bit (unsigned char ch) @ 2001/03/23 function said Ming : internal function, private users not directly call.
Platform: |
Size: 1040 |
Author: zhousheng |
Hits:
Description: avr应用有关使用注意事项如下
1 在使用例子程序之前将库文件libslavr.a 拷贝到ICCAVR 安装目录下的库文件目录中
即...\\LIB\\目录将头文件slavr.h 拷贝到头文件目录即...\\include\\目录
2 如果想使用库文件中的函数那么设置如下
1) 在文件中应使用 \"#include <slavr.h>\"包含slavr.h 头文件
2) 在工程选项中的Additional LIB 一栏中填入\"slavr\" 使用附加的libslavr.a
库文件(注意引号不需要输入)
3 libslavr.a 库中包含的函数清单如下
1) void write_lcd(unsigned char data,unsigned-avr applied to matters relating to the use of the following examples of the use of a procedure before the document libslav r.a ICCAVR copy of the installation directory of the library catalog is ... \\ LIB \\ directory paper's head lavr.h copy directory that is the end ... \\ include \\ directory 2 if they wish to use the library Functions are then installed a), the document should be used "# include
Platform: |
Size: 10023 |
Author: nndx |
Hits:
Description: #include \"intrins.h\"
unsigned char SystemError
sbit SCL= P1^6 //定义串行时钟线所在口 使用时根据自己的需要
sbit SDA= P1^7 //定义串行数据线所在口 使用时根据自己的需要
#define SomeNOP() {_nop_() _nop_() _nop_() _nop_() }-# include "intrins.h" unsigned char Syste mError sbit SCL = P1 ^ 6 / / definition serial clock line where I use according to their needs sbit SDA P1 = ^ 7 / / definition of serial data lines where I use according to their needs # defin e SomeNOP () (_nop_ () _nop_ () _nop_ () _nop_ (
Platform: |
Size: 229305 |
Author: zhusheng |
Hits:
Description: 曲谱存贮格式 unsigned char code MusicName{音高,音长,音高,音长...., 0,0} 末尾:0,0 表示结束(Important)
音高由三位数字组成: 个位是表示 1~7 这七个音符 十位是表示音符所在的音区:1-低音,2-中音,3-高音 百位表示这个音符是否要升半音: 0-不升,1-升半音。 音长最多由三位数字组成: 个位表示音符的时值,其对应关系是: |数值(n): |0 |1 |2 |3 | 4 | 5 | 6 |几分音符: |1 |2 |4 |8 |16 |32 |64 音符=2^n 十位表示音符的演奏效果(0-2): 0-普通,1-连音,2-顿音 百位是符点位: 0-无符点,1-有符点
调用演奏子程序的格式
Play(乐曲名,调号,升降八度,演奏速度)
|乐曲名 : 要播放的乐曲指针,结尾以(0,0)结束
|调号(0-11) : 是指乐曲升多少个半音演奏
|升降八度(1-3) : 1:降八度, 2:不升不降, 3:升八度
|演奏速度(1-12000): 值越大速度越快 -scores storage format unsigned char code MusicName (pitch. duration, pitch, duration ...., 0,0) end : 0, 0 indicates that the end (Important) pitch by three figures : positions expressed a 7-7 notes that 10 expressed notes of where the tone region : 1-bass, 2-tenor, 3-100 Treble said the notes whether or semitone : 0-level, the 1 - or semitone. Duration of up to three figures : a single-note said that the current value, the relationship is : | value (n) : | 0 | 1 | 2 | 3 | 4 | 5 | 6 | bit notes : | 1 | 2 | 4 | 8 | 16 | 32 | 64 notes n = 2 ^ 10 notes of the concert said the effect (0-2) : 0-general, 1-Link Music, 2 - staccato 100 is in accord point : 0-No website, 1-Fu point of the subroutine call recital format Play (music, and tone mark, landing eight, Play speed) | music Name : to play t
Platform: |
Size: 3746 |
Author: 王建军 |
Hits:
Description: 拼音输入法杳询函数: unsigned char code * py_ime(unsigned char input_py_val[])
input_py_val为已输入的拼音码字符串头指针,
反回值为中文的起始地址,当为0时,杳询失败
应用举例:-Pinyin input method is unable to exercise functions : unsigned char code py_ime * (unsigned char inpu t_py_val []) input_py_val to have imported the first alphabet code string pointer, Back to the Chinese value of the initial address, to 12:00 a.m., disappear with the application for failure :
Platform: |
Size: 11687 |
Author: 王汤 |
Hits:
Description: 这个是我写的MAX187驱动程序
unsigned char bdata Date,Adss
unsigned char idata point,gew,shw
sbit clk=P1^5
sbit cs187=P1^6
sbit dout=P1^7
sbit Abit=Adss^7
sbit Abit1=Adss^0
sbit Dbit=Date^7
sbit Dbit1=Date^0 -I wrote this is the MAX187 driver unsigned char bdata Dat e, Adss unsigned char idata point, gew. shw sbit clk P1 = ^ = 5 sbit cs187 P1 ^ 6 = P1 sbit dout ^ = 7 sbit Abit Adss sbit Abit1 ^ 7 ^ 0 = Adss sbit Dbi t = Date sbit Dbit1 ^ 7 ^ 0 = Date
Platform: |
Size: 44990 |
Author: 胡勋 |
Hits:
Description: 其中的usb端口通信已经作为一个模块来使用,用户只需用以下函数就可以对usb端口进行方便的读写:
unsigned char D12_WriteEndpoint(unsigned char endp, unsigned char len, unsigned char * buf) 此为usb端点输出函数,endp是要进行通信的端点,取值为3(普通端点,最大可一次传输16byte)或5(主端点,最大可一次传输64byte);len为一次输出数据长度;*buf为数据所在位置。
usb端点数据的读操作是由底层函数自动完成的(相关函数为unsigned char D12_ReadEndpoint(unsigned char endp, unsigned char len, unsigned char * buf); 相应端点为2和4),所读到的数据存于GenEpBuf[](普通端点)、MainEpBuf[]或EpBuf[](主端点)中,用户可以直接读取使用。-the usb port which has a communications module to use, Users only need to use the following function, it can usb port for convenient reading and writing : unsigned char D12_WriteEndpoint (unsigned ch ar endp, unsigned char len. unsigned char * buf) usb endpoint of this output function, endp to the endpoint of communication, value for the three (general endpoint. a maximum transmission 16 byte), or 5 (the main endpoint, a maximum transmission 64byte); len output data for a length; * buf for data location. Usb endpoint data read operation from the bottom of the complete automatic function (correlation function for unsigned char D12_ReadEndpoint (unsigned char endp. unsigned char len, unsigned char * buf); corresponding endpoint of 2 and 4), which read data stored in GenEpBuf [] (General e
Platform: |
Size: 12683 |
Author: 刘军 |
Hits:
Description: // Canny算子
void Canny(LPBYTE pGray, SIZE sz, double sigma, double dRatLow,
double dRatHigh, LPBYTE pResult)
{
//经过高斯滤波后的图像
LPBYTE pGaussSmooth
pGaussSmooth = new unsigned char[sz.cx*sz.cy]
//x方向导数的指针
int *pGradX
pGradX = new int[sz.cx*sz.cy]
//y方向
int *pGradY
pGradY = new int[sz.cx*sz.cy]
//梯度的幅度
int *pGradMag
pGradMag = new int[sz.cx*sz.cy]
//对原图高斯滤波
GaussianSmooth(sz,pGray,pGaussSmooth,sigma)
//计算方向导数和梯度的幅度
Grad(sz,pGaussSmooth,pGradX,pGradY,pGradMag)
//应用非最大抑制
NonmaxSuppress(pGradMag,pGradX,pGradY,sz,pResult)
//应用Hysteresis,找到所有边界
Hysteresis(pGradMag,sz,dRatLow,dRatHigh,pResult)
delete[] pGradX
pGradX = NULL
delete[] pGradY
pGradY = NULL
-//Canny operator void Canny (LPBYTE pGray. SIZE sz, double sigma, double dRatLow. double dRatHigh. LPBYTE pResult) (//after Gaussian filtering of images LPBYTE pGaussS mooth unsigned pGaussSmooth = new char [sz.cx* sz.cy]// x direction derivative indicators pGradX pGradX int* = new int [ sz.cx* sz.cy]// int* y direction pGradY pGradY = new int [sz.cx* sz.cy]// gradient magnitude int* pGradMag pGradMag = new int [sz.cx* sz.cy]// maximum Gaussian filter to GaussianSmo oth (sz, pGray, pGaussSmooth. sigma)// calculate derivative and the gradient range Grad (sz. pGaussSmooth, pGradX, pGradY. pGradMag)// non-application of the biggest inhibition NonmaxSuppress (pGradMa g, pGradX, pGradY, sz, pResult)// Application Hysteresis, find all border Hysteresis (pGradMag, sz, dRa
Platform: |
Size: 54272 |
Author: 王学金 |
Hits:
Description: 这个是我写的MAX187驱动程序
unsigned char bdata Date,Adss
unsigned char idata point,gew,shw
sbit clk=P1^5
sbit cs187=P1^6
sbit dout=P1^7
sbit Abit=Adss^7
sbit Abit1=Adss^0
sbit Dbit=Date^7
sbit Dbit1=Date^0 -I wrote this is the MAX187 driver unsigned char bdata Dat e, Adss unsigned char idata point, gew. shw sbit clk P1 = ^ = 5 sbit cs187 P1 ^ 6 = P1 sbit dout ^ = 7 sbit Abit Adss sbit Abit1 ^ 7 ^ 0 = Adss sbit Dbi t = Date sbit Dbit1 ^ 7 ^ 0 = Date
Platform: |
Size: 45056 |
Author: 胡勋 |
Hits:
Description: 很完整的51串口程序
包括如下:
串口中断服务程序,仅需做简单调用即可完成串口输入输出的处理
出入均设有缓冲区,大小可任意设置。
可供使用的函数名:
char getbyte(void) 从接收缓冲区取一个byte,如不想等待则在调用前检测inbufsign是否为1。
getline(char idata *line, unsigned char n) 获取一行数据回车结束,必须定义最大输入字符数
putbyte(char c) 放入一个字节到发送缓冲区
putbytes(unsigned char *outplace,j) 放一串数据到发送缓冲区,自定义长度
putstring(unsigned char code *puts) 发送一个定义在程序存储区的字符串到串口
puthex(unsigned char c) 发送一个字节的hex码,分成两个字节发。
putchar(uchar c,uchar j) 输出一个无符号字符数的十进制表示,必须标示小数点的位置,自动删除前面无用的零
putint(uint ui,uchar j) 输出一个无符号整型数的十进制表示,必须标示小数点的位置,自动删除前面无用的零
delay(unsigned char d) 延时n x 100ns
putinbuf(uchar c) 人工输入一个字符到输入缓冲区
CR 发送一个回车换行-err
Platform: |
Size: 3072 |
Author: eacho |
Hits:
« 12
3
4
5
6
7
8
9
10
...
17
»