Linx RF -> HSERIN time delay / time critical app...


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

    Default Linx RF -> HSERIN time delay / time critical app...

    Got a time-critical application (a photo flash radio trigger). The shutter is open for 16.7mS max. it takes about 2mS for the flash to completely fire. I'd also like to have a confirmation that the flash fire command was received. Instead of having a dedicated transmitter and receiver, I'd like to have units capable of doing both simultaneously.

    I'm using Linx SC-PA modules with a 33,600bps max data rate and 3mS typical, 5mS max RX->TX transition time. I know I can eliminate that delay by setting to TX mode at power-on. I'm using a PIC with a hardware UART (currently a 16F876A, but any 28pin will do).

    I was thinking of sending one-character commands to minimize the data transfer time.

    Does anyone know what sort of delay I might expect between the time I query the serial port and when the data is available? Or what PIC, OSC speed and Baud rate I should use to minimize the time delay?

    Also, is there a way to determine when a byte has been received by the UART so that it's not sitting waiting on data or a timeout? I saw something about RCIF in the datasheet. Is it possible to read this and do the HSERIN command if set?

    Thank you,

    Bryan A. Thompson
    [email protected]

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    here's an interesting project batee.

    Of course to minimize delay you should use the highest baud rate such 9600. For this 20MHZ crystal is recommended.

    "I was thinking of sending one-character commands to minimize the data transfer time."

    indeed!

    "Also, is there a way to determine when a byte has been received by the UART so that it's not sitting waiting on data or a timeout? I saw something about RCIF in the datasheet. Is it possible to read this and do the HSERIN command if set?"

    there's a few way to do it. Of course by Usart Interrupt or waiting for specific receive character. this one will work with specefic character.

    Code:
    DEFINE OSC 20
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1
    
    Hserin [wait ("c")] ;wait for c
    ;do the rest here
    you can use every PIC with internal USART like 16F628 and such other to do your job. Be sure to choose one who an run at 20MHZ. Maybe PIC12F629 or PIC12F675 running at 20MHZ with DEBUG, DEBUGIN command can also do the job too.

    hope this help

    regards
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. 16F628A - Stops if release power switch.
    By dene12 in forum General
    Replies: 16
    Last Post: - 14th February 2009, 07:57
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. RF Transmitter
    By et_Fong in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th October 2005, 16:34
  4. Memory Space of the PIC16F84...
    By Tear in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 1st July 2005, 19:55
  5. Problem with saving to EEPROM...
    By Tear in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st July 2005, 00:10

Members who have read this thread : 1

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