Holtek Decoder


Closed Thread
Results 1 to 17 of 17

Thread: Holtek Decoder

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    This might help
    http://www.holtek.com.tw/english/tec...df/ha0040e.pdf

    Or this
    http://www.picbasic.co.uk/forum/showthread.php?t=6436

    With the help I received from the above thread, PIC to PIC and no wires!! Also has more capability as it is not limited to 8 or 10 signals.

    If you want, I can post the good code when I get back to the shop(can not do it from memory)
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    I've done pic to pic with no wires - I'm wanting holtek to pic with no wires - the remote I've bought has a holtek chip in it so need to decode that - do you have code for a holtek? If so I'd love to see it

    Cheers

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    There are far, far too many variables.

    There are several different Holtek chips and the chip frequency (and thus the pulse/space duration) depends on the value of the resistor used for the oscillator. Some use a two state code, others use a three state code. You need to study the Holtek datasheets for the specific encoder and decoder chips you are using.

    Does wireless mean IR or RF? If RF, ASK or FSK?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by George View Post
    I've done pic to pic with no wires - I'm wanting holtek to pic with no wires - the remote I've bought has a holtek chip in it so need to decode that - do you have code for a holtek? If so I'd love to see it

    Cheers
    Sorry, no code for the holteks.

    In your case just buy the correct decoder.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    I've attached a GIF showing the output waveform from the HT640 sending all ONES, all ZEROS, all ELSE, and repeating those three in ONE, ZERO, ELSE order.

    First, you have to pick the start sequence out of the air (usually signals are sent 3-5 times with the first few setting the receiver AGC) and then capture and decipher the following bitstream. You might do this using the CCP hardware in Capture mode, resetting the polarity after each interrupt but it's not a simple task.

    As you can see there are two different pulse widths and two different space widths. The actual widths will depend on the transmitter oscillator frequency.

    The best advice is to use the Holtek decoder chip with the same oscillator frequency as used by the transmitter.
    Attached Images Attached Images  
    Last edited by dhouston; - 27th June 2007 at 18:48.

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


    Did you find this post helpful? Yes | No

    Default

    The attached code example will decode the Holtek HT640.

    Download the Linx .PDF below for details of the 640 data
    structure.

    http://www.linxtechnologies.com/Docu...datastruct.pdf
    Attached Files Attached Files
    Regards,

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

  7. #7
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    Hey thanks Bruce exactly what I was looking for

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


    Did you find this post helpful? Yes | No

    Default

    Hey George,

    You're most welcome. It's pretty old, but it's simple & it works.

    You can improve the synch bit check part by replacing it with this;

    IF PBIT[0] <= PBIT[1] THEN Begin
    IF PBIT[1] >= PBIT[2] THEN Begin
    IF PBIT[2] <= PBIT[3] THEN Begin

    And you can remove this part; IF Loops > 2 THEN Begin

    I stripped a lot of code out before posting it, but missed that line. It's bits &
    peices of a much larger program that was a first go at decoding the Linx
    hand-held.
    Regards,

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

  9. #9
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Most excellent code!

    Bruce,
    Just wanted to thank you for posting that Holtek Decoder code. Really nice job and extremely well documented. I had a job up and running using the Linx CMD-KEY keyfob transmitter in minutes thanks to you. Much appreciated.
    Guy

    Quote Originally Posted by Bruce View Post
    The attached code example will decode the Holtek HT640.

    Download the Linx .PDF below for details of the 640 data
    structure.

    http://www.linxtechnologies.com/Docu...datastruct.pdf
    "Do or do not, there is no try" Yoda

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


    Did you find this post helpful? Yes | No

    Default

    Hi Guy,

    You're very welcome, and thank you too. I'm glad you found a good use for it.

    Edit: If you ever need to create your own PIC chip to emulate the Holtek 8-bit encoder too, I posted a pretty cool project for the Crownhill Amicus board here http://www.myamicus.co.uk/content.ph...Remote-Control with code for one.

    And PC software to control the PIC, so you have a PC-based encoder to control your PIC-based decoder. Pretty fun stuff...
    Last edited by Bruce; - 6th August 2010 at 21:50. Reason: Emulate the Holtek 8-bit encoder too
    Regards,

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

Similar Threads

  1. CTCSS Tone Decoder Sample Program
    By sozkarabacak in forum General
    Replies: 0
    Last Post: - 20th October 2009, 06:15
  2. Req: Basic code for 32 bit hitach ir decoder
    By aa222k in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th January 2009, 05:16
  3. tone decoder
    By grounded in forum General
    Replies: 6
    Last Post: - 30th June 2008, 20:46
  4. Replies: 1
    Last Post: - 10th May 2006, 15:17
  5. 3-to-8 Decoder Program
    By BlackNoir in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th December 2005, 19:51

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