Help with bluetooth...


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Posts
    1,073

    Default

    Quote Originally Posted by mbox View Post
    I tried that but it gives character sysmbols..pls see the attachment.
    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.

  2. #2
    Join Date
    Oct 2008
    Posts
    65

    Default

    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
    Attached Images Attached Images  
    Last edited by mbox; - 7th October 2009 at 08:17.

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073

    Default

    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

  4. #4
    Join Date
    Oct 2008
    Posts
    65

    Default

    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..
    Attached Images Attached Images   

  5. #5
    Join Date
    Dec 2005
    Posts
    1,073

    Default

    Try
    Code:
    SerIn PortB.0,T9600,["ABC"]

  6. #6
    Join Date
    Oct 2008
    Posts
    65

    Default

    Hi there,
    SerIn PortB.0,T9600,["ABC"]
    No random generation, I then try to send "ABC" but nothing happen.
    I think somethings wrong with my bluetoooth and pic setup.
    I checked the supply its getting only 2.9 instead of 3.3v. I'm going to get IC regulator 3.3v and try to redo the setup...and let you know what happen.
    Attached Images Attached Images

  7. #7
    Join Date
    Dec 2005
    Posts
    1,073

    Default

    It would be helpful to know whether the output from the BT module is noisy. If you do not have an oscilloscope, you can record it as a .WAV file using the LineIn of your soundcard.

Similar Threads

  1. Bluetooth problme with the 16F877A
    By slimpeng in forum Bluetooth
    Replies: 6
    Last Post: - 27th June 2009, 12:06
  2. interaction between Bluetooth and PIC MCU
    By veenadari in forum Bluetooth
    Replies: 1
    Last Post: - 23rd June 2009, 15:03
  3. help my bluetooth and PIC 16F877A?
    By slimpeng in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th March 2008, 06:52
  4. Bluetooth GPS and PBP interfacing
    By RFsolution in forum Bluetooth
    Replies: 0
    Last Post: - 5th January 2006, 11:17
  5. Bluetooth wireless with PIC / HSERIN / DAC
    By rpatel in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th December 2004, 22:13

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts