Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
pic code

C++
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);}

      }}}

I have connected the code with proteus but it does't work with my vb code

VB
SerialPort1.Write("g")
SerialPort1.Write("s")
Posted
Updated 20-Mar-14 4:29am
v2
Comments
Richard MacCutchan 20-Mar-14 11:41am    
it does't work
Please provide proper details, we cannot guess what that means.
Member 10567184 21-Mar-14 3:03am    
I just want to turn ON the led at port B..the data from vb was receive by using virtual serial port, but when interfacing with proteus the led did't turn ON..

Mohibur Rashid 20-Mar-14 23:43pm    
was it wired properly?
Member 10567184 21-Mar-14 3:00am    
I just follow this tutorial http://www.youtube.com/watch?v=Kj-NLrP_F6k but when interfacing with proteus the led did't working
Michael Haephrati 29-Jun-14 15:59pm    
The question is tagged as vb.net but looks like c++

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900