Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #466487 > unrolled thread
| Started by | David Lesher <wb8foz@panix.com> |
|---|---|
| First post | 2017-07-02 03:13 +0000 |
| Last post | 2017-07-03 00:51 -0500 |
| Articles | 20 on this page of 67 — 15 participants |
Back to article view | Back to sci.electronics.design
F to bits David Lesher <wb8foz@panix.com> - 2017-07-02 03:13 +0000
Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-01 20:27 -0700
Re: F to bits David Lesher <wb8foz@panix.com> - 2017-07-02 05:21 +0000
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 07:36 -0700
Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-01 22:34 -0700
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 07:55 -0700
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 11:44 -0400
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 08:51 -0700
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 12:00 -0400
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 10:20 -0700
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 13:52 -0400
Re: F to bits Neon John <no@never.com> - 2017-07-02 13:41 -0400
Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 11:22 -0700
Re: F to bits "John Miles, KE5FX" <jmiles@gmail.com> - 2017-07-02 12:55 -0700
Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 13:12 -0700
Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 13:27 -0700
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 14:18 -0700
Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 14:37 -0700
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 14:44 -0700
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 14:48 -0700
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 15:44 -0700
Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 16:23 -0700
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 16:26 -0700
Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 16:36 -0700
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 16:44 -0700
Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 17:13 -0700
Re: F to bits krw@notreal.com - 2017-07-02 19:53 -0400
Re: F to bits Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2017-07-03 10:30 +0300
Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-03 09:44 -0700
Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-03 09:50 -0700
Re: F to bits Jasen Betts <jasen@xnet.co.nz> - 2017-07-04 05:18 +0000
Re: F to bits Les Cargill <lcargill99@comcast.com> - 2017-07-03 00:44 -0500
Re: F to bits Les Cargill <lcargill99@comcast.com> - 2017-07-03 00:42 -0500
Re: F to bits Jasen Betts <jasen@xnet.co.nz> - 2017-07-04 05:11 +0000
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 19:32 -0400
Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 16:40 -0700
Re: F to bits klaus.kragelund@gmail.com - 2017-07-02 16:45 -0700
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 19:55 -0400
Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-02 17:07 -0700
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 20:30 -0400
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 17:39 -0700
Re: F to bits klaus.kragelund@gmail.com - 2017-07-02 18:09 -0700
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 18:45 -0700
Re: F to bits "John Miles, KE5FX" <jmiles@gmail.com> - 2017-07-02 17:49 -0700
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-02 22:56 -0400
Re: F to bits "John Miles, KE5FX" <jmiles@gmail.com> - 2017-07-02 21:52 -0700
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-03 01:38 -0400
Re: F to bits David Brown <david.brown@hesbynett.no> - 2017-07-03 12:37 +0200
Re: F to bits edward.ming.lee@gmail.com - 2017-07-03 04:23 -0700
Re: F to bits David Brown <david.brown@hesbynett.no> - 2017-07-03 14:10 +0200
Re: F to bits leongdentalsf@gmail.com - 2017-07-03 06:14 -0700
Re: F to bits Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-07-03 15:46 +0100
Re: F to bits edward.ming.lee@gmail.com - 2017-07-03 08:24 -0700
Re: F to bits Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-07-03 17:12 +0100
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-03 12:50 -0400
Re: F to bits Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-07-03 18:36 +0100
Re: F to bits rickman <gnuarm@gmail.com> - 2017-07-05 02:01 -0400
Re: F to bits Lasse Langwadt Christensen <langwadt@fonz.dk> - 2017-07-03 09:30 -0700
Re: F to bits Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-07-03 12:32 +0100
Re: F to bits David Lesher <wb8foz@panix.com> - 2017-07-03 00:54 +0000
Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 18:14 -0700
Re: F to bits David Lesher <wb8foz@panix.com> - 2017-07-03 02:33 +0000
Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 21:29 -0700
Re: F to bits edward.ming.lee@gmail.com - 2017-07-02 22:46 -0700
Re: F to bits Les Cargill <lcargill99@comcast.com> - 2017-07-02 12:40 -0500
Re: F to bits Don Y <blockedofcourse@foo.invalid> - 2017-07-02 11:38 -0700
Re: F to bits Les Cargill <lcargill99@comcast.com> - 2017-07-03 00:51 -0500
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
| From | edward.ming.lee@gmail.com |
|---|---|
| Date | 2017-07-02 15:44 -0700 |
| Message-ID | <1bc01e99-b886-43ef-bc89-46e1eb03f87f@googlegroups.com> |
| In reply to | #466596 |
On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: > On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: > > On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen wrote: > > > Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev edward....@gmail.com: > > > > On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: > > > > > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: > > > > > > > I believe the main concern is the start/stop kick in/out times. > > > > > > > If it's feeding some time clocks, they could be off by seconds. To be > > > > > > > truly accurate, you would need to adjust following frequencies to > > > > > > > compensate. > > > > > > > > > > > > > > To echo rickman, perfect job for an FPGA. > > > > > > > > > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is > > > > > > inadequate to directly monitor any operational parameter of a 60 Hz > > > > > > generator is certainly interesting. > > > > > > > > > > > > The requirement for an FPGA to do this particular job is even more > > > > > > interesting. > > > > > > > > > > by interesting I assume you mean crazy ;) > > > > > > > > Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. > > > > > > > > > > and a board with an mcu is $1 > > > > Unless he is making thousands of them, probably not much different. I need only one for now, so don't care about $15 more. > > > > > > > > > > > > > > > 16MHz is 62.5ns, try getting the zeros crossing detection that accurate > > > > > > > > Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. > > > > > > > > > > why would you need to use the prescaler? incrementing a variable > > > > > when the timer rolls over every few ms is not an issue > > > > That implies prescaler already. Have you programmed the AVR hardware counter? > > OK, you can do up to 4ms without prescaler. But when the gen kick in, it could be several seconds. More precisely, you can do one 16 bit counter without prescaler. Will need the prescaler with any of the 8 bits counters. At 4ms intervals, there are over 200 interrupts per second, and the exact timing depends on the software. > > > > > > > > > > As for FPGA, you can use up to 8000 bit counter on a cyclone II. > > > > > > sure but what would be the point? > > > > Simple, straight forward implementation. In my case, i need to monitor and control 6 to 8 individual motors. Can't find enough precision timer in micros. It's easier to migrate up with FPGA.
[toc] | [prev] | [next] | [standalone]
| From | Lasse Langwadt Christensen <langwadt@fonz.dk> |
|---|---|
| Date | 2017-07-02 16:23 -0700 |
| Message-ID | <185edd03-5e5e-48b1-9328-3e6f6ea76442@googlegroups.com> |
| In reply to | #466608 |
Den mandag den 3. juli 2017 kl. 00.44.32 UTC+2 skrev edward....@gmail.com: > On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: > > On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: > > > On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev edward....@gmail.com: > > > > > On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > > Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: > > > > > > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: > > > > > > > > I believe the main concern is the start/stop kick in/out times. > > > > > > > > If it's feeding some time clocks, they could be off by seconds. To be > > > > > > > > truly accurate, you would need to adjust following frequencies to > > > > > > > > compensate. > > > > > > > > > > > > > > > > To echo rickman, perfect job for an FPGA. > > > > > > > > > > > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is > > > > > > > inadequate to directly monitor any operational parameter of a 60 Hz > > > > > > > generator is certainly interesting. > > > > > > > > > > > > > > The requirement for an FPGA to do this particular job is even more > > > > > > > interesting. > > > > > > > > > > > > by interesting I assume you mean crazy ;) > > > > > > > > > > Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. > > > > > > > > > > > > > and a board with an mcu is $1 > > > > > > Unless he is making thousands of them, probably not much different. I need only one for now, so don't care about $15 more. > > > > > > > > > > > > > > > > > > > 16MHz is 62.5ns, try getting the zeros crossing detection that accurate > > > > > > > > > > Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. > > > > > > > > > > > > > why would you need to use the prescaler? incrementing a variable > > > > > > > when the timer rolls over every few ms is not an issue > > > > > > That implies prescaler already. Have you programmed the AVR hardware counter? > > > > OK, you can do up to 4ms without prescaler. But when the gen kick in, it could be several seconds. > > More precisely, you can do one 16 bit counter without prescaler. Will need the prescaler with any of the 8 bits counters. At 4ms intervals, there are over 200 interrupts per second, and the exact timing depends on the software. > > > > > > > > > > > > > > > As for FPGA, you can use up to 8000 bit counter on a cyclone II. > > > > > > > > sure but what would be the point? > > > > > > Simple, straight forward implementation. > > In my case, i need to monitor and control 6 to 8 individual motors. Can't find enough precision timer in micros. It's easier to migrate up with FPGA. how many timers do you need?
[toc] | [prev] | [next] | [standalone]
| From | edward.ming.lee@gmail.com |
|---|---|
| Date | 2017-07-02 16:26 -0700 |
| Message-ID | <dae654d6-a06c-4ef1-9a07-4924c887b8ae@googlegroups.com> |
| In reply to | #466614 |
On Sunday, July 2, 2017 at 4:23:59 PM UTC-7, Lasse Langwadt Christensen wrote: > Den mandag den 3. juli 2017 kl. 00.44.32 UTC+2 skrev edward....@gmail.com: > > On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: > > > On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: > > > > On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev edward....@gmail.com: > > > > > > On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > > > Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: > > > > > > > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: > > > > > > > > > I believe the main concern is the start/stop kick in/out times. > > > > > > > > > If it's feeding some time clocks, they could be off by seconds. To be > > > > > > > > > truly accurate, you would need to adjust following frequencies to > > > > > > > > > compensate. > > > > > > > > > > > > > > > > > > To echo rickman, perfect job for an FPGA. > > > > > > > > > > > > > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is > > > > > > > > inadequate to directly monitor any operational parameter of a 60 Hz > > > > > > > > generator is certainly interesting. > > > > > > > > > > > > > > > > The requirement for an FPGA to do this particular job is even more > > > > > > > > interesting. > > > > > > > > > > > > > > by interesting I assume you mean crazy ;) > > > > > > > > > > > > Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. > > > > > > > > > > > > > > > > and a board with an mcu is $1 > > > > > > > > Unless he is making thousands of them, probably not much different. I need only one for now, so don't care about $15 more. > > > > > > > > > > > > > > > > > > > > > > > 16MHz is 62.5ns, try getting the zeros crossing detection that accurate > > > > > > > > > > > > Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. > > > > > > > > > > > > > > > > why would you need to use the prescaler? incrementing a variable > > > > > > > > > when the timer rolls over every few ms is not an issue > > > > > > > > That implies prescaler already. Have you programmed the AVR hardware counter? > > > > > > OK, you can do up to 4ms without prescaler. But when the gen kick in, it could be several seconds. > > > > More precisely, you can do one 16 bit counter without prescaler. Will need the prescaler with any of the 8 bits counters. At 4ms intervals, there are over 200 interrupts per second, and the exact timing depends on the software. > > > > > > > > > > > > > > > > > > > > As for FPGA, you can use up to 8000 bit counter on a cyclone II. > > > > > > > > > > sure but what would be the point? > > > > > > > > Simple, straight forward implementation. > > > > In my case, i need to monitor and control 6 to 8 individual motors. Can't find enough precision timer in micros. It's easier to migrate up with FPGA. > > how many timers do you need? 6 to 8. One per BLDC motor.
[toc] | [prev] | [next] | [standalone]
| From | Lasse Langwadt Christensen <langwadt@fonz.dk> |
|---|---|
| Date | 2017-07-02 16:36 -0700 |
| Message-ID | <da1a4568-b36d-4b58-a6e8-1c44232fb636@googlegroups.com> |
| In reply to | #466615 |
Den mandag den 3. juli 2017 kl. 01.26.21 UTC+2 skrev edward....@gmail.com: > On Sunday, July 2, 2017 at 4:23:59 PM UTC-7, Lasse Langwadt Christensen wrote: > > Den mandag den 3. juli 2017 kl. 00.44.32 UTC+2 skrev edward....@gmail.com: > > > On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: > > > > On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: > > > > > On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > > Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev edward....@gmail.com: > > > > > > > On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > > > > Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: > > > > > > > > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: > > > > > > > > > > I believe the main concern is the start/stop kick in/out times. > > > > > > > > > > If it's feeding some time clocks, they could be off by seconds. To be > > > > > > > > > > truly accurate, you would need to adjust following frequencies to > > > > > > > > > > compensate. > > > > > > > > > > > > > > > > > > > > To echo rickman, perfect job for an FPGA. > > > > > > > > > > > > > > > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is > > > > > > > > > inadequate to directly monitor any operational parameter of a 60 Hz > > > > > > > > > generator is certainly interesting. > > > > > > > > > > > > > > > > > > The requirement for an FPGA to do this particular job is even more > > > > > > > > > interesting. > > > > > > > > > > > > > > > > by interesting I assume you mean crazy ;) > > > > > > > > > > > > > > Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. > > > > > > > > > > > > > > > > > > > and a board with an mcu is $1 > > > > > > > > > > Unless he is making thousands of them, probably not much different. I need only one for now, so don't care about $15 more. > > > > > > > > > > > > > > > > > > > > > > > > > > > 16MHz is 62.5ns, try getting the zeros crossing detection that accurate > > > > > > > > > > > > > > Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. > > > > > > > > > > > > > > > > > > > why would you need to use the prescaler? incrementing a variable > > > > > > > > > > > when the timer rolls over every few ms is not an issue > > > > > > > > > > That implies prescaler already. Have you programmed the AVR hardware counter? > > > > > > > > OK, you can do up to 4ms without prescaler. But when the gen kick in, it could be several seconds. > > > > > > More precisely, you can do one 16 bit counter without prescaler. Will need the prescaler with any of the 8 bits counters. At 4ms intervals, there are over 200 interrupts per second, and the exact timing depends on the software. > > > > > > > > > > > > > > > > > > > > > > > > > As for FPGA, you can use up to 8000 bit counter on a cyclone II. > > > > > > > > > > > > sure but what would be the point? > > > > > > > > > > Simple, straight forward implementation. > > > > > > In my case, i need to monitor and control 6 to 8 individual motors. Can't find enough precision timer in micros. It's easier to migrate up with FPGA. > > > > how many timers do you need? > > 6 to 8. One per BLDC motor. how did we get from measuring 60Hz to running BLDC motors?
[toc] | [prev] | [next] | [standalone]
| From | edward.ming.lee@gmail.com |
|---|---|
| Date | 2017-07-02 16:44 -0700 |
| Message-ID | <d2cd82ca-f8ba-4d9e-9cdf-6a993b3fabc9@googlegroups.com> |
| In reply to | #466618 |
On Sunday, July 2, 2017 at 4:36:11 PM UTC-7, Lasse Langwadt Christensen wrote: > Den mandag den 3. juli 2017 kl. 01.26.21 UTC+2 skrev edward....@gmail.com: > > On Sunday, July 2, 2017 at 4:23:59 PM UTC-7, Lasse Langwadt Christensen wrote: > > > Den mandag den 3. juli 2017 kl. 00.44.32 UTC+2 skrev edward....@gmail.com: > > > > On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: > > > > > On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: > > > > > > On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > > > Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev edward....@gmail.com: > > > > > > > > On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > > > > > Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: > > > > > > > > > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: > > > > > > > > > > > I believe the main concern is the start/stop kick in/out times. > > > > > > > > > > > If it's feeding some time clocks, they could be off by seconds. To be > > > > > > > > > > > truly accurate, you would need to adjust following frequencies to > > > > > > > > > > > compensate. > > > > > > > > > > > > > > > > > > > > > > To echo rickman, perfect job for an FPGA. > > > > > > > > > > > > > > > > > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is > > > > > > > > > > inadequate to directly monitor any operational parameter of a 60 Hz > > > > > > > > > > generator is certainly interesting. > > > > > > > > > > > > > > > > > > > > The requirement for an FPGA to do this particular job is even more > > > > > > > > > > interesting. > > > > > > > > > > > > > > > > > > by interesting I assume you mean crazy ;) > > > > > > > > > > > > > > > > Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. > > > > > > > > > > > > > > > > > > > > > > and a board with an mcu is $1 > > > > > > > > > > > > Unless he is making thousands of them, probably not much different. I need only one for now, so don't care about $15 more. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 16MHz is 62.5ns, try getting the zeros crossing detection that accurate > > > > > > > > > > > > > > > > Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. > > > > > > > > > > > > > > > > > > > > > > why would you need to use the prescaler? incrementing a variable > > > > > > > > > > > > > when the timer rolls over every few ms is not an issue > > > > > > > > > > > > That implies prescaler already. Have you programmed the AVR hardware counter? > > > > > > > > > > OK, you can do up to 4ms without prescaler. But when the gen kick in, it could be several seconds. > > > > > > > > More precisely, you can do one 16 bit counter without prescaler. Will need the prescaler with any of the 8 bits counters. At 4ms intervals, there are over 200 interrupts per second, and the exact timing depends on the software. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > As for FPGA, you can use up to 8000 bit counter on a cyclone II. > > > > > > > > > > > > > > sure but what would be the point? > > > > > > > > > > > > Simple, straight forward implementation. > > > > > > > > In my case, i need to monitor and control 6 to 8 individual motors. Can't find enough precision timer in micros. It's easier to migrate up with FPGA. > > > > > > how many timers do you need? > > > > 6 to 8. One per BLDC motor. > > how did we get from measuring 60Hz to running BLDC motors? Very similar situation, especially for the ram up and down requirements. That's why i was interested in this thread. Raming up or down a motor or generator is transient responses, not steady state. Easy to oversample for steady state as Don said. But if you need to measure system characteristics with transient responses, forget about micros.
[toc] | [prev] | [next] | [standalone]
| From | Lasse Langwadt Christensen <langwadt@fonz.dk> |
|---|---|
| Date | 2017-07-02 17:13 -0700 |
| Message-ID | <6466e0f9-b14f-4e87-a85e-e147428ec3a9@googlegroups.com> |
| In reply to | #466621 |
Den mandag den 3. juli 2017 kl. 01.44.27 UTC+2 skrev edward....@gmail.com: > On Sunday, July 2, 2017 at 4:36:11 PM UTC-7, Lasse Langwadt Christensen wrote: > > Den mandag den 3. juli 2017 kl. 01.26.21 UTC+2 skrev edward....@gmail.com: > > > On Sunday, July 2, 2017 at 4:23:59 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > Den mandag den 3. juli 2017 kl. 00.44.32 UTC+2 skrev edward....@gmail.com: > > > > > On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: > > > > > > On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: > > > > > > > On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > > > > Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev edward....@gmail.com: > > > > > > > > > On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: > > > > > > > > > > Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: > > > > > > > > > > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: > > > > > > > > > > > > I believe the main concern is the start/stop kick in/out times. > > > > > > > > > > > > If it's feeding some time clocks, they could be off by seconds. To be > > > > > > > > > > > > truly accurate, you would need to adjust following frequencies to > > > > > > > > > > > > compensate. > > > > > > > > > > > > > > > > > > > > > > > > To echo rickman, perfect job for an FPGA. > > > > > > > > > > > > > > > > > > > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is > > > > > > > > > > > inadequate to directly monitor any operational parameter of a 60 Hz > > > > > > > > > > > generator is certainly interesting. > > > > > > > > > > > > > > > > > > > > > > The requirement for an FPGA to do this particular job is even more > > > > > > > > > > > interesting. > > > > > > > > > > > > > > > > > > > > by interesting I assume you mean crazy ;) > > > > > > > > > > > > > > > > > > Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. > > > > > > > > > > > > > > > > > > > > > > > > > and a board with an mcu is $1 > > > > > > > > > > > > > > Unless he is making thousands of them, probably not much different. I need only one for now, so don't care about $15 more. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 16MHz is 62.5ns, try getting the zeros crossing detection that accurate > > > > > > > > > > > > > > > > > > Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. > > > > > > > > > > > > > > > > > > > > > > > > > why would you need to use the prescaler? incrementing a variable > > > > > > > > > > > > > > > when the timer rolls over every few ms is not an issue > > > > > > > > > > > > > > That implies prescaler already. Have you programmed the AVR hardware counter? > > > > > > > > > > > > OK, you can do up to 4ms without prescaler. But when the gen kick in, it could be several seconds. > > > > > > > > > > More precisely, you can do one 16 bit counter without prescaler. Will need the prescaler with any of the 8 bits counters. At 4ms intervals, there are over 200 interrupts per second, and the exact timing depends on the software. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > As for FPGA, you can use up to 8000 bit counter on a cyclone II. > > > > > > > > > > > > > > > > sure but what would be the point? > > > > > > > > > > > > > > Simple, straight forward implementation. > > > > > > > > > > In my case, i need to monitor and control 6 to 8 individual motors. Can't find enough precision timer in micros. It's easier to migrate up with FPGA. > > > > > > > > how many timers do you need? > > > > > > 6 to 8. One per BLDC motor. > > > > how did we get from measuring 60Hz to running BLDC motors? > > Very similar situation, especially for the ram up and down requirements. That's why i was interested in this thread. Raming up or down a motor or generator is transient responses, not steady state. Easy to oversample for steady state as Don said. But if you need to measure system characteristics with transient responses, forget about micros. an MCU will have absolutely no problem measuring the period of a 60Hz to the precision of the xtal running multiple BLDC is totally different
[toc] | [prev] | [next] | [standalone]
| From | krw@notreal.com |
|---|---|
| Date | 2017-07-02 19:53 -0400 |
| Message-ID | <4q1jlc56l9eo1pdaeg2tkdqu5p5ep7v38r@4ax.com> |
| In reply to | #466618 |
On Sun, 2 Jul 2017 16:36:06 -0700 (PDT), Lasse Langwadt Christensen <langwadt@fonz.dk> wrote: >Den mandag den 3. juli 2017 kl. 01.26.21 UTC+2 skrev edward....@gmail.com: >> On Sunday, July 2, 2017 at 4:23:59 PM UTC-7, Lasse Langwadt Christensen wrote: >> > Den mandag den 3. juli 2017 kl. 00.44.32 UTC+2 skrev edward....@gmail.com: >> > > On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: >> > > > On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: >> > > > > On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen wrote: >> > > > > > Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev edward....@gmail.com: >> > > > > > > On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: >> > > > > > > > Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: >> > > > > > > > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: >> > > > > > > > > > I believe the main concern is the start/stop kick in/out times. >> > > > > > > > > > If it's feeding some time clocks, they could be off by seconds. To be >> > > > > > > > > > truly accurate, you would need to adjust following frequencies to >> > > > > > > > > > compensate. >> > > > > > > > > > >> > > > > > > > > > To echo rickman, perfect job for an FPGA. >> > > > > > > > > >> > > > > > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is >> > > > > > > > > inadequate to directly monitor any operational parameter of a 60 Hz >> > > > > > > > > generator is certainly interesting. >> > > > > > > > > >> > > > > > > > > The requirement for an FPGA to do this particular job is even more >> > > > > > > > > interesting. >> > > > > > > > >> > > > > > > > by interesting I assume you mean crazy ;) >> > > > > > > >> > > > > > > Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. >> > > > > > > >> > > > > > >> > > > > > and a board with an mcu is $1 >> > > > > >> > > > > Unless he is making thousands of them, probably not much different. I need only one for now, so don't care about $15 more. >> > > > > >> > > > > > >> > > > > > > > >> > > > > > > > 16MHz is 62.5ns, try getting the zeros crossing detection that accurate >> > > > > > > >> > > > > > > Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. >> > > > > > > >> > > > > > >> > > > > > why would you need to use the prescaler? incrementing a variable >> > > > > >> > > > > > when the timer rolls over every few ms is not an issue >> > > > > >> > > > > That implies prescaler already. Have you programmed the AVR hardware counter? >> > > > >> > > > OK, you can do up to 4ms without prescaler. But when the gen kick in, it could be several seconds. >> > > >> > > More precisely, you can do one 16 bit counter without prescaler. Will need the prescaler with any of the 8 bits counters. At 4ms intervals, there are over 200 interrupts per second, and the exact timing depends on the software. >> > > >> > > > >> > > > > >> > > > > > >> > > > > > > As for FPGA, you can use up to 8000 bit counter on a cyclone II. >> > > > > > >> > > > > > sure but what would be the point? >> > > > > >> > > > > Simple, straight forward implementation. >> > > >> > > In my case, i need to monitor and control 6 to 8 individual motors. Can't find enough precision timer in micros. It's easier to migrate up with FPGA. >> > >> > how many timers do you need? >> >> 6 to 8. One per BLDC motor. > >how did we get from measuring 60Hz to running BLDC motors? Sounds like a Baer of a problem.
[toc] | [prev] | [next] | [standalone]
| From | Tauno Voipio <tauno.voipio@notused.fi.invalid> |
|---|---|
| Date | 2017-07-03 10:30 +0300 |
| Message-ID | <ojcrk2$a5v$1@dont-email.me> |
| In reply to | #466608 |
On 3.7.17 01:44, edward.ming.lee@gmail.com wrote: > On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: >> On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: >>> On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen wrote: >>>> Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev edward....@gmail.com: >>>>> On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: >>>>>> Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: >>>>>>> On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: >>>>>>>> I believe the main concern is the start/stop kick in/out times. >>>>>>>> If it's feeding some time clocks, they could be off by seconds. To be >>>>>>>> truly accurate, you would need to adjust following frequencies to >>>>>>>> compensate. >>>>>>>> >>>>>>>> To echo rickman, perfect job for an FPGA. >>>>>>> >>>>>>> The notion that a single-cycle-per-instruction MCU running at 16 MHz is >>>>>>> inadequate to directly monitor any operational parameter of a 60 Hz >>>>>>> generator is certainly interesting. >>>>>>> >>>>>>> The requirement for an FPGA to do this particular job is even more >>>>>>> interesting. >>>>>> >>>>>> by interesting I assume you mean crazy ;) >>>>> >>>>> Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. >>>>> >>>> >>>> and a board with an mcu is $1 >>> >>> Unless he is making thousands of them, probably not much different. I need only one for now, so don't care about $15 more. >>> >>>> >>>>>> >>>>>> 16MHz is 62.5ns, try getting the zeros crossing detection that accurate >>>>> >>>>> Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. >>>>> >>>> >>>> why would you need to use the prescaler? incrementing a variable >>> >>>> when the timer rolls over every few ms is not an issue >>> >>> That implies prescaler already. Have you programmed the AVR hardware counter? >> >> OK, you can do up to 4ms without prescaler. But when the gen kick in, it could be several seconds. > > More precisely, you can do one 16 bit counter without prescaler. Will need the prescaler with any of the 8 bits counters. At 4ms intervals, there are over 200 interrupts per second, and the exact timing depends on the software. > >> >>> >>>> >>>>> As for FPGA, you can use up to 8000 bit counter on a cyclone II. >>>> >>>> sure but what would be the point? >>> >>> Simple, straight forward implementation. > > In my case, i need to monitor and control 6 to 8 individual motors. Can't find enough precision timer in micros. It's easier to migrate up with FPGA. AT91SAM4E has 9 good long timers. -- -TV
[toc] | [prev] | [next] | [standalone]
| From | Don Y <blockedofcourse@foo.invalid> |
|---|---|
| Date | 2017-07-03 09:44 -0700 |
| Message-ID | <ojds2k$oc8$1@dont-email.me> |
| In reply to | #466608 |
On 7/2/2017 3:44 PM, edward.ming.lee@gmail.com wrote: > On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: >> On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: >>> On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen >>> wrote: >>>> Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev >>>> edward....@gmail.com: >>>>> On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt >>>>> Christensen wrote: >>>>>> Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, >>>>>> KE5FX: >>>>>>> On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, >>>>>>> edward....@gmail.com wrote: >>>>>>>> I believe the main concern is the start/stop kick in/out >>>>>>>> times. If it's feeding some time clocks, they could be off by >>>>>>>> seconds. To be truly accurate, you would need to adjust >>>>>>>> following frequencies to compensate. >>>>>>>> >>>>>>>> To echo rickman, perfect job for an FPGA. >>>>>>> >>>>>>> The notion that a single-cycle-per-instruction MCU running at 16 >>>>>>> MHz is inadequate to directly monitor any operational parameter >>>>>>> of a 60 Hz generator is certainly interesting. >>>>>>> >>>>>>> The requirement for an FPGA to do this particular job is even >>>>>>> more interesting. >>>>>> >>>>>> by interesting I assume you mean crazy ;) >>>>> >>>>> Why not, some FPGA boards are really cheap. Just got my $16 cyclone >>>>> II board including shipping from China. Oh, a free USB blaster >>>>> programmer too. >>>>> >>>> >>>> and a board with an mcu is $1 >>> >>> Unless he is making thousands of them, probably not much different. I >>> need only one for now, so don't care about $15 more. >>> >>>> >>>>>> >>>>>> 16MHz is 62.5ns, try getting the zeros crossing detection that >>>>>> accurate >>>>> >>>>> Except that you can't sample at 16Mhz, you have to use the 10 bits >>>>> prescaler. But what prescaler do you set to range from 0.01ms to >>>>> seconds. >>>>> >>>> >>>> why would you need to use the prescaler? incrementing a variable >>> >>>> when the timer rolls over every few ms is not an issue >>> >>> That implies prescaler already. Have you programmed the AVR hardware >>> counter? >> >> OK, you can do up to 4ms without prescaler. But when the gen kick in, it >> could be several seconds. > > More precisely, you can do one 16 bit counter without prescaler. Will need > the prescaler with any of the 8 bits counters. At 4ms intervals, there are > over 200 interrupts per second, and the exact timing depends on the > software. 200 ISR's per second is nothing -- that's a 19200 baud UART being serviced without a FIFO (I could handle 8 of them with a dinky Z80... TxINT *and* RxINT for a total of ~400/UART/second). When *measuring* things, you only need to extend the hardware counter (i.e., count carry-outs in software -- like with an ISR) *if* the range of measured intervals exceeds the capacity of your counter/timer. The OP is discussing measuring line frequency. It's unlikely that he's expecting to encounter 0.0001Hz *or* 400Hz! So (when he tells us the range that he expects to see -- on a cycle-to-cycle variation). if he can constrain his observations to, for example, nominally 16.6ms with as few as, perhaps, 15ms (66Hz) or as many as 18.9ms (52Hz) per *period* (things get BETTER if you can measure all zero crossings!), then a 4ms timer wraparound is sufficient WITHOUT counting "carryouts" in software. Assume counter is zeroed at one "LFC event" (just for the sake of argument, you can zero it mathematically while it is free-running). For a 15ms period, you will eventually read it as indicating *3* on the next LFC event (4ms+4ms+4ms+3ms=15ms). It's wrapped 3 times and you've not observed ANY of those wraps! Yet, you KNOW it must have been 15ms cuz 3, 7, 11, 19, 23... are the only other values possible (and 19 is just beyond the window of legal values). Assume it continues on for another 18ms to the next LFC event. This will occur at t=33ms (in "actual time") but will be indicated by a timer value of "1" (4+4+4+3 + 4+4+4+4+2 = 33; 33 mod 4=1). Mathematically zeroing out the previous "3" effectively converts this "1" observation to a "2" meaning the only valid interval would be 18ms (cus 2, 6, 10, 14, 22... are all outside the accepted range). So, he gets the measurement precision associated with the clock sourced for a 4ms timer translated to cover the range of expected intervals *without* having to count carry-outs! [Only he can indicate if this range of frequencies is possible with the mover *behind* the generator]
[toc] | [prev] | [next] | [standalone]
| From | Don Y <blockedofcourse@foo.invalid> |
|---|---|
| Date | 2017-07-03 09:50 -0700 |
| Message-ID | <ojdsd5$pl0$1@dont-email.me> |
| In reply to | #466722 |
On 7/3/2017 9:44 AM, Don Y wrote: >> More precisely, you can do one 16 bit counter without prescaler. Will need >> the prescaler with any of the 8 bits counters. At 4ms intervals, there are >> over 200 interrupts per second, and the exact timing depends on the >> software. > > 200 ISR's per second is nothing -- that's a 19200 baud UART being serviced > without a FIFO (I could handle 8 of them with a dinky Z80... TxINT *and* > RxINT for a total of ~400/UART/second). Gack! Too early in the day! 19200 baud is 2 *thousand* per second! And, an RxISR is more complex than a "counter overflow" ISR (OTOH, you can invoke hardware/software handshaking to throttle the incoming byte stream *and* throttle the outgoing byte stream "on demand") Note that a legacy Z80 executes about 1-1.5 million fetches per second and an I/O access -- to talk to the UART or its control register -- would take 1.5us (three bus cycles)
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2017-07-04 05:18 +0000 |
| Message-ID | <ojf8f7$h1d$2@gonzo.alcatraz> |
| In reply to | #466608 |
On 2017-07-02, edward.ming.lee@gmail.com <edward.ming.lee@gmail.com> wrote: > On Sunday, July 2, 2017 at 2:49:03 PM UTC-7, edward....@gmail.com wrote: >> On Sunday, July 2, 2017 at 2:44:18 PM UTC-7, edward....@gmail.com wrote: >> > On Sunday, July 2, 2017 at 2:37:18 PM UTC-7, Lasse Langwadt Christensen wrote: >> > > Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev edward....@gmail.com: >> > > > On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: >> > > > > Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: >> > > > > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: >> > > > > > > I believe the main concern is the start/stop kick in/out times. >> > > > > > > If it's feeding some time clocks, they could be off by seconds. To be >> > > > > > > truly accurate, you would need to adjust following frequencies to >> > > > > > > compensate. >> > > > > > > >> > > > > > > To echo rickman, perfect job for an FPGA. >> > > > > > >> > > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is >> > > > > > inadequate to directly monitor any operational parameter of a 60 Hz >> > > > > > generator is certainly interesting. >> > > > > > >> > > > > > The requirement for an FPGA to do this particular job is even more >> > > > > > interesting. >> > > > > >> > > > > by interesting I assume you mean crazy ;) >> > > > >> > > > Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. >> > > > >> > > >> > > and a board with an mcu is $1 >> > >> > Unless he is making thousands of them, probably not much different. I need only one for now, so don't care about $15 more. >> > >> > > >> > > > > >> > > > > 16MHz is 62.5ns, try getting the zeros crossing detection that accurate >> > > > >> > > > Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. >> > > > >> > > >> > > why would you need to use the prescaler? incrementing a variable >> > >> > > when the timer rolls over every few ms is not an issue >> > >> > That implies prescaler already. Have you programmed the AVR hardware counter? >> >> OK, you can do up to 4ms without prescaler. But when the gen kick in, it could be several seconds. > > More precisely, you can do one 16 bit counter without prescaler. Will need the prescaler with any of the 8 bits counters. At 4ms intervals, there are over 200 interrupts per second, and the exact timing depends on the software. There's trivial work-arounds for that unpredicability. -- basically read twice and throw out the duff value.. The timer capture feature is hardware, and the value it returns is acurate to one clock cycle. -- This email has not been checked by half-arsed antivirus software
[toc] | [prev] | [next] | [standalone]
| From | Les Cargill <lcargill99@comcast.com> |
|---|---|
| Date | 2017-07-03 00:44 -0500 |
| Message-ID | <ojcl91$qrb$2@dont-email.me> |
| In reply to | #466591 |
Lasse Langwadt Christensen wrote: > Den søndag den 2. juli 2017 kl. 23.19.03 UTC+2 skrev > edward....@gmail.com: >> On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt >> Christensen wrote: >>> Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, >>> KE5FX: >>>> On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, >>>> edward....@gmail.com wrote: >>>>> I believe the main concern is the start/stop kick in/out >>>>> times. If it's feeding some time clocks, they could be off by >>>>> seconds. To be truly accurate, you would need to adjust >>>>> following frequencies to compensate. >>>>> >>>>> To echo rickman, perfect job for an FPGA. >>>> >>>> The notion that a single-cycle-per-instruction MCU running at >>>> 16 MHz is inadequate to directly monitor any operational >>>> parameter of a 60 Hz generator is certainly interesting. >>>> >>>> The requirement for an FPGA to do this particular job is even >>>> more interesting. >>> >>> by interesting I assume you mean crazy ;) >> >> Why not, some FPGA boards are really cheap. Just got my $16 >> cyclone II board including shipping from China. Oh, a free USB >> blaster programmer too. >> > > and a board with an mcu is $1 > >>> >>> 16MHz is 62.5ns, try getting the zeros crossing detection that >>> accurate >> >> Except that you can't sample at 16Mhz, you have to use the 10 bits >> prescaler. But what prescaler do you set to range from 0.01ms to >> seconds. >> > > why would you need to use the prescaler? incrementing a variable when > the timer rolls over every few ms is not an issue > You don't need it. They have a call in the library - micros() that rolls over every 70 seconds or so. >> As for FPGA, you can use up to 8000 bit counter on a cyclone II. > > sure but what would be the point? > -- Les Cargill
[toc] | [prev] | [next] | [standalone]
| From | Les Cargill <lcargill99@comcast.com> |
|---|---|
| Date | 2017-07-03 00:42 -0500 |
| Message-ID | <ojcl6f$qrb$1@dont-email.me> |
| In reply to | #466586 |
edward.ming.lee@gmail.com wrote:
> On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt
> Christensen wrote:
>> Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles,
>> KE5FX:
>>> On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com
>>> wrote:
>>>> I believe the main concern is the start/stop kick in/out times.
>>>> If it's feeding some time clocks, they could be off by
>>>> seconds. To be truly accurate, you would need to adjust
>>>> following frequencies to compensate.
>>>>
>>>> To echo rickman, perfect job for an FPGA.
>>>
>>> The notion that a single-cycle-per-instruction MCU running at 16
>>> MHz is inadequate to directly monitor any operational parameter
>>> of a 60 Hz generator is certainly interesting.
>>>
>>> The requirement for an FPGA to do this particular job is even
>>> more interesting.
>>
>> by interesting I assume you mean crazy ;)
>
> Why not, some FPGA boards are really cheap. Just got my $16 cyclone
> II board including shipping from China. Oh, a free USB blaster
> programmer too.
>
>>
>> 16MHz is 62.5ns, try getting the zeros crossing detection that
>> accurate
>
> Except that you can't sample at 16Mhz, you have to use the 10 bits
> prescaler. But what prescaler do you set to range from 0.01ms to
> seconds.
>
you can precondition the waveform to drive
comparators or PIO and use the micros() routine from the
library for time. And you can do that with "half amplitude crossing"
{ pi/4, 3*pi/4, 5*pi/4 and 7*pi/4 } then smudge an estimator
of frequency from that.
That is how I'd do it
> As for FPGA, you can use up to 8000 bit counter on a cyclone II.
>
I see Maslow's Silver Hammer :) I've been eyeballing those little things.
Soon.
--
Les Cargill
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2017-07-04 05:11 +0000 |
| Message-ID | <ojf826$h1d$1@gonzo.alcatraz> |
| In reply to | #466586 |
On 2017-07-02, edward.ming.lee@gmail.com <edward.ming.lee@gmail.com> wrote: > On Sunday, July 2, 2017 at 1:12:34 PM UTC-7, Lasse Langwadt Christensen wrote: >> Den søndag den 2. juli 2017 kl. 21.55.52 UTC+2 skrev John Miles, KE5FX: >> > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: >> > > I believe the main concern is the start/stop kick in/out times. >> > > If it's feeding some time clocks, they could be off by seconds. To be >> > > truly accurate, you would need to adjust following frequencies to >> > > compensate. >> > > >> > > To echo rickman, perfect job for an FPGA. >> > >> > The notion that a single-cycle-per-instruction MCU running at 16 MHz is >> > inadequate to directly monitor any operational parameter of a 60 Hz >> > generator is certainly interesting. >> > >> > The requirement for an FPGA to do this particular job is even more >> > interesting. >> >> by interesting I assume you mean crazy ;) > > Why not, some FPGA boards are really cheap. Just got my $16 cyclone II board including shipping from China. Oh, a free USB blaster programmer too. > >> >> 16MHz is 62.5ns, try getting the zeros crossing detection that accurate > > Except that you can't sample at 16Mhz, you have to use the 10 bits prescaler. But what prescaler do you set to range from 0.01ms to seconds. run the counter at 16Mhz and use an external zero crossing detector to fire the timer capture event a little arithmetic will tell you how many fractional microseconds the event was early or late by. the hardware counter only goes to 65536 but you can widen it using interrupts. -- This email has not been checked by half-arsed antivirus software
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2017-07-02 19:32 -0400 |
| Message-ID | <ojbvjp$c1l$1@dont-email.me> |
| In reply to | #466577 |
John Miles, KE5FX wrote on 7/2/2017 3:55 PM: > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: >> I believe the main concern is the start/stop kick in/out times. >> If it's feeding some time clocks, they could be off by seconds. To be >> truly accurate, you would need to adjust following frequencies to >> compensate. >> >> To echo rickman, perfect job for an FPGA. > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is > inadequate to directly monitor any operational parameter of a 60 Hz > generator is certainly interesting. > > The requirement for an FPGA to do this particular job is even more > interesting. Yes, you can fix a leak in a boat with any manner of wadding including chewing gum. I'm sure a timer or even a delay loop is adequate to measure the period of a 60 Hz signal... depending on you requirements. If you need better than 1 part in 10,000 or 100 ppm, I wouldn't rely on a software loop. The point is an FPGA will get all the resolution and accuracy you need with a decent clock. An MCU will want built in hardware support of some sort or you won't be able to support the full accuracy of the timing base. BTW, your assumption of single clock cycle per instruction CPU is not so easy to come by other than custom processors in FPGAs. Those I know how they work. Which common CPUs are single clock per instruction (or a fixed clock count)? -- Rick C
[toc] | [prev] | [next] | [standalone]
| From | Lasse Langwadt Christensen <langwadt@fonz.dk> |
|---|---|
| Date | 2017-07-02 16:40 -0700 |
| Message-ID | <c0f9ba17-90da-4ebb-a406-8d17d5f5dec1@googlegroups.com> |
| In reply to | #466617 |
Den mandag den 3. juli 2017 kl. 01.32.49 UTC+2 skrev rickman: > John Miles, KE5FX wrote on 7/2/2017 3:55 PM: > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: > >> I believe the main concern is the start/stop kick in/out times. > >> If it's feeding some time clocks, they could be off by seconds. To be > >> truly accurate, you would need to adjust following frequencies to > >> compensate. > >> > >> To echo rickman, perfect job for an FPGA. > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is > > inadequate to directly monitor any operational parameter of a 60 Hz > > generator is certainly interesting. > > > > The requirement for an FPGA to do this particular job is even more > > interesting. > > Yes, you can fix a leak in a boat with any manner of wadding including > chewing gum. I'm sure a timer or even a delay loop is adequate to measure > the period of a 60 Hz signal... depending on you requirements. If you need > better than 1 part in 10,000 or 100 ppm, I wouldn't rely on a software loop. > > The point is an FPGA will get all the resolution and accuracy you need with > a decent clock. An MCU will want built in hardware support of some sort or > you won't be able to support the full accuracy of the timing base. most MCU timer can capture a timer on a pin edge, that is all you need > > BTW, your assumption of single clock cycle per instruction CPU is not so > easy to come by other than custom processors in FPGAs. Those I know how > they work. Which common CPUs are single clock per instruction (or a fixed > clock count)? AVR?
[toc] | [prev] | [next] | [standalone]
| From | klaus.kragelund@gmail.com |
|---|---|
| Date | 2017-07-02 16:45 -0700 |
| Message-ID | <d2a36f39-44b2-4bcf-bce7-95cfed4e685c@googlegroups.com> |
| In reply to | #466620 |
On Monday, 3 July 2017 01:41:02 UTC+2, Lasse Langwadt Christensen wrote: > Den mandag den 3. juli 2017 kl. 01.32.49 UTC+2 skrev rickman: > > John Miles, KE5FX wrote on 7/2/2017 3:55 PM: > > > On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: > > >> I believe the main concern is the start/stop kick in/out times. > > >> If it's feeding some time clocks, they could be off by seconds. To be > > >> truly accurate, you would need to adjust following frequencies to > > >> compensate. > > >> > > >> To echo rickman, perfect job for an FPGA. > > > > > > The notion that a single-cycle-per-instruction MCU running at 16 MHz is > > > inadequate to directly monitor any operational parameter of a 60 Hz > > > generator is certainly interesting. > > > > > > The requirement for an FPGA to do this particular job is even more > > > interesting. > > > > Yes, you can fix a leak in a boat with any manner of wadding including > > chewing gum. I'm sure a timer or even a delay loop is adequate to measure > > the period of a 60 Hz signal... depending on you requirements. If you need > > better than 1 part in 10,000 or 100 ppm, I wouldn't rely on a software loop. > > > > The point is an FPGA will get all the resolution and accuracy you need with > > a decent clock. An MCU will want built in hardware support of some sort or > > you won't be able to support the full accuracy of the timing base. > > most MCU timer can capture a timer on a pin edge, that is all you need > > > > > BTW, your assumption of single clock cycle per instruction CPU is not so > > easy to come by other than custom processors in FPGAs. Those I know how > > they work. Which common CPUs are single clock per instruction (or a fixed > > clock count)? > > AVR? Most Cortex MCU's can pipeline the timers, so you can easily make a 128 bit timer if you want Cheers Klaus
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2017-07-02 19:55 -0400 |
| Message-ID | <ojc0to$enq$1@dont-email.me> |
| In reply to | #466620 |
Lasse Langwadt Christensen wrote on 7/2/2017 7:40 PM: > Den mandag den 3. juli 2017 kl. 01.32.49 UTC+2 skrev rickman: >> John Miles, KE5FX wrote on 7/2/2017 3:55 PM: >>> On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: >>>> I believe the main concern is the start/stop kick in/out times. >>>> If it's feeding some time clocks, they could be off by seconds. To be >>>> truly accurate, you would need to adjust following frequencies to >>>> compensate. >>>> >>>> To echo rickman, perfect job for an FPGA. >>> >>> The notion that a single-cycle-per-instruction MCU running at 16 MHz is >>> inadequate to directly monitor any operational parameter of a 60 Hz >>> generator is certainly interesting. >>> >>> The requirement for an FPGA to do this particular job is even more >>> interesting. >> >> Yes, you can fix a leak in a boat with any manner of wadding including >> chewing gum. I'm sure a timer or even a delay loop is adequate to measure >> the period of a 60 Hz signal... depending on you requirements. If you need >> better than 1 part in 10,000 or 100 ppm, I wouldn't rely on a software loop. >> >> The point is an FPGA will get all the resolution and accuracy you need with >> a decent clock. An MCU will want built in hardware support of some sort or >> you won't be able to support the full accuracy of the timing base. > > most MCU timer can capture a timer on a pin edge, that is all you need > >> >> BTW, your assumption of single clock cycle per instruction CPU is not so >> easy to come by other than custom processors in FPGAs. Those I know how >> they work. Which common CPUs are single clock per instruction (or a fixed >> clock count)? > > AVR? I wasn't aware of that. Every instruction uses a single clock cycle? Interesting. -- Rick C
[toc] | [prev] | [next] | [standalone]
| From | Lasse Langwadt Christensen <langwadt@fonz.dk> |
|---|---|
| Date | 2017-07-02 17:07 -0700 |
| Message-ID | <7e2d4864-24b5-4036-bcbb-d5a5b05812e7@googlegroups.com> |
| In reply to | #466626 |
Den mandag den 3. juli 2017 kl. 01.55.12 UTC+2 skrev rickman: > Lasse Langwadt Christensen wrote on 7/2/2017 7:40 PM: > > Den mandag den 3. juli 2017 kl. 01.32.49 UTC+2 skrev rickman: > >> John Miles, KE5FX wrote on 7/2/2017 3:55 PM: > >>> On Sunday, July 2, 2017 at 7:56:04 AM UTC-7, edward....@gmail.com wrote: > >>>> I believe the main concern is the start/stop kick in/out times. > >>>> If it's feeding some time clocks, they could be off by seconds. To be > >>>> truly accurate, you would need to adjust following frequencies to > >>>> compensate. > >>>> > >>>> To echo rickman, perfect job for an FPGA. > >>> > >>> The notion that a single-cycle-per-instruction MCU running at 16 MHz is > >>> inadequate to directly monitor any operational parameter of a 60 Hz > >>> generator is certainly interesting. > >>> > >>> The requirement for an FPGA to do this particular job is even more > >>> interesting. > >> > >> Yes, you can fix a leak in a boat with any manner of wadding including > >> chewing gum. I'm sure a timer or even a delay loop is adequate to measure > >> the period of a 60 Hz signal... depending on you requirements. If you need > >> better than 1 part in 10,000 or 100 ppm, I wouldn't rely on a software loop. > >> > >> The point is an FPGA will get all the resolution and accuracy you need with > >> a decent clock. An MCU will want built in hardware support of some sort or > >> you won't be able to support the full accuracy of the timing base. > > > > most MCU timer can capture a timer on a pin edge, that is all you need > > > >> > >> BTW, your assumption of single clock cycle per instruction CPU is not so > >> easy to come by other than custom processors in FPGAs. Those I know how > >> they work. Which common CPUs are single clock per instruction (or a fixed > >> clock count)? > > > > AVR? > > I wasn't aware of that. Every instruction uses a single clock cycle? > Interesting. sorta, can't use the bus for more than one thing at a time http://www.atmel.com/images/Atmel-0856-AVR-Instruction-Set-Manual.pdf section 4
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2017-07-02 20:30 -0400 |
| Message-ID | <ojc2vh$jhb$1@dont-email.me> |
| In reply to | #466628 |
Lasse Langwadt Christensen wrote on 7/2/2017 8:07 PM: > Den mandag den 3. juli 2017 kl. 01.55.12 UTC+2 skrev rickman: >> Lasse Langwadt Christensen wrote on 7/2/2017 7:40 PM: >>> Den mandag den 3. juli 2017 kl. 01.32.49 UTC+2 skrev rickman: >>>> >>>> BTW, your assumption of single clock cycle per instruction CPU is not so >>>> easy to come by other than custom processors in FPGAs. Those I know how >>>> they work. Which common CPUs are single clock per instruction (or a fixed >>>> clock count)? >>> >>> AVR? >> >> I wasn't aware of that. Every instruction uses a single clock cycle? >> Interesting. > > sorta, can't use the bus for more than one thing at a time > > http://www.atmel.com/images/Atmel-0856-AVR-Instruction-Set-Manual.pdf > > section 4 As I thought, the cycle counts range to at least 5. Even simple bit manipulation of an I/O register uses 2 clocks. -- Rick C
[toc] | [prev] | [next] | [standalone]
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
Back to top | Article view | sci.electronics.design
csiph-web