UnderWater Antenna 125KHz Driver using a 16F628 @20MHz Example Code
Hello,
I am looking for a PBP 3.1 example of how to implement hardware PWM @125KHz using a 16F628.
Attached below is a link to the Microchip App note showing the schematic that I intended to build.
I have an old development board from Bruc Reynolds which is all set up with a 20MHz Xtal.
From the data sheet...(Linked Below)
For a device operating at20 MHz, one can obtain a 125 kHz signal by setting theTimer2 prescaler to 1.
A period of 8 μs is then obtainedby setting the PR2 register to 39.
To get a 50% dutycycle output, set CCPR1L to 14 and CCP1CON<5:4>to <0:0>.
These settings will ensure a constant carrier.
To modulate the data, one can turn the drive signal onand off by setting and clearing the CCP1RIL bit.
FYI, this is for an underwater antenna that I am experimenting with.
Thanks,
Jay Zebryk, W1JRZ
https://ww1.microchip.com/downloads/...tes/00232B.pdf
1 Attachment(s)
Re: UnderWater Antenna 125KHz Driver using a 16F628 @20MHz Example Code
This might make things easier:-)
Attachment 9211
Re: UnderWater Antenna 125KHz Driver using a 16F628 @20MHz Example Code
Hi Jay.
I am not sure what RB3, RB4 and RB7 are used for. I guess the RB3 is the PWM signal output, but the rest?
As I understand it, you just want a 50% square signal at 125KHz?
Ioannis
Re: UnderWater Antenna 125KHz Driver using a 16F628 @20MHz Example Code
Ioannis,
I have the beast generating 125KHz from the hardware module quite nicely.
To modulate a data stream, I am simply changing TRISB.3 from an Output to an Input.
Peace,
Jay Zebryk
Re: UnderWater Antenna 125KHz Driver using a 16F628 @20MHz Example Code
So, you are generating the 125KHz 50% duty cycle signal?
Ioannis