PDA

View Full Version : parameters on which PIC is selected



park21
- 1st April 2014, 09:05
Hello
i'am doing project on multilevel inverter using 8 switches to b gated according to switches sequence.m unable to select pIC controller as i have 4 PWM signals to b generated.there are 4 switches in DC link ( 2 pwm required and other 2 r opposite of generated pwm )and a H-bridge

HenrikOlsson
- 1st April 2014, 09:48
Hi,
Another new member and YAIP (Yet Another Inverter Project), here we go again :-)
Take a look at the 18F2431, it will most likely do what you need. It has a PCPWM module with 3 separate (4 for the 18F4431) PWM generators with complementary outputs (up to 6/8 outputs) and deadtime insertion. A fast ADC which can sample two channels simultanously and a boatload of other features.

There are several other devices with 2 (or more) ECCP modules with complementary outputs, use the product selector tool at Microchips website to find them, then look at the datasheet to see if it'll do what you need.

park21
- 1st April 2014, 12:17
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 .m attaching snapshot of the matlab simulation result.7292

HenrikOlsson
- 1st April 2014, 12:50
Hi,
I'm sorry, I have no idea.

mpgmike
- 4th April 2014, 21:12
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

park21
- 5th April 2014, 09:22
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.7302

mpgmike
- 5th April 2014, 18:34
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

richard
- 6th April 2014, 00:46
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

park21
- 6th April 2014, 08:36
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??

park21
- 6th April 2014, 10:00
CCPxM3:CCPxM0 (CCPxCON<3:0>) to capture every rising edge of the waveform ??if m considering 18f4431 ...

mpgmike
- 7th April 2014, 18:13
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:

[/URL][URL="http://s223.photobucket.com/user/mpgchris/media/246_zps91083c15.jpg.html"]http://i223.photobucket.com/albums/dd270/mpgchris/246_zps91083c15.jpg (http://s223.photobucket.com/user/mpgchris/media/246_zps91083c15.jpg.html)http://s223.photobucket.com/user/mpgchris/media/246_zps91083c15.jpg.html

Mike

park21
- 9th April 2014, 07:32
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 .

mpgmike
- 9th April 2014, 19:40
The Data Signal Modulator allows you to choose from:
- MDCIn1
- MDCIn2
- CLKR
- CCP<1:4>
- Comparator C1,2
- EUSART Tx

There are 3 signals that can be modulated; CarrierH, CarrierL, and Modulator. Configuring COMP1 as your modulator signal. Create the 20khz from CCP1, and your 50hz from CCP2. Make one your CARL and the other your CARH. From there look at Figs 23-2 through 23-5 on pages 207-8 of the PIC16F1824_28 data sheet.

Hope this helps.

mpgmike
- 9th April 2014, 19:42
An analog option would use a comparator for a high/low output, send that to the RESET pin (4) of a LM555 timer set up for your 20khz and a whole different set-up for your 50hz.

Mike