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 mackrackit View Post
    But even changing the baud I still think you will need an inverter.
    The manual shows two BT module to µC examples and one BT module to PC serial port example. Only the latter uses an inverter (i.e. their RS232 module).

    The PIC UART will likely have a Schmidt Trigger input - 3.3V is too low to be seen as logic high - 0.8Vdd is required. With SerIn or SerIn2 and TTL inputs, logic high is 2V.

    FIG 14 & FIG 15 of this app note http://www.zbasic.net/appNotes/AN213.pdf shows how to interface to the Schmidt Trigger input.
    Last edited by dhouston; - 5th October 2009 at 11:33. Reason: added link to app note

  2. #2
    Join Date
    Oct 2008
    Posts
    65

    Default

    Hi dhouston, I'm a beginner in electronics and seasonal pbp programmer. I hope I got this one, so in order to communicate properly I must use a Logic Translation Level between EGBC-0 and pic like the one below..
    BTW thanks for the link...I will experiment with it and post my updates.
    Attached Images Attached Images  
    Last edited by mbox; - 6th October 2009 at 03:29.

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

    Default

    @mbox

    The simplest solution would be to use SerIn or SerIn2 on a pin that has a TTL buffer. Read the I/O Ports section of the datasheet for the 16F877a as well as the Electrical Characteristics section. Ports A & B have TTL buffers on the pins and only need 2.0V for logic high.

    If you must use the hardware UART, I suggest using the circuit in FIG 15 of the app note. If you use FIG 14, the diode forward voltage drop may be marginal for the logic low input voltage (1.0V) unless you use a germanium diode. Read the explanation in the app note.

    EDIT: Also, if you use the diode, use the attached circuit.
    Attached Images Attached Images  
    Last edited by dhouston; - 6th October 2009 at 04:32.

  4. #4
    Join Date
    Oct 2008
    Posts
    65

    Default

    Hi to all, I change the codes and Port pin setup, at this time I used the SERIN and SEROUT...
    Code:
    include "modedefs.bas"
    B2 var byte 
    pause 500
    
    start:   
    
           serin 0,T9600,B2 ''''''''''''''''''''''''''' PortB.0 as my recieve pin from bluetooth Tx
           Serout PORTC.6, T9600, [#B2,10,13] '''''''''''''''''''''''PortC.6 as Transmit pin	 to pc com1
    
    	   IF B2 = 65 then  
    	       If PortB.1 = 0 then
    	          High PortB.1 
               else
                  Low PortB.1
               Endif 
               else
               	            
    	   ENdif
    goto start
    I noticed that it is generating random numbers pls see the attach...anybody knows what's the reason?

    Thanks in advance
    mbox
    Attached Images Attached Images  
    Last edited by mbox; - 6th October 2009 at 07:34.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Are you sending somthing from the PC and the random numbers are the echo?
    Dave
    Always wear safety glasses while programming.

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

    Default

    SerOut to the PC serial port needs to be inverted - use N9600.

  7. #7
    Join Date
    Oct 2008
    Posts
    65

    Default

    Hi everyone,

    mackrackit: Are you sending somthing from the PC and the random numbers are the echo?
    It suppose to lit a LED on PortB.1 when "A" is pressed. Connecting the EGBC TX--> PIC Rx causes the random generation number.

    dhouston: SerOut to the PC serial port needs to be inverted - use N9600.
    I tried that but it gives character sysmbols..pls see the attachment.
    Attached Images Attached Images   

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