Help with bluetooth...


Closed Thread
Results 1 to 25 of 25

Hybrid View

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

    Default

    I have not used an EGBC-04, but looking at the data sheet I will ask...

    Did you set the EGBC-04 for the baud rate you are using? I think it defaults to 9600.
    Did you set it as SLAVE? I think that is what you want.

    And, I would also think an inverter chip (RS232) is needed.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Oct 2008
    Posts
    65

    Default

    Hi Dave, I did adjust it to 9600 and do I really need the inverter chip? As I understand I only need it if I directly connect the BT module to the PC. But instead I have a USB bluetooth attached to PC to link with th EGBC-04. Please help..

    thanks,
    mbox
    Last edited by mbox; - 4th October 2009 at 13:47.

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

    Default

    Quote Originally Posted by mbox View Post
    Hi Dave, I did adjust it to 9600 and do I really need the inverter chip? As I understand I only need it if I directly connect the BT module to the PC. But instead I have a USB bluetooth attached to PC to link with th EGBC-04. Please help..

    thanks,
    mbox
    I do not know for sure but to have a PIC communicate with a PC and using hardware serial the inverter chip is needed.

    I would think that any data passing through the BT module is inverted. As a quick test you could try SERIN2/SEROUT2 and use inverted mode.

    And you have your serial on the PIC set as 2400 baud. The BT is 9600???
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Oct 2008
    Posts
    65

    Default

    Hi Dave, thanks for the replies and I really do appreciate it. Ahm...I'm a little confuse, I hope you dont mind if I'm very slow to pick it all up. But may I explaine my hardware setup to understand what I'm missing.

    PC side: [Port - COM7] [Baud rate - 9600] [Byte size - 8] [Stop bit - 1]
    Sends character data 'A' over COM7 as given(device discovery).

    EBC-04 side: [Operates on 3.3v] [Baud rate - 9600] [Byte size - 8] [Stop bit - 1]

    PIC side: [Baud rate - 2400] PortC.7-->Rx

    Okay, I understand that I need to change 2400 to 9600 from PIC baud rate to communicate with EGBC. There are two option as I see, either I change the baud rate of the EGBC using AT commands by connecting to the pc with LVTTL TO RS-232 CONVERTER or change PIC's baudrate. But I dont have TTL to RS232 converter right now. So changing the Pic's baud rate is my option. I'm using 4MHZ crystal..how do I change it to 9600?

    Thanks,
    mbox
    Attached Images Attached Images  
    Last edited by mbox; - 5th October 2009 at 02:23.

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

    Default

    The easy way to figure the USART settings is to use Mister E's PicMultiCalc
    http://www.picbasic.co.uk/forum/showthread.php?t=4994

    It gives
    Code:
     
    RCSTA = $90 ' Enable serial port & continuous receive
    TXSTA = $24 ' Enable transmit, BRGH = 1
    SPBRG = 25  ' 9600 Baud @ 4MHz, 0.16%
    But even changing the baud I still think you will need an inverter.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Oct 2008
    Posts
    65

    Default

    Okay I will be purchasing my inverter module this week..I will post my updates. I can't wait this to be solve and the same time learn in the process.
    The inverter should be between the Bluetooth and the Pic ?

    Thanks again Dave,
    mbox
    Attached Images Attached Images  
    Last edited by mbox; - 5th October 2009 at 11:20.

  7. #7
    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

  8. #8
    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.

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