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.

125 khz carrier signal generation

Status
Not open for further replies.

tanzil_dhk

Advanced Member level 4
Joined
Aug 9, 2006
Messages
109
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,296
Activity points
1,924
hi,
i want to generate 125khz carrier signal for rf reader.... can i do that using pic18f452????how??
or i need to use extra counter??
 

You could use the PICs PWM output, set to 50% at 125kHz
If teh 125kHz needs to be accurate your PIC will need a crystal controlled clock.

Code will be something like this snip used on a PIC18F4525.

;set up PWM on CCP1 for PSU sync generator & turn it ON
bcf TRISC, 2 ;set RC2 as output
bsf T2CON, TMR2ON ;turn on timer 2 unity pre and post scale
movlw .5 ;set up PWM period, PR2 register
movwf PR2
movlw .3 ;Set PWM duty cycle
movwf CCPR1L
movlw b'00001100' ;set up PWM with LSBs fo 10 bit mode to 00
movwf CCP1CON ;Turn PWM ON

You will have to set the values written to PR2 and CCP1RL to suit your clock frequency.

Hope this helps
Peter
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top