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.

ASK generation using pic microcontroller

Status
Not open for further replies.

biswajitdas49

Member level 3
Joined
May 17, 2012
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
WEST BENGAL,INDIA
Activity points
1,726
Hi,somebody know how to generate Amplitude Shift Keying using pic microcontroller? Is it possible ?
If yes then how? I don't want the code, I just want know the possible logic ?

If some body have the knowledge, please share with me?
It will be very helpful for me and maybe others!

Thanks!!!
 

Yes it is possible.

If you want 100% amplitude keying, use the TRIS bit to make the pin an input or output. Input mode will generate no signal, output mode will generate 100% signal.

If you want less than 100% modulation there are several ways to do it:
1. If the PIC has a DAC, you can use it as a programmable potentiometer.
2. You can use a pin as a level switch, drive it low and use it's TRIS bit to ground the lower resistor in a potential divider. In other words switch the lower resistor in and out of circuit so it's effect as an attenuator is turned on and off.
3. If your signal is software generated you may be able to control it's amplitude by calculation.
4. If you use PWM you can generate an analog voltage which you can then use to control the amplitude.

Some PICs have built in signal modulators which you can use to advantage.

Brian.
 

it should be possible using a DAC (digital to Analogue Converter)
generate a sine wave (from a look up table) and vary the amplitude to represent digital values
or you could use a DDS chip
https://en.wikipedia.org/wiki/Direct_digital_synthesizer

what frequency are you planing to transmit?

thanks for your reply!!
Actually I don't understand, how to calculate the carrier and the data frequency. Is there any formula or I can chose randomly carrier and the data frequency?
 

"don't understand how to calculate"? I was thinking up to now that data rate and carrier frequency are commanded by the application. What's your application?
 

"don't understand how to calculate"? I was thinking up to now that data rate and carrier frequency are commanded by the application. What's your application?

"don't understand how to calculate" means how to calculate the perfect carrier frequency for the particular data rate. my application is to make a simple RF transmitter which is based on pic micro-controller.
actually I try to make a ASK generator in proteus, there I found that phase of the carrier didn't match with the data bits,that's why I think is it possible to make ASK signal using microcontroller.
here is the circuit-
circuit.jpg simulate.jpg
 

A PIC microcontroller can't generate RF frequencies beyond a few MHz.
 

All your schematic shows is an analog switch. You can generate the carrier and the modulation using any method you like. They do not have to be phase related although nothing stops you from syncing the modulation to the carrier if you want to.

The golden rule is the carrier must be at LEAST twice the modulation frequency (at least 2 cycles of carrier per bit), in practise it is best for it to be many times higher. As FvM points ut, the actual frequencies depend entirely on your aplication. For example, my TV remote control uses a 38KHz carrier and about 200 bits per second, one of my data links uses a 29GHz carrier and 27 Megabits per second modulation rate.

You probably don't want to generate the carrier from a PIC if the frequency is more than a few hundred KHz or you risk instability as your software takes different routes through your program. You should be fine generating data which normally isn't as critical of speed and at much slower rate.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top