TDC!! (time to digital converter)


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Posts
    16

    Default TDC!! (time to digital converter)

    hi..

    i try to build laser rangefinder..i collected all information about transmitting,receiving operations including hardware and circuits.
    but i face now a problem with interfacing, i searched and found a method which is called time-of-fly.
    this method uses TDC ( time to digital converter)..which convert a period of time to adigital value ..
    the problem is how to use TDC chip (TDC-GP1 ...) with pic16f877a??

    any one can help me ?

  2. #2
    Join Date
    Jun 2006
    Posts
    37


    Did you find this post helpful? Yes | No

    Default good prject

    Hi!
    A friend of mine was doing the same project with 8051 uc. he failed & then bought a development kit for it. I also read datasheet of TDC-GP1.it shows possible interfacing with a
    microcontroller.It has built in ROM & some addresses are given to read & write to.But the main problem is not reading & writing but to generate result,calibrate it & then reading is easy part.
    here is link to TDC-GP1 datasheet.
    http://www.acam.de/fileadmin/Downloa...h/DB_GP1_e.pdf

    Only if experienced programmers mister_e or Bruce would be kind enough to look at it & give some suggestions and write a skeleton code for it.

  3. #3
    Join Date
    Jun 2006
    Posts
    37


    Did you find this post helpful? Yes | No

    Default some code to get u starting

    here is some code for 16F877A that will read the memory of TDC.its similar to reading an eeprom such with 4 address lines & 8 data lines.
    I dont have TDC to test it so u can do it & then tell me if u succeed.

    Define LCD_DREG PORTD ' Define LCD connections
    Define LCD_DBIT 4
    Define LCD_RSREG PORTD
    Define LCD_RSBIT 2
    Define LCD_EREG PORTD
    Define LCD_EBIT 3
    ADCON1=7
    TRISB=%11111111
    TRISA=%000000
    PORTA=0
    dat VAR byte
    i VAR byte
    add VAr byte
    dat=0
    add=0
    Lcdout $fe, $80, " TDC Reader"

    Pause 3000
    Lcdout $fe, $1
    Lcdout $fe, $80,"Addr: "
    Lcdout $fe, $C0,"Data: "
    while(1)
    FOR i = 0 TO 15 step 1
    porta=i 'CE=1,OE=1,addr=0
    porta.4=0 'Chip Enable
    porta.5=0 'Output Enable

    pauseus 10
    dat=PORTB
    Lcdout $fe, $80,"Addr: "
    Lcdout $fe, $80+8,#i
    Lcdout $fe, $C0,"Data: "
    Lcdout $fe, $C0+8," "
    Lcdout $fe, $C0+8,#dat,":",hex dat

    porta.4=1 'CE
    porta.5=1 'OE

    pause 2000

    if i=15 then
    Lcdout $fe, $80+8," "
    i=0
    endif
    next i


    wend
    end

  4. #4
    katsiusa's Avatar
    katsiusa Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hell_pk View Post
    here is some code for 16F877A that will read the memory of TDC.its similar to reading an eeprom such with 4 address lines & 8 data lines.
    I dont have TDC to test it so u can do it & then tell me if u succeed.

    Define LCD_DREG PORTD ' Define LCD connections
    Define LCD_DBIT 4
    Define LCD_RSREG PORTD
    Define LCD_RSBIT 2
    Define LCD_EREG PORTD
    Define LCD_EBIT 3
    ADCON1=7
    TRISB=%11111111
    TRISA=%000000
    PORTA=0
    dat VAR byte
    i VAR byte
    add VAr byte
    dat=0
    add=0
    Lcdout $fe, $80, " TDC Reader"

    Pause 3000
    Lcdout $fe, $1
    Lcdout $fe, $80,"Addr: "
    Lcdout $fe, $C0,"Data: "
    while(1)
    FOR i = 0 TO 15 step 1
    porta=i 'CE=1,OE=1,addr=0
    porta.4=0 'Chip Enable
    porta.5=0 'Output Enable

    pauseus 10
    dat=PORTB
    Lcdout $fe, $80,"Addr: "
    Lcdout $fe, $80+8,#i
    Lcdout $fe, $C0,"Data: "
    Lcdout $fe, $C0+8," "
    Lcdout $fe, $C0+8,#dat,":",hex dat

    porta.4=1 'CE
    porta.5=1 'OE

    pause 2000

    if i=15 then
    Lcdout $fe, $80+8," "
    i=0
    endif
    next i


    wend
    end
    Dear everyone,

    I have a TDC-GP1 chip and I made a test board to read data from TDC-GP1 chip via pic18f4550. Can you help me some experiences?

    thanks!

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    To complete such a project you need to use optics like spliters and detectors.

    Please have a look here:

    http://www.acam.de/fileadmin/Downloa...sh/AN001_e.pdf

    Ioannis

Similar Threads

  1. I don't understand this code!
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 13th February 2008, 02:55
  2. Digital to Analog Converter
    By kutsi in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 27th June 2007, 19:17
  3. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  4. AD7391 digital to analog converter
    By srob in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th November 2005, 12:07
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

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