Hi,
I'm sorry, I have no idea.
Hi,
I'm sorry, I have no idea.
May I suggest the PIC16F1824 (14-pin) or PIC16F1828 (20-pin) enhanced processors. Get the data sheet, these chips are awesome for what you're wanting to do! First, they include 4 ECCP channels, allow you to invert outputs, PLUS include a cool feature called Data Signal Modulator (DSM) that would allow you to embed your higher frequency within the slow clock, and even PWM that higher frequency while PWM the slow clock.
Hope this helps.
Mike
hey thanks man
bt the prob is der r gating signals with varying duty cycles evrytim the carrier cuts with the reference signal so how its possible to measure the duty cycle of the signals ,to program accordingly,hardware point of view .m attaching snapshot of the matlab simulation result.![]()
If you have a fixed period (as shown in the above pic), then measure either on-time or off-time with T1G (or T2G, T3G, etc) and subtract it from the total period. Simple math & you have your DC%.
If you have a varying period, use "Toggle Mode" to measure a period, then disable Toggle Mode and set up Single-Shot Mode to measure either on or off time. From there it is once again simple math.
Am I getting closer?
Mike
try this
move1:
Lbyte = (position1 & %00001111) 'servo 0 + lownib
Hbyte = %10000000 |( (position1 & %11110000)>>4) 'servo 0 + highnib
SEROUT2 serial_out,baud1,[Lbyte,Hbyte] 'send command to FT639
PAUSE 100
RETURN
edit oops wrong thread
Last edited by richard; - 6th April 2014 at 00:48.
hi mike
gt ur point,so ur saying taking the reference and carrier signal (20khz) frm ADC n checking for its on and off time??
cos if you c ma reference its a absolute and i dnt have my negative cycle.so how do i generate my ref n carrier 1st??
i'am thinking of taking in signals from ADC and den comparing...
m i right??
CCPxM3:CCPxM0 (CCPxCON<3:0>) to capture every rising edge of the waveform ??if m considering 18f4431 ...
The DSM feature would allow you to select a comparator as one of your qualifiers. Whenever your arcing input exceeds your selected (possibly through DAC) threshold, your HF is passed through. FWIW I played with the PIC16F1828 this weekend specifically to experiment with the DSM.
Here's what my version looked like:
http://s223.photobucket.com/user/mpgchris/media/246_zps91083c15.jpg.html
Mike
hello mike
actually what i have in my mind is carrier if 20khz il generate tru microcontroller itself by using the up-dwn counters.my oli problem is hw do i generate 50hz ref to compare it with my carrier .
Bookmarks