- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello I want to use the Comp block in my project . to cheack if the block itself is working i want to connect to pin Vin a sine wave and then using the compartor to "cut" the sine wave and basically getting square wave . How to do it ? this pic of what i want to do
and this is my project so far :
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tomer.cccp,
Attached is working example project and associated libraries. It uses built-in sine generator and quad decoder to update sine amplitude and frequency. If you have external function generator, then extra libraries are not needed (delete them from the project and Project->Dependencies).
/odissey1
QuadDecoder library page: Quad Decoder with Button Switch component for rotary shaft encoders
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tomer.cccp,
these are separate tasks: (a) convert analog (sine) to digital; (b) convert analog (sine) to analog with limits. Which one is yours?
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to go get analog sine wave signal into the cypress board then compare the limits and '' cut '' the sine wave .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tomer.cccp,
so it is task (b), which is called "clipping". Should clipping amplitude (+/-1V) be adjustable or fixed? Should it be "soft" or "hard" clipping?
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how about a simple circuit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok but the question is it possible doing only in the TopDesigh ? with out using external Componentes ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is another example of the clamp amplifier circuit (Analog Devices AN-402), which can be realized with internal parts only. It would take 2 Comparators, 1 to 4 Opamps and analog Mux. Two DACs can be used for providing VH and VL. In basic implementation it is just an Analog Mux switching between 3 inputs depending on the truth table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maeby will start somthing easy , for exmpale I want to get in to the board voltage of 2volt compare it to 1 volt and the out put will be 1 volt using comprator, is it possible ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Something like this (untested). Schematics is for AC-coupled input. You can use a couple of VDACs to set voltages VH and VL. In this case you can use DC-coupled input. Notice that Analog Mux can only be connected to analog pins (no other connection possible), thus connection to a comparators has to be made externally through the second set of pins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just for completeness, there is very good article about audio clipping by Kendall Castor-Perry
https://www.planetanalog.com/author.asp?section_id=3066&doc_id=563331
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tomer.cccp,
Attached is working example project and associated libraries. It uses built-in sine generator and quad decoder to update sine amplitude and frequency. If you have external function generator, then extra libraries are not needed (delete them from the project and Project->Dependencies).
/odissey1
QuadDecoder library page: Quad Decoder with Button Switch component for rotary shaft encoders