Anyone have experience with the TDC GP21 chip from ACAM?
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: http://www.acam.de/uploads/media/DB_GP21_en_04.pdf
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
TDC experience ACAM 相关文章:
- Help! TDC gp21 SPI not working
- What is exactly my job status with these experiences?
- Need advice about obtaining more RF experience
- [MOVED] Can an experienced user recommend me an AM transmitter circuit?
- anybody have experience in varactor-tuned microstrip ring filter?
- Radar experience about studying
