usart-bluetooth problem


Closed Thread
Results 1 to 33 of 33

Hybrid View

  1. #1
    Join Date
    Dec 2014
    Posts
    14


    Did you find this post helpful? Yes | No

    Default Re: usart-bluetooth problem

    i updated my codes as shown below. lcd always displays "timed out!" even if i send data from terminal. i dont know the reason of this but device is deaf...
    how can it be that the device (pic, i mean) can send data to pc through bluetooth but can not receive data from pc? is it possible? it pairs, sends but can not receive... it looks weird. what can be possible errors about this issue? here is my latest codes and drawings:
    PS: i downloaded Bray's terminal.exe and im using it... as charlie said before, "bray's" is much more better than pussy, sorry putty
    Code:
    DEFINE OSC 4
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 0
    DEFINE LCD_EREG PORTD
    DEFINE LCD_EBIT 5
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT 6
    DEFINE LCD_RWREG PORTD
    DEFINE LCD_RWBIT 4
    DEFINE LCD_BITS 4
    DEFINE LCD_Lines 2
    
    DEFINE HSER_RCSTA 90h'%10010000  
    DEFINE HSER_TXSTA 24h'%00100100
    DEFINE HSER_CLROERR 1
    DEFINE HSER_BAUD 9600 
    DEFINE HSER_SPBRG 25 
    
    A VAR byte
    symbol LED=PORTE.1
    
    TRISA.0=1
    TRISC.7=1
    TRISC.6=0
    TRISE.1=0  
    
    LCDOUT $FE,1
    LED=1:
    PAUSE 2000:
    LED=0
    PAUSE 1000
    A=0
    LCDOUT $FE,1,"HELLO"
    pause 2000
    
    MAIN: 
    LCDOUT $FE, 1
    HSERIN 100, timesup, [A] 
    LCDOUT $FE, 1
    LCDOUT $80, "A: ", Dec A
    PAUSE 1000
    GOTO MAIN
    
    timesup:
    
    LCDOUT $FE, 1
    LCDOUT $FE, $80, "Timed Out!"
    PAUSE 2000
    GOTO MAIN      
    End
    Name:  IMG_435.jpg
Views: 1610
Size:  83.4 KB

  2. #2
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: usart-bluetooth problem

    Reading the 18F452 Datasheet, RC6 (USART TX) and RC7 (USART RX) are Schmitt Trigger buffered inputs. Also reading the Datasheet (pg. 265 DC Characteristics) shows the following for ST type I/O pins:
    Input Logic Low: Min = VSS, Max = .2 VDD
    Input Logic High: Min = .8 VDD, Max = VDD

    If you are running your PIC at 5 Vdc then that would translate to:
    Input Logic Low: Min = 0V, Max = 1V
    Input Logic High: Min = 4V, Max 5V

    The HC06 running at 3.3V will not output voltage levels that high so the PIC will not recognize a High Logic Level.

    You'll need to run the PIC at 3.3V, if you can, or you'll have to level shift the I/O between the two devices.
    Regards,
    TABSoft

Similar Threads

  1. Bluetooth headset for non bluetooth devices?
    By Normnet in forum Bluetooth
    Replies: 4
    Last Post: - 26th September 2015, 11:22
  2. USART SPI problem !
    By TripleS in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th October 2007, 22:09
  3. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  4. problem with USART
    By leemin in forum Serial
    Replies: 4
    Last Post: - 11th December 2006, 17:56
  5. PIC16F688 USART problem
    By Kees Reedijk in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd October 2006, 04:59

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