error regarding pins

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 Terminals "Clock.clock_out" connected to signal "Net_75" have mismatching types.

   

i got this error while i connected clock source to anolog pin. what is way to out of this error

   

Regards

   

Rajendra

0 Likes
1 Solution
Anonymous
Not applicable

I think it is better to upload your project here so we can see what is the problem.

View solution in original post

0 Likes
16 Replies
Anonymous
Not applicable

I think it is better to upload your project here so we can see what is the problem.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Probably a clock is a digital signal and could not be connected to an analog I/O-pin.

   

 

   

Bob

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You cannot connect analog to digital nets. But you can set your clock to be in the analog domain: just go to it's 'advanced' configuration, and set 'force clock to be analog clock'.

   

But why do you need a clock as analog output?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

@hli

   

I am afraid that an "Analog Clock" still is a digital signal, but residing in the analog domain. So there is still the problem of connecting a digital signal to an analog pin.

   

 

   

Bob

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

A clock is by nature digital, yes (there is no native sine-wave generator in the PSoC). That's why I was asking for the reason to connect it to a analog pin. But I see no problem to connect a digital signal to an anlog pin - it just uses only a sub-set of the allowed values of the analog domain.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

As I said earlier: You may not connect a PSoC internal digital signal to an analog pin, you'll get an error immediately.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

So what do i have to do just to see the signal of a non-inverting op amp. 

0 Likes
lock attach
Attachments are accessible only for community members.

Your resistors are not on the PSoC, but are external components. They can only be connected to pins.

   

Activate for the pins "External Connection"

   

All blue colored objects/lines are external.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Thank you I have made the schema as you told me and I put 2 resistance to have a gain of 3. But I don't have the expected result. 

   

I don't have a clean signal. I put on the ground of the Psoc on the turntable too . If we saw the oscilloscope we have a gain of 250. Before resistors i've match the external terminal. I don't know what i can do 

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

prp,

   

 

   

Can you throw some light on why do you need to route a clock output (square wave - digital signal) to an analog pin? I personally cound not think of a good reason why someone would want to do that.

   

 

   

Regarding the error, Creator will disable the digital input and output paths of a GPIO if you place an analog pin on Top Design. Therefore, there is no way to route a digital signal to the pin using the analog routing path which is the only remaining route. This is why the error appears.

   

 

   

However,  for whatever reasons, if you want to route a clock to an analog pin, you would just need to enable the  'Digital Output' checkbox in the pin configuration along with the 'Analog' chekchbox. This will give you two terminals: an analog terminal and a digital terminal. You can then hook up the clock output to this digital terminal and the analog terminal is still free to be routed to any of the internal analog resources. I've tried that out and builds just fine for me. Snapshot attached.

0 Likes
Anonymous
Not applicable

You can configure the pin as quick silver mentioned. However, if you use digital output and analog on the same pin, you have to set the output mode to either resistace pullup/pulldown or open drain ouput and set the output to state that would not force high/low when you want to use it as analog pin.

0 Likes
Anonymous
Not applicable

Good point lleung.

   

Alternatively, you can also use the Pin_SetDriveMode() API to change drive mode on the fiy.

0 Likes
Anonymous
Not applicable

Of course you can change it via API. It just save time and less error prone if configure it at the begining.

   

But if you want strong drive and analog signal on the same pin, then API is the way to go.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Edmir, make sure that your input to any pin is between GND and VDDA.

   

Can you post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

there it is

   

Edmir

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Account for internal resistors from inputs V+, V- to OpAmp of ~2k Ohm. Use that to calculate the gain.

   

 

   

Bob

0 Likes