Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Anyone have experience with the TDC GP21 chip from ACAM?

Status
Not open for further replies.

cheeloh1

Newbie level 4
Joined
Mar 24, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,345
Hi all,

I was wondering if anyone has any experience using the TDC GP21 chip from ACAM. I am working on a laser rangefinder project where this chip is used but we are having great difficulty communicating with this chip. We are using a PIC16F887 through SPI interface to read and write to the TDC chip, but we are unsure if we are actually writing anything to it because when we read we get data of all zeros. Any help would be appreciated. Thank you.

The chips datasheet can be found here: **broken link removed**
 

Hi,
We used software spi to communicate with tdc-gp21 and this worked properly. here is our function in bascom avr for sending and receiving a byte:

----------------------------------------------------------------
Function Transceive(byval Value As Byte) As Byte

Local Tempb1 As Byte
Local Tempb2 As Byte

For Tempb1 = 1 To 8

Shift Tempb2 , Left

If Value.7 = 0 Then
Reset Mosi
Else
Set Mosi
End If

Set Sck
Reset Sck

If Miso = 0 Then
Reset Tempb2.0
Else
Set Tempb2.0
End If

Shift Value , Left
Next

Transceive = Tempb2

End Function
-----------------------------------------------------------

note that it's necessary to set zero the SSN line during communication so if you want to send multiple bytes, at first you must zero the SSN line, then send and receive all bytes and finally set to one SSN line again.

example for writing data in register 1:
Reset Ssn
Tempb1 = Transceive(0x81) 'write to register 1 (4 bytes)
Tempb1 = Transceive(0x21)
Tempb1 = Transceive(0x44)
Tempb1 = Transceive(0x57)
Tempb1 = Transceive(0x12)
Set Ssn
-------------------------------------------------
finally you should know that it's mandatory to reset the tdc-gp21 by the reset pin as described in datasheet(apply a negative pulse to the reset pin and wait 500us) before any communication.
 

Hi Saeed,
Can you share your H/W details ? Have you put pullups on MISO & INT line ?
Thankyou
 

Hi
you can find the schematic of circuit in attachment
just there is one pull up resistor for reset pin that is not shown in schematic
good luck
 

Attachments

  • TDC-GP21-Board.pdf
    132.9 KB · Views: 102

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top