简介
本书介绍8051单片机C语言结合硬件编程应用的工程方法。本书通过一个个实用的例子分析,讲解了C语言实现自动控制和界面的设计方法、技巧以及常见问题剖析。
本书适合8051单片机应用设计人员参考。
目录
第1章c语言基本概念
1—1程序的初步
1—2c程序的运算符
1—3c程序的流程控制
第2章程序的开始
主程序main()
#include“define.h”
#include“cpu8052.h”
#include“global.h”
#include<intrins.h)
#include<math.h)
第3章开机后的启动流程
poweronlnitial()
initialcpu()
initialcpuio()
initialeeprom()
initialvariable()
第4章延时例程
delayxlms(count)
delayxlmsl(count)
.delayxlms2(count)
delayxl0ms(count)
delayxl0msl(count)
delay50us(count)
shortdelay(count)
timer40msdelay(count)
第5章基本输入输出
led_1()
ledon()
inputl()
input2()
input3()
input4()
input5()
第6章中断的应用
countmainl()
timer0isr_2()
countmain2()
countmain3()
one_int0isr()
more_int0isr()
timerlisr_1()
第7章公用函数
unsignvar()
signvar()
bytevariableaddl()
bytevariableadd2()
bytevariablesub()
byteprocess()
wordvariableaddl()
wordvariableadd2()
wordvariablesubl()
wordvariablesub2()
wordprocess()
hex2bcdl(value)
hex2bcd2(value)
hex2bcd3(value)
value255_100(value)
valuel00_128a(value)
valuel00_128b(value)
ramclear()
zerocontinue(counter)
第8章显示器的应用
ledflash0()
ledflashl()
ledflash2()
ledflash3()
ledflash4(ontime,offtime)
ledflash5(count,ontime,offtime)
ledflash6(count,ontime,offtime)
ledflashgetkey(count,ontime,offtime)
ledmainl()
ledmain2()
ledtimming()
ledmain3()
ledmain4()
ledmain5()
第9章蜂鸣器的应用
beepl()
beep2(tone)
beep3(soundlong,tone)
beep4(count,soundlong,tone)
beepgetkey(count,soundlong,tone)
alarml(soundlong,tone)
alarm2(count,soundlong,tone)
alarmgetkey(count,soundlong,tone)
beepled(count,soundlong,tone)
hardwarebeepl()
hardwarebeep2()
hardwarebeep3()
第10章演奏歌曲的应用
sound()
musicl()
music2()
music3()
music4(number)
第11章七段显示器的应用
bcddisplayl()
bcddisplay2()
bcddisplay3()
bcddisplay4()
第12章点阵显示器的应用
dot5x7_displayl()
dot5x7_display2()
dot5x7_display3()
dot5x7_display4()
dot5x7_isplay5()
dot5x7_display6()
第13章解码器的应用
output74138_1()
output74138_2()
output74138_3()
output74138_4()
第14章扩充输出端口的应用
output4094_1(value)
output4094_5(outputstate,value)
第15章脉冲的应用
outpulsel(>
outpulse2(count)
outpulse3()
outpulse4()
pulsedetectl()
pulsedetect2()
pulsedetect3()
pulsegenerator()
pulsedutyl_timerllsr()
pulseduty2_timerllsr()
checkpulsecome()
checkpulsewidth()
checkpulsedata()
checkpulsehilow()
pulsedecoder()
encoderprocess()
第16章多任务器的应用
input4051_1()
input4051_2()
input4051_3()
input4051_4()
input4051_5()
input4051_6()
input4067_1()
input4067_2()
input4067_3()
第17章键盘操作的应用
inputkey1()
inputkey2()
inputkey3()
scankeyl()
scankey2()
getkeyl()
getkey2()
keycheck()
keycountcheck()
keyprocess()
第18章可控制电源电压的应用
im7805()
lm317()
dac08()
sawtoooth()
triangle()
square()
第19章存储芯片93c66的应用
pusheeprom93c66()
eepwritedata(adr,value)
popeeprom93c66()
readrom(adr)
第20章iccbus的应用
iicbus概念
iic总线协议
开始(start)
地址:(address)
读/写(read/write)
确认(acknowedge)
数据(data)
停止(stop)
iicbus时序(timming)
i2cstart()
i2cstop()
i2cwait()
i2csentbyte(bytedata)
i2csentbytel(bytedata)
i2creceivebyte()
sendacknowledge(ack)
i2cbytewrite(device,address,bytedata)
i2cbytewritel(device,address,bytedata)
i2cbytewrite2(device,address,bytedata)
i2cbyteread(device,address)
12csentdata(bytecnt)
12creceivedata(bytecnt)
datasetbit(device,addr,bitno)
dataclearbit(device,addr,bitno)
第21章pwmic的应用
pwm_output()
testdacout()
第22章ic24c08的应用
eeprom24c08命令格式
eeprombytewrite0(bank,addr,value)
eeprombyteread0(bank,addr)
eeprombytewrite(addr,bytedata)
eeprombyteread(addr)
eeprompagewrite()
eeprompageread()
eepromwrite(subaddress,count)
eepromread(subaddress,count)
sendeepromdata()
senddata()
rcvdata()
gomaster(slaveaddr)
sendbyte(value)
sendstop()
ddcchecksum(adr)
第23章存储器ic24c32的应用
eeprom24c32writebyte_1(addr,value)
eeprom24c32writebyte_2(addr,value)
eeprom24c32writemulti_1(addr,count)
eeprom24c32writemulti_2(addr,count)
eeprom24c32readbyte_1(addr)
eeprom24c32readbyte_2(addr)
eeprom24c32readword_1(addr)
eeprom24c32readword_2(addr)
eeprom24c32readmulti_1(addr,count)
eeprom24c32readmulti_2(addr,count)
第24章osdic的应用
osdstart()
osdstop()
osdsentbyte(bytedata)
osdreceivebyte()
osdformata_0(row,col,value)
osdformata(row,col,value)
osdframecontrol(vertd,hord,height,width,rowspace)
osdlocationset(vertical,horizontal)
osdramclear()
osdenable(yes)
osdopenup()
osdnormal()
osdresetfont()
osdclearrow(start,end,color)
osdclearrowl(start,end,color)
osdprintlcon(row,col,icon,color)
osdstringadr0(*string,sel)
osdstringadr(*string,total,sel,fglanguage)
osdprintstring(row,col,color,*string)
osdprintstringl(row,col,color,*string)
osddisablewindowl(sub_window)
osdsetwindow(sub_window,row_start,row_end,
column_start,column_end,attribute)
osdbarhandle(row,col,color)
osdbarhandlel(row,col,color)
osddisplayvalue(row,col,color)
osddisplaycount(count)
附录a头文件
附录b汇编程序
1—1程序的初步
1—2c程序的运算符
1—3c程序的流程控制
第2章程序的开始
主程序main()
#include“define.h”
#include“cpu8052.h”
#include“global.h”
#include<intrins.h)
#include<math.h)
第3章开机后的启动流程
poweronlnitial()
initialcpu()
initialcpuio()
initialeeprom()
initialvariable()
第4章延时例程
delayxlms(count)
delayxlmsl(count)
.delayxlms2(count)
delayxl0ms(count)
delayxl0msl(count)
delay50us(count)
shortdelay(count)
timer40msdelay(count)
第5章基本输入输出
led_1()
ledon()
inputl()
input2()
input3()
input4()
input5()
第6章中断的应用
countmainl()
timer0isr_2()
countmain2()
countmain3()
one_int0isr()
more_int0isr()
timerlisr_1()
第7章公用函数
unsignvar()
signvar()
bytevariableaddl()
bytevariableadd2()
bytevariablesub()
byteprocess()
wordvariableaddl()
wordvariableadd2()
wordvariablesubl()
wordvariablesub2()
wordprocess()
hex2bcdl(value)
hex2bcd2(value)
hex2bcd3(value)
value255_100(value)
valuel00_128a(value)
valuel00_128b(value)
ramclear()
zerocontinue(counter)
第8章显示器的应用
ledflash0()
ledflashl()
ledflash2()
ledflash3()
ledflash4(ontime,offtime)
ledflash5(count,ontime,offtime)
ledflash6(count,ontime,offtime)
ledflashgetkey(count,ontime,offtime)
ledmainl()
ledmain2()
ledtimming()
ledmain3()
ledmain4()
ledmain5()
第9章蜂鸣器的应用
beepl()
beep2(tone)
beep3(soundlong,tone)
beep4(count,soundlong,tone)
beepgetkey(count,soundlong,tone)
alarml(soundlong,tone)
alarm2(count,soundlong,tone)
alarmgetkey(count,soundlong,tone)
beepled(count,soundlong,tone)
hardwarebeepl()
hardwarebeep2()
hardwarebeep3()
第10章演奏歌曲的应用
sound()
musicl()
music2()
music3()
music4(number)
第11章七段显示器的应用
bcddisplayl()
bcddisplay2()
bcddisplay3()
bcddisplay4()
第12章点阵显示器的应用
dot5x7_displayl()
dot5x7_display2()
dot5x7_display3()
dot5x7_display4()
dot5x7_isplay5()
dot5x7_display6()
第13章解码器的应用
output74138_1()
output74138_2()
output74138_3()
output74138_4()
第14章扩充输出端口的应用
output4094_1(value)
output4094_5(outputstate,value)
第15章脉冲的应用
outpulsel(>
outpulse2(count)
outpulse3()
outpulse4()
pulsedetectl()
pulsedetect2()
pulsedetect3()
pulsegenerator()
pulsedutyl_timerllsr()
pulseduty2_timerllsr()
checkpulsecome()
checkpulsewidth()
checkpulsedata()
checkpulsehilow()
pulsedecoder()
encoderprocess()
第16章多任务器的应用
input4051_1()
input4051_2()
input4051_3()
input4051_4()
input4051_5()
input4051_6()
input4067_1()
input4067_2()
input4067_3()
第17章键盘操作的应用
inputkey1()
inputkey2()
inputkey3()
scankeyl()
scankey2()
getkeyl()
getkey2()
keycheck()
keycountcheck()
keyprocess()
第18章可控制电源电压的应用
im7805()
lm317()
dac08()
sawtoooth()
triangle()
square()
第19章存储芯片93c66的应用
pusheeprom93c66()
eepwritedata(adr,value)
popeeprom93c66()
readrom(adr)
第20章iccbus的应用
iicbus概念
iic总线协议
开始(start)
地址:(address)
读/写(read/write)
确认(acknowedge)
数据(data)
停止(stop)
iicbus时序(timming)
i2cstart()
i2cstop()
i2cwait()
i2csentbyte(bytedata)
i2csentbytel(bytedata)
i2creceivebyte()
sendacknowledge(ack)
i2cbytewrite(device,address,bytedata)
i2cbytewritel(device,address,bytedata)
i2cbytewrite2(device,address,bytedata)
i2cbyteread(device,address)
12csentdata(bytecnt)
12creceivedata(bytecnt)
datasetbit(device,addr,bitno)
dataclearbit(device,addr,bitno)
第21章pwmic的应用
pwm_output()
testdacout()
第22章ic24c08的应用
eeprom24c08命令格式
eeprombytewrite0(bank,addr,value)
eeprombyteread0(bank,addr)
eeprombytewrite(addr,bytedata)
eeprombyteread(addr)
eeprompagewrite()
eeprompageread()
eepromwrite(subaddress,count)
eepromread(subaddress,count)
sendeepromdata()
senddata()
rcvdata()
gomaster(slaveaddr)
sendbyte(value)
sendstop()
ddcchecksum(adr)
第23章存储器ic24c32的应用
eeprom24c32writebyte_1(addr,value)
eeprom24c32writebyte_2(addr,value)
eeprom24c32writemulti_1(addr,count)
eeprom24c32writemulti_2(addr,count)
eeprom24c32readbyte_1(addr)
eeprom24c32readbyte_2(addr)
eeprom24c32readword_1(addr)
eeprom24c32readword_2(addr)
eeprom24c32readmulti_1(addr,count)
eeprom24c32readmulti_2(addr,count)
第24章osdic的应用
osdstart()
osdstop()
osdsentbyte(bytedata)
osdreceivebyte()
osdformata_0(row,col,value)
osdformata(row,col,value)
osdframecontrol(vertd,hord,height,width,rowspace)
osdlocationset(vertical,horizontal)
osdramclear()
osdenable(yes)
osdopenup()
osdnormal()
osdresetfont()
osdclearrow(start,end,color)
osdclearrowl(start,end,color)
osdprintlcon(row,col,icon,color)
osdstringadr0(*string,sel)
osdstringadr(*string,total,sel,fglanguage)
osdprintstring(row,col,color,*string)
osdprintstringl(row,col,color,*string)
osddisablewindowl(sub_window)
osdsetwindow(sub_window,row_start,row_end,
column_start,column_end,attribute)
osdbarhandle(row,col,color)
osdbarhandlel(row,col,color)
osddisplayvalue(row,col,color)
osddisplaycount(count)
附录a头文件
附录b汇编程序
8051单片机C语言彻底应用
- 名称
- 类型
- 大小
光盘服务联系方式: 020-38250260 客服QQ:4006604884
云图客服:
用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问
Video Player
×
Audio Player
×
pdf Player
×