Clk & Data

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
spence
Posts: 11
Joined: Wed Dec 10, 2008 7:42 pm
Contact:

Clk & Data

Post by spence »

Hi,

I have a chip that I need to send data to. The spec says it has 2 connections Clk & data, how can I get these signals from pic ? what component do I use in flowcode ?

The data input is a 5 bit code with bit 0 (lsb) the first received

eg

D4 D3 D2 D1 D0
0 0 0 0 1

Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Clk & Data

Post by Benj »

Hello

Could be I2C or it could be a custom bus that requires custom transfers. Eg transferring 5-bits of data is not a standard communications bus.

If you give me the name of the chip I will have a quick look for you.

spence
Posts: 11
Joined: Wed Dec 10, 2008 7:42 pm
Contact:

Re: Clk & Data

Post by spence »

Thanks Ben

Chip is DTMF generator HT9200A by Holtek

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Clk & Data

Post by Benj »

Hi Spence

Looks like you will have to write a custom macro to allow communication with this device. I would create a new macro and then try to follow the timing diagram shown on page 7 of the device datasheet.

http://www.holtek.com.tw/english/tech/a ... a0037e.pdf

You could either create a generic maco that takes a byte parameter and transfers the first 5-bits to the device or you could make seperate macros for each of the different command sets and call each one as needed.

If you get stuck then let me know and I will create a demo generic macro for you.

spence
Posts: 11
Joined: Wed Dec 10, 2008 7:42 pm
Contact:

Re: Clk & Data

Post by spence »

Thanks Ben

Would be great if you could write code to get me started

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Clk & Data

Post by Benj »

Hi

Here is an example program, As far as I can tell it should work straight off but I cannot be sure without the hardware to test on.
Attachments
DTMF.fcf
(4.5 KiB) Downloaded 407 times

spence
Posts: 11
Joined: Wed Dec 10, 2008 7:42 pm
Contact:

Re: Clk & Data

Post by spence »

Thanks Ben

Will let you know if it works

Post Reply