Bluetooth wireless with PIC / HSERIN / DAC


Closed Thread
Results 1 to 2 of 2
  1. #1
    rpatel's Avatar
    rpatel Guest

    Unhappy Bluetooth wireless with PIC / HSERIN / DAC

    'Wireless sensor using Bluetooth communication'
    This is the project that my last thread on DAC (digital to analog converter) construction and use of HSERIN issues are about:
    ..
    I have built mini-modules (1"dia. x 0.5"thick) with:
    1. ADXL190 accelerometer sensor
    2. PIC18F252
    3. Smart M ASY90147
    4. Li-polymer coin cell rechargable battery (3.7v x 90mAh)
    The sensor feeds analog to PIC18F252 feeding into a ASY90147 Smart Modular Bluetooth module. This module transmits the sensor's data via Bluetooth. To any paired Bluetooth reciever. The baud rate is hardware locked to 115200 from the PIC18F252 and Bluetooth module.
    ..
    I need to build a receiver that expells a -10v to +10v analog output.
    ..
    The completely standalone Bluetooth reciever(master) I have has a RS232 output. (most Bluetooth units perform protocol calculations on the host's cpu) This Bluetooth reciever has the complete protocol stack computation built-inside itself.
    ..
    This RS232 output needs to be translated to the -10v to +10v analog output,(DAC), the data is only 8bit samples, but at 115200bps or 11,520samples/second...
    ..
    My current design for this DAC (digital to analog converter) is:
    1. MAX3243 (high speed RS232 transceiver, 120kbps capable)
    2. PIC18F252
    4. PWM low pass filter (simple R-C circuit)
    3. Op-amp
    ..The RS232 feeds the MAX3243 (RS232 logic levels), the MAX3243 feeds the PIC18F252 (TTL/CMOS logic levels), The PIC18F252 has a PWM output to a low pass R-C filter circuit to give a 0v to 5v analog output, the 5v analog output feeds into a scaling op-amp circuit to give the -10v to +10v output...
    ..
    I have done the following to make DAC (rs232 to -10v to +10v):
    * Viewed the data out of the MAX3243 on o-scope, looks correct.
    * CANNOT GET THE HSERIN ON PIC18F252 TO WORK
    * Tested and verified the HPWM output of PIC18F252 into 0-5v analog output (works nicely).
    * performed PSPICE simulation and hand calcs of Op-amp circuit design for scaling 0v to 5v into -10 to +10v .
    ..
    !!pls help me with hserin issue!!
    ,
    regards,

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I'm not sure you'll get the hardware USART to work at 115200 bps, but you can work with this data rate using DEBUG & DEBUGIN.

    I've tested this on a 16F876A with max232/PC connection.
    Code:
    DEFINE OSC 20
    DEFINE DEBUG_REG PORTC
    DEFINE DEBUG_BIT 6     ' USART TX pin
    DEFINE DEBUG_MODE 0 ' 0 = true for max232 inversion
    
    DEFINE DEBUGIN_REG PORTC
    DEFINE DEBUGIN_BIT 7  ' USART RX pin
    DEFINE DEBUGIN_MODE 0
    
    DEFINE DEBUG_BAUD 115200
    
    X VAR BYTE
    Y VAR BYTE
    Z VAR BYTE
    
    MAIN:
        DEBUGIN [WAIT("A"),X,Y,Z]
        DEBUG X,Y,Z,13,10
        GOTO MAIN
        
        END
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. interaction between Bluetooth and PIC MCU
    By veenadari in forum Bluetooth
    Replies: 1
    Last Post: - 23rd June 2009, 15:03
  2. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  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. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14
  5. PIC 2 PIC wireless connection
    By MegaADY in forum General
    Replies: 1
    Last Post: - 24th June 2004, 01:46

Members who have read this thread : 2

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