??? 05/01/04 23:59 Read: times |
#69665 - RE: FSK generation Responding to: ???'s previous message |
This frequency is not all hard to generate right in the microcontroller if square waves are suitable.
Find a derivative with a T2 timer and a T2OUT pin. Program the timer to operate in auto-reload mode and have the output pin toggle on each auto-reload overflow event. A square wave with 50% duty cycle is thus generated. The software now reprograms the T2 reload count on the fly with a value that represents 1/2 the period of your 1200 Hz or 2400 Hz. The method of generating the modulation envelope (times when the reload values are changed) can be done quite a number of ways. If you want the timing to be exact counts of pulses of the output frequency then one neat scheme is to connect the T2OUT pin back into one of the INTx/ pins. A small state machine in the INTx interrupt service routine can count interrupts according to the desired modulation scheme and peform the T2 reload changes. For example if sending a byte consists of 4 cycles of 1200 Hz for a zero and 8 cycles of 2400 Hz for a one the timer state machine could easily manage a global byte variable with the transmit value being shifted out every 4 or 8 cycles. With this scheme you do have to look at how much performance bandwidth your processor has. At 2400 Hz rate the external interrupt would be getting hit every 416 µs. On an original 8052 at 12 MHz with divide by 12 clocking 1 µs is used for each processor cycle. I would estimate that a modulation state machine similar to that described would take about 75 cycles per interrupt time. This would commit about 18 to 19% of the processor horsepower to the task of making the FSK waveform. Not bad at all and better than external circuits in my book!! Michael Karas |
Topic | Author | Date |
FSK generation | 01/01/70 00:00 | |
RE: FSK generation | 01/01/70 00:00 | |
RE: FSK generation | 01/01/70 00:00 | |
RE: FSK generation | 01/01/70 00:00 | |
CML Website - update | 01/01/70 00:00 | |
RE: FSK generation![]() | 01/01/70 00:00 | |
RE: FSK generation | 01/01/70 00:00 | |
RE: FSK generation | 01/01/70 00:00 | |
RE: FSK generation (if sine waves) | 01/01/70 00:00 | |
RE: FSK generation (if sine waves) | 01/01/70 00:00 | |
RE: FSK generation (if sine waves) | 01/01/70 00:00 | |
RE: FSK generation (if sine waves) | 01/01/70 00:00 | |
RE: FSK generation (if sine waves) | 01/01/70 00:00 | |
RE: FSK generation (if sine waves) | 01/01/70 00:00 | |
RE: FSK generation (if sine waves) | 01/01/70 00:00 | |
RE: FSK generation thank u all | 01/01/70 00:00 | |
RE: FSK generation | 01/01/70 00:00 |