Are you sending somthing from the PC and the random numbers are the echo?
Are you sending somthing from the PC and the random numbers are the echo?
Dave
Always wear safety glasses while programming.
Hi everyone,
It suppose to lit a LED on PortB.1 when "A" is pressed. Connecting the EGBC TX--> PIC Rx causes the random generation number.mackrackit: Are you sending somthing from the PC and the random numbers are the echo?
I tried that but it gives character sysmbols..pls see the attachment.dhouston: SerOut to the PC serial port needs to be inverted - use N9600.
I'm confused. Your code example comment says "PortC.6 as Transmit pin to pc com1" but your latest schematic appears to indicate another wireless connection to the PC.
A wired RS232 connection needs N9600 for SerOut while a wireless connection may use T9600. A wireless connection may also be noisy, leading to the random data of your first example.
Hi, sorry if it is confusing. I forgot to tell you that I'm using my mobile to send data to the bluetooth module and hopefully have it echoed to the Pc. My code for my phone is tested, it can send letter 'A' from phone to Pc thru bluetooth communication. And hoping it will the same way to pic with a bluetooth module. So this noise is normal? How can I prevent it from generating. I tried to observe while sending from my phone to pic if 65 is recieved, unfortunately it is not.
Code:IF B2 = 65 then ' waits for "A" If PortB.1 = 0 then High PortB.1 else Low PortB.1 Endif else Endif
Last edited by mbox; - 7th October 2009 at 08:17.
It may just be that your schematic is what confused me. I'm not familiar with Bluetooth serial adapters but would expect them to handle the noise suppression automatically.
Try this:Code:start: SerIn PortB.0,T9600,["A"] 'wait for "A" on PortB.0 If PortB.1 = 0 Then SerOut PORTC.6,N9600,["HIGH",13,10] High PortB.1 Else Serout PORTC.6,N9600,["LOW",13,10] Low PortB.1 Endif GoTo start
I tried using the code but I got character symbols coming out.
I tried to make them all T9600 and I got High and Low display...and I'm not even sending any data yet to the module..
Bookmarks