共2条
1/1 1 跳转至页
51 谁能给我一个型号!我现在急需价位较低的51内核双串口单片机!
问
我现在急需价位较低的51内核双串口单片机!
答 1:
用4016切换;或做个软的,3,4个都可以如题 wire@tom.com
答 2:
给你个2400的tx_byte: clr c
mov r6,#8
clr p1.6 ; low for start bit
resend: call one ; delay for one bit
rrc a ; shift to c
jnc send_0 ; low, go sending 0
setb p1.6 ; high, send 1
decr6: djnz r6, resend ; r6 = r6-1
call one
stop_bit: setb p1.6 ; high for stop bit
call one
ret
send_0:
clr p1.6 ; low, send 0
sjmp decr6
;77777777777777777777777777777777777777777777777777777777777777777777777
rx_byte:
mov r6,#8
fromfi: jb p1.7,$ ; high, if f0 being set
call one_half ; delay halt bit
gogo: call rxone ; delay one bit
jb p1.7,setone ; high, go to set 1
clr c ; low set 0
shift: rrc a ; shift to c
djnz r6,gogo ; next bit
call one
ret
setone: setb c ; set 1
sjmp shift
fi: jnb f0,fromfi ; f0=0
ret ; f0=1
one: mov r5,#197 ; delay for 197x2 instruction time
djnz r5,$
ret
one_half:
mov r5,#90 ; delay for 96 instruction time
djnz r5,$
ret
rxone: mov r5,#192;
djnz r5,$
ret
答 3: 用77E58算了 答 4: 速率不高的话可以用软件模拟一个 答 5: 价位较低多少? 25元以下可以吗
mov r6,#8
clr p1.6 ; low for start bit
resend: call one ; delay for one bit
rrc a ; shift to c
jnc send_0 ; low, go sending 0
setb p1.6 ; high, send 1
decr6: djnz r6, resend ; r6 = r6-1
call one
stop_bit: setb p1.6 ; high for stop bit
call one
ret
send_0:
clr p1.6 ; low, send 0
sjmp decr6
;77777777777777777777777777777777777777777777777777777777777777777777777
rx_byte:
mov r6,#8
fromfi: jb p1.7,$ ; high, if f0 being set
call one_half ; delay halt bit
gogo: call rxone ; delay one bit
jb p1.7,setone ; high, go to set 1
clr c ; low set 0
shift: rrc a ; shift to c
djnz r6,gogo ; next bit
call one
ret
setone: setb c ; set 1
sjmp shift
fi: jnb f0,fromfi ; f0=0
ret ; f0=1
one: mov r5,#197 ; delay for 197x2 instruction time
djnz r5,$
ret
one_half:
mov r5,#90 ; delay for 96 instruction time
djnz r5,$
ret
rxone: mov r5,#192;
djnz r5,$
ret
答 3: 用77E58算了 答 4: 速率不高的话可以用软件模拟一个 答 5: 价位较低多少? 25元以下可以吗
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |