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.

How can make Signal Converter with PIC

Status
Not open for further replies.

darkex

Newbie level 2
Joined
Nov 14, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
Hi Guys;

I need to write a program but i am not exactly sure how to write it. I want to use PIC Microcontroller and i know Assembly and CCS C.

Program: I want to change input signal freq and give it to output. Input signal freq is changable and Max freq is about 2 kHz and i have a changable gain which i want to multiply with input signal. I give you example.

Example : Input Signal : 1.5 kHz My Gain : 2.2 and Output i want to see : 1.5*2.2 = 3.3 kHz Signal
Input Signal is Square Wave and Output must be Square Wave too.
I want to change gain by my hand in my request and input signal is not stable. it is changable.

Thanks i need your helps.
 
Last edited:

Unless you use dsPIC you have to use digital anyway so that's fixed.

This is doable but has to be done in stages.
1. You have to convert the incoming frequency into a number, you can measure the frequency using a timer module.
2. I assume with your example of 2.2 gain means you are using an analog control signal so you have to digitize it into a number using an ADC.
3. Do some math on the two numbers to calculate the divisor needed to create the output frequency
4. Use another timer module or software to create the output frequency.

You may not be able to create every frequency using only a PIC because of the integer nature of the timer values but for low frequencies it should work quite well.

Brian.
 

Unless you use dsPIC you have to use digital anyway so that's fixed.

This is doable but has to be done in stages.
1. You have to convert the incoming frequency into a number, you can measure the frequency using a timer module.
2. I assume with your example of 2.2 gain means you are using an analog control signal so you have to digitize it into a number using an ADC.
3. Do some math on the two numbers to calculate the divisor needed to create the output frequency
4. Use another timer module or software to create the output frequency.

You may not be able to create every frequency using only a PIC because of the integer nature of the timer values but for low frequencies it should work quite well.

Brian.


Thanks for your help Brian. Yes i see. I was thinking the way like that. The gain is not analog. It is digital. I think to use LCD display. and change the gain by button. PIC is 4mhz to 20mhz and my input signal max 2 khz and output is max 10 khz. So i was thinking processor is each but i do not know. Do you know any example about that application or similar one?


Cengiz
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top