I’m using PIC-18f4520, i want to switch on my led in position RB7. I checked with the oscilloscope that the bits arrive at the RX pin of the PIC. I have connected the TX pin of BT to the RX pin of the PIC. But when I give the command on the phone I do not turn on the LED.
I don’t have the schematic in Proteus, I’ll text it really.
How are you checking your code? Are you using hardware or simulation? You said you checked with oscilloscope that the bit arrives at RX of PIC? what bit arrives? is the baud rate you are transmitting with the same as the baud rate of your PIC? if the baud rate is different you might receive some bit on RX but wrong bit and if that bit is not ‘C’ you won’t switch ON your LED.