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.

[PIC] Control TSA5511

Status
Not open for further replies.

sajay

Newbie level 4
Joined
Apr 11, 2015
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
64
Hi Member,
I trying to control IC PLL frequency synthesizer prescaler TSA5511 to my PIC16F628A, I used SDA and SCL pin to make it communication, seems the TSA 5511 configuration doesn't work fine.

Here are my codes, can you please help me, what are wrong with the code :

C:
void SetFreq(double dFrequentie)
{

   int iPrescaler;
   unsigned char ubCpByte = 0x00;
   unsigned char ubPortByte = 0x00;

   if(dFrequentie > F_STOP || dFrequentie < F_START)
   {
      return; //ongeldige frequentie
   }
   iPrescaler = ((dFrequentie / INPUT_DIVIDE) / REF);

   i2c_start();
   i2c_write(TSA5511_WRITE_ADDRESS);
   i2c_write((unsigned char)iPrescaler);//MSB
   i2c_write((unsigned char)(iPrescaler<<8)); //LSB
   i2c_write(ubCpByte);
   i2c_write(ubPortByte);
   i2c_stop();

}
   void main() {
   
   }


I am very appreciate for your help.

Thank you.
Sj
 

Hi,

seems the TSA 5511 configuration doesn't work fine.
This is no error description. Tell us what you expect and what you see instead.

Also you give just a snippet of code which does not tell any values, parameters, timing.
The "write" function is never called.

Also we need a schematic and the PCB layout for better assistence.

Klaus
 

Hi,


This is no error description. Tell us what you expect and what you see instead.

Also you give just a snippet of code which does not tell any values, parameters, timing.
The "write" function is never called.

Also we need a schematic and the PCB layout for better assistence.

Klaus
Thanks Klaus,
This pieces code, I has compiled it into mikroc compiler, everything is fine when I do compile, but in real hardware it doesn't working, and also I did it with Proteus to simulate that pin SCL and SDA there are no pulse output.

I need help only for this I2C control, once this fix into simulation on proteus, then I will show all the rest pieces code.

I made this code refer into TSA5511 datasheet, but I still having stuck to control this I2C TSA5511 to PIC16F628A.

Hope someone here, have a experiences with control to TSA5511 with mikroC.

Thanks Klaus.
Regards,
Sj
 

Hi,

as already said: your function SetFreq is never called. it is never processed. So how do you think it can work?

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top