如何连接vb与pic16f877a? [英] how to connect vb with pic16f877a?
本文介绍了如何连接vb与pic16f877a?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
图片代码
pic code
char uart_rd;
void main() {
TRISB=0xF0;
PORTB=0x00;
UART1_Init(9600);
delay_ms(100);
while (1) {
if (UART1_Data_Ready()) {
uart_rd = UART1_Read();
if(uart_rd=='g'){PORTB.F0=1;delay_ms(500);PORTB.F0=0;delay_ms(500);}
if(uart_rd=='s'){PORTB.F1=1;delay_ms(500);PORTB.F1=0;delay_ms(500);}
}}}
我已连接使用proteus的代码,但它不适用于我的vb代码
I have connected the code with proteus but it does't work with my vb code
SerialPort1.Write("g")
SerialPort1.Write("s")
推荐答案
这篇关于如何连接vb与pic16f877a?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文