Searching \ for '[PIC]: Numerically controlled digital frequency ge' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'Numerically controlled digital frequency ge'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Numerically controlled digital frequency ge'
2001\03\15@003037 by Antonio L Benci

flavicon
picon face
part 1 784 bytes content-type:text/plain; charset=us-ascii (decoded 7bit)

I am looking at modifying Tom Napier's NCO code for a numerically
controlled digital output, ie; 1MHz instruction speed, 1kHz to 100kHz
fOUT.

Before reinventing the wheel. Has anyone done this before. If so would
you be willing to share.

Nino.
--
------------------------------------------------------
| Antonio (Nino) L. Benci                            |
| Professional Officer, Electronic Services          |
| School of Physics & Materials Engineering          |
| Monash University                                  |
| email: spam_OUTnino.benciTakeThisOuTspamspme.monash.edu                  |
| T: 61 3 9905 3649. F: 61 3 9905 3637               |
| M: 0414 924 833                                    |
------------------------------------------------------


part 2 586 bytes content-type:text/x-vcard; charset=us-ascii; name=Nino.Benci.vcf
(decoded 7bit)

begin:vcard
n:Benci;Antonio L
tel;cell:0414 924 833
tel;fax:+61 3 9905 3637
tel;home:0414 924 833
tel;work:+61 3 9905 3649
x-mozilla-html:FALSE
url:http://www.physics.monash.edu.au/~ninob
org:Monash University;School of Physics & Materials Engineering
version:2.1
email;internet:.....Nino.BenciKILLspamspam@spam@spme.monash.edu
title:Professional Officer, Electronic Services
adr;quoted-printable:;;PO Box 27=0D=0ASchool of Physics and Materials Engineering=0D=0AMonash University;Monash University;VIC;3800;Australia
x-mozilla-cpt:;10672
fn:Antonio L Benci
end:vcard


part 3 131 bytes
--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\03\15@121705 by Dan Michaels

flavicon
face
Antonio L Benci wrote:
>I am looking at modifying Tom Napier's NCO code for a numerically
>controlled digital output, ie; 1MHz instruction speed, 1kHz to 100kHz
>fOUT.
>
>Before reinventing the wheel. Has anyone done this before. If so would
>you be willing to share.
>

Hi Antonio,

Along another tack, you can get precise pulsetrains [but not single
pulses] by using the PWM output on a PIC. You can get rep-rates
from 1.2 khz to 5 mhz, and pulses as short as 50 nsec, when using a
20 mhz xtal. I have an appnote describing this:

AN-ECD06 - Precision 50-nsec Pulse Generation Using a PIC16C63

http://www.oricomtech.com/appnotes.htm

There are 3 ranges, taking into account the 1x, 4x, and 16x
prescaler values on Timer2. You can get 256 continuous rep-rates
and 1024 pulsewidths from min to max in each of these ranges.

Not as good as Tom's ckt, but costs you nothing if you are already
using a PIC 16C6x/7x.

- dan michaels
==============

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\03\16@004649 by Antonio L Benci

flavicon
picon face
part 1 1382 bytes content-type:text/plain; charset=us-ascii (decoded 7bit)

Ok, but i'm using a 16F84 ;-)

At a pinch i'll look at the 16C7x

Dan Michaels wrote:
{Quote hidden}

Nino.
--
------------------------------------------------------
| Antonio (Nino) L. Benci                            |
| Professional Officer, Electronic Services          |
| School of Physics & Materials Engineering          |
| Monash University                                  |
| email: nino.bencispamKILLspamspme.monash.edu                  |
| T: 61 3 9905 3649. F: 61 3 9905 3637               |
| M: 0414 924 833                                    |
------------------------------------------------------


part 2 586 bytes content-type:text/x-vcard; charset=us-ascii; name=Nino.Benci.vcf
(decoded 7bit)

begin:vcard
n:Benci;Antonio L
tel;cell:0414 924 833
tel;fax:+61 3 9905 3637
tel;home:0414 924 833
tel;work:+61 3 9905 3649
x-mozilla-html:FALSE
url:http://www.physics.monash.edu.au/~ninob
org:Monash University;School of Physics & Materials Engineering
version:2.1
email;internet:.....Nino.BenciKILLspamspam.....spme.monash.edu
title:Professional Officer, Electronic Services
adr;quoted-printable:;;PO Box 27=0D=0ASchool of Physics and Materials Engineering=0D=0AMonash University;Monash University;VIC;3800;Australia
x-mozilla-cpt:;10672
fn:Antonio L Benci
end:vcard


part 3 136 bytes
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\03\16@110511 by Dan Michaels

flavicon
face
At 04:45 PM 3/16/01 +1100, you wrote:
>Ok, but i'm using a 16F84 ;-)
>
>At a pinch i'll look at the 16C7x
>

Antonio,

I just noticed the new 16C716 chip in the digikey catalog. It is
18-pin pinout like '84, and also has Timers 1/2 plus a PWM channel,
which I presume works the same as all the other 2nd gen chips. You
also get 4 real A/D channels - worth their weight in gold compared
to those RC kludges that people use on '84 chips.

- dan
========


>Dan Michaels wrote:
>>
>> Along another tack, you can get precise pulsetrains [but not single
>> pulses] by using the PWM output on a PIC. You can get rep-rates
>> from 1.2 khz to 5 mhz, and pulses as short as 50 nsec, when using a
>> 20 mhz xtal. I have an appnote describing this:
>>

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2001\03\16@120805 by Harold M Hallikainen

picon face
       Yep, the PIC16c716 is a nice chip. We've designed it into a phase
controlled voltage regulator. It measures the instantaneous voltage 200
times every half cycle, accumulating the square of the voltage, then
dividing by the actual count (which may vary some depending on PIC and
line frequency), then taking the square root to get the RMS voltage. The
compare register is then adjusted in the appropriate direction to trigger
the triac at the right time so the RMS voltage remains constant
(relatively).
       We've shipped our first 500 and are about to start a run of 1,000.

Harold


On Fri, 16 Mar 2001 11:05:11 -0500 Dan Michaels <@spam@oricomKILLspamspamUSWEST.NET>
writes:
{Quote hidden}

FCC Rules Online at http://hallikainen.com/FccRules
Lighting control for theatre and television at http://www.dovesystems.com

________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\03\16@122857 by rottosen

flavicon
face
Antonio:
You can look at my version of Tom Napier's NCO code that I did for the
SX-28.
It's at:   http://www.rhoent.com/examples.htm
Look at both the Numerically Controlled Ocillator and Direct Digital
Synthesis Signal Generator examples.

Not exactly what you asked for but I hope it gives you some ideas.

-- Rich


Antonio L Benci wrote:
{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservEraseMEspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2001\03\16@133824 by Dan Michaels

flavicon
face
Harold wrote:
>        Yep, the PIC16c716 is a nice chip. We've designed it into a phase
>controlled voltage regulator. It measures the instantaneous voltage 200


I also note the '716 is 33% cheaper than the '84.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\03\16@235538 by Roman Black

flavicon
face
Harold M Hallikainen wrote:
>
>         Yep, the PIC16c716 is a nice chip. We've designed it into a phase
> controlled voltage regulator. It measures the instantaneous voltage 200
> times every half cycle, accumulating the square of the voltage, then
> dividing by the actual count (which may vary some depending on PIC and
> line frequency), then taking the square root to get the RMS voltage. The
> compare register is then adjusted in the appropriate direction to trigger
> the triac at the right time so the RMS voltage remains constant
> (relatively).
>         We've shipped our first 500 and are about to start a run of 1,000.
>
> Harold


Nice system Harold! Are you using a transformer
too or does it just correct for over-power
conditions?
-Roman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservEraseMEspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2001\03\17@200030 by Harold M Hallikainen

picon face
       This system uses a 250W 24V halogen lamp. We're using an autotransformer
to deliver about 30VAC open circuit, then phase controlling that down to
24V (actually, the RMS voltage to the lamp can be varied by a control
voltage that is generated by another PIC generating a PWM signal and
handling user interface). The autotransformer also has an isolated
secondary that powers the PICs (three of them in this product, the 16c716
in the power supply, a 16f628 in the control panel, and a 16f627 as a
remote display driver/pushbutton interface that communicates with the
control panel over three wires: +5V, data, ground).
       The isolated secondary has its center tap grounded. One pair of
rectifiers drives a capacitor and a 7805 to provide the 5V supply.
Another pair of rectifiers drives a current limit resistor into RB0 to
generate an interrupt just prior to zero cross. This resets the timer
that the compare register uses to figure out when to turn on the triac.
The same diode pair driving RB0 also drives a voltage divider into an
analog input. This is where the instantaneous voltages during the half
cycle are measured. Note that these samples are the full half cycle, not
just the part when the triac is on. But, since the PIC is turning on the
triac, we know when it's on. So, we just add zero instead of the A/D
reading when the triac is not on.
       Ideally, we'd measure the actual output driving the lamp, but that'd
require another isolation barrier to get the phase controlled AC back to
the PIC. I figured that the isolated secondary voltage is pretty close to
being proportional to the nonisolated secondary (the portion of the
primary between the bottom and the 30V tap). There'd be two errors: First
would be a lack of tracking as the load varies. The second would be lack
of tracing as the line varies. Since we are always driving the same load,
the first factor (which is probably the larger one) can be ignored. I
suspect the second factor is pretty small (the secondary voltage is
pretty proportional to the line voltage).
       So, it worked out pretty well. I was able to avoid another coupling
across the isolation barrier...

Harold


On Sat, 17 Mar 2001 15:55:35 +1100 Roman Black <EraseMEfastvidspamEZY.NET.AU>
writes:
{Quote hidden}

________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUTspamKILLspammitvma.mit.edu


2001\03\17@235345 by Roman Black

flavicon
face
Harold M Hallikainen wrote:
{Quote hidden}

Thanks for that Harold. I enjoyed reading that.
It's a pretty sophisticated light dimmer you
have there! ;o)

So here's the questions!
Did you get any phase shift problems measuring
zero cross at the isolated secondary of the
transformer? What about when the triac switches
and current is drawn from the transformer, (the
trias is after the transformer??).

Your zero cross circuit is just a current limit
resistor? You have about 8v to 10v peak there
probably?

With the instantaneous voltage values are you
doing root mean square? If the line voltage
changes you might get one "dim" cycle and then
by the next cycle it would be corrected by triac
duration?

Sorry to fire questions at you! :o)
-Roman

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspamspammitvma.mit.edu


2001\03\19@023043 by Harold M Hallikainen

picon face
On Sun, 18 Mar 2001 15:50:48 +1100 Roman Black <EraseMEfastvidspamspamspamBeGoneEZY.NET.AU>
writes:
>
>
> Thanks for that Harold. I enjoyed reading that.
> It's a pretty sophisticated light dimmer you
> have there! ;o)

       It's sold to dentists for curing composites used to fill teeth!

>
> So here's the questions!
> Did you get any phase shift problems measuring
> zero cross at the isolated secondary of the
> transformer?

       No problem. Recall that we're detecting a negative edge on the RB0
input, so we're a little before zerocross. I've also used this technique
in another product (the Shoebox dimmer at http://www.dovesystems.com).

What about when the triac switches
> and current is drawn from the transformer, (the
> trias is after the transformer??).

       To reduce transformer size, it's an autotransformer. The lamp is driven
thru the triac off the 30V tap on the primary. A separate isolated
secondary powers the PIC and allows detection of zero cross and
measurement of RMS.

>
> Your zero cross circuit is just a current limit
> resistor? You have about 8v to 10v peak there
> probably?
>

       Yes, and yes, thereabouts. The secondary is 18Vct with the centertap
grounded. So, the peak voltage is about 9*sqrt(2).

> With the instantaneous voltage values are you
> doing root mean square?

       Yes. Squaring A/D after each conversion (8 bits up to 16 bits), then
adding into a 24 bit sum.

If the line voltage
> changes you might get one "dim" cycle and then
> by the next cycle it would be corrected by triac
> duration?

       Yes, the reaction time is a little slow since we have to wait a half
cycle to measure the RMS. Also, I'm using a pure integral control system.
If the measured RMS is low, I decrement the high half of the CCPR
register, turning on the triac earlier. If the RMS is high, I increment
the CCPR turning the triac on later.

>
> Sorry to fire questions at you! :o)
> -Roman
>
> --

       No problem!

Harold


> http://www.piclist.com hint: To leave the PICList
> RemoveMEpiclist-unsubscribe-requestKILLspamspammitvma.mit.edu
>
>

________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\03\19@030743 by Roman Black

flavicon
face
Harold M Hallikainen wrote:

> > It's a pretty sophisticated light dimmer you
> > have there! ;o)
>
>         It's sold to dentists for curing composites used to fill teeth!

Excellent! Top-dollar medical market with no
chance of killing someone if your product
fails! You've go it all worked out...  ;o)



> > Did you get any phase shift problems measuring
> > zero cross at the isolated secondary of the
> > transformer?
>
>         No problem. Recall that we're detecting a negative edge on the RB0
> input, so we're a little before zerocross. I've also used this technique
> in another product (the Shoebox dimmer at http://www.dovesystems.com).


I really like that! A pre-zero cross if you like.
This avoids all the switching hash on the mains
that occurs on or just after the zero cross. It also
means that your triac'd load is always on at the end
of the cycle when you detect, not at the start where
your load may or may not be on. Brilliant! :o)


> >What about when the triac switches
> > and current is drawn from the transformer...
>
>         To reduce transformer size, it's an autotransformer. The lamp is driven
> thru the triac off the 30V tap on the primary. A separate isolated
> secondary powers the PIC and allows detection of zero cross and
> measurement of RMS.

Yep I got that, I was worried that the triac turn-on
might affect the zero cross but your clever pre-cross
system eliminates that.

Good project. Hope you sell heaps. :o)
-Roman

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...