圣龙扬特-AVR电子

标题: ads7825仿真ADC转换 [打印本页]

作者: 赵彬    时间: 2013-3-17 21:34
标题: ads7825仿真ADC转换



$regfile
= "m16def.dat"
$crystal = 8000000
$baud = 4800
Config Portc = Input
'Portc = 0

Print "rwerergrgrd"
'Pinb.0 Alias Zj

Config Pind.3 = Output
'Portd.1 Alias Busy

Config Pind.4 = Input
'Portd.2 Alias Rc

Config Pind.5 = Output
'Pinb.3 Alias Zj

'Pinb.4 Alias Busy
'Pinb.5 Alias Rc
Set Portd.4
Dim I As Byte
Dim A(2) As Word
Dim Sj As Word
Portd.5 = 1
Portd.3 = 0
Print
"kaishi"

Do

Reset Portd.5
Waitus 1
Set Portd .5
Do

Loop Until Pind.4 = 1


Reset Portd.3
For I = 1 To 2
A(i) = Pinc
Set Portd.3
Next

Print A(1)
Print A(2)
Reset Portd.3
A(1) = A(1) * 256
Sj = A(1) + A(2)
Print Sj
Wait 1
Loop

End
作者: 箫天    时间: 2013-3-17 22:45
我再顶上三篇ads7825的应用文章
[attach]459[/attach]
[attach]460[/attach]
[attach]461[/attach]




欢迎光临 圣龙扬特-AVR电子 (http://avr.cnta.net/) Powered by Discuz! X2.5