Radon Sensor


Closed Thread
Results 1 to 3 of 3

Thread: Radon Sensor

  1. #1
    Join Date
    Feb 2006
    Posts
    89

    Default Radon Sensor

    Hello all again. One of these days I will be able to provide some useful info to the forum. As for now I am just absorbing everyones knowledge. I was wondering if anyone would mind taking a look to see what I am doing wrong. I am trying to interface to a serial radon sensor. Here is what the datasheet says to do:

    Protocol
    The radon protocol uses a standard ASCII charter set. The radon device
    acts as a slave and will not respond with out a request from a host
    computer. All commands and data request to the detector are defined as
    “cxx” where xx is a specified command. Sending a command will always
    result in an acknowledgement or data response.
    All responses from the detector start with a “dxx..” where xx is the
    specified command requested followed by data dd. After all data is sent
    the packet will be follow with a carriage return and a line feed. The
    following are the definition of the commands or data requests.

    The command I am trying to send is c01 which is a little farther down the datasheet. Here is my code. I tried using serout2 but it didn't work. So I decided to use the debug and debugin commands but I can't get a response from the sensor.

    include "MODEDEFS.BAS"
    define LCD_DREG PORTB
    DEFINE LCD_DBIT 0
    DEFINE LCD_BITS 4
    DEFINE LCD_RSREG PORTC
    DEFINE LCD_RSBIT 2
    DEFINE LCD_EREG PORTC
    DEFINE LCD_EBIT 1
    DEFINE LCD_lines 4
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    define OSC 20
    define debug_reg portc
    define debug_bit 7
    define debug_baud 9600
    define debug_mode 0
    define debug_pacing 1000
    define debugin_reg portc
    define debugin_bit 6
    define debugin_mode 0
    radon var byte [10]

    Pause 1000
    lcdout $fe,1
    Start:
    lcdout $fe,$c0,"screen test"
    debug "c01"
    debugin [skip 3, str radon\10]
    lcdout $fe,$80,str radon\10
    Pause 1000

    goto start

    I am using a 16f876a with PBP and 20mhz resonator. At first I tried not using a max232 chip and using the inverted mode as per the PBP manual but it didn't work. So I purchased a NTE7142 serial 232 chip and it still doesn't work. Maybe one of you could explain to this dummy what I am doing wrong. Once again, thanks for all the help.

    Travin

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Have you tried it with the PC instead.

    Hi,

    Have you tried the sensors with Hyperterminal or the MCS Serial Communicator? This would at least prove that the sensor works as intended.
    Regards

    Sougata

  3. #3
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default It does work.

    I can get data by polling the sensor using co1 and then transmitting. Am I sending the correct data on my code?

Similar Threads

  1. Need a cheap touch sensor idea.. here it is
    By mister_e in forum Code Examples
    Replies: 20
    Last Post: - 16th April 2016, 22:42
  2. Ultrasonic distance sensor with PIC16F84A
    By MrRoboto in forum mel PIC BASIC
    Replies: 3
    Last Post: - 29th June 2009, 09:01
  3. PICBASIC PRO-coding for wireless sensor node
    By syazila in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2009, 00:05
  4. Replies: 6
    Last Post: - 18th January 2008, 08:17
  5. RH/Temp Sensor Example Code
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 15th June 2006, 15:55

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