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 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
| From | edward.ming.lee@gmail.com |
|---|---|
| Date | 2017-07-02 17:39 -0700 |
| Message-ID | <85c09cba-af9e-4574-a6bd-32867c44a252@googlegroups.com> |
| In reply to | #466631 |
On Sunday, July 2, 2017 at 5:30:20 PM UTC-7, rickman wrote: > 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. And if you need to increment a multi-byte variable, taking care of 8 bit carry flags. It's going to be more than a handful of instructions and unpredictable software loops.
[toc] | [prev] | [next] | [standalone]
| From | klaus.kragelund@gmail.com |
|---|---|
| Date | 2017-07-02 18:09 -0700 |
| Message-ID | <f27d6f4f-a126-400d-a3a0-20e9893e05ee@googlegroups.com> |
| In reply to | #466632 |
On Monday, 3 July 2017 02:39:24 UTC+2, edward....@gmail.com wrote: > On Sunday, July 2, 2017 at 5:30:20 PM UTC-7, rickman wrote: > > 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. > > And if you need to increment a multi-byte variable, taking care of 8 bit carry flags. It's going to be more than a handful of instructions and unpredictable software loops. Step into this millennium and use a 32bit microcontroller. Using compare registers you can trigger detection without CPU intervention, using DMA Cheers Klaus
[toc] | [prev] | [next] | [standalone]
| From | edward.ming.lee@gmail.com |
|---|---|
| Date | 2017-07-02 18:45 -0700 |
| Message-ID | <ce674684-ca04-449f-aab5-248354a47bff@googlegroups.com> |
| In reply to | #466636 |
On Sunday, July 2, 2017 at 6:09:20 PM UTC-7, klaus.k...@gmail.com wrote: > On Monday, 3 July 2017 02:39:24 UTC+2, edward....@gmail.com wrote: > > On Sunday, July 2, 2017 at 5:30:20 PM UTC-7, rickman wrote: > > > 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. > > > > And if you need to increment a multi-byte variable, taking care of 8 bit carry flags. It's going to be more than a handful of instructions and unpredictable software loops. > > Step into this millennium and use a 32bit microcontroller. Using compare registers you can trigger detection without CPU intervention, using DMA > Yes, i might use micros inside the FPGA, with dedicated counters. Counters are cheap. Micro IPs are more expensive (in logic elements). My goal is to replace 8 micros with a single FPGA.
[toc] | [prev] | [next] | [standalone]
| From | "John Miles, KE5FX" <jmiles@gmail.com> |
|---|---|
| Date | 2017-07-02 17:49 -0700 |
| Message-ID | <04e3b8b5-cbe7-41ff-af0e-8a14002afc80@googlegroups.com> |
| In reply to | #466631 |
On Sunday, July 2, 2017 at 5:30:20 PM UTC-7, rickman wrote: > As I thought, the cycle counts range to at least 5. Even simple bit > manipulation of an I/O register uses 2 clocks. The individual instruction timings vary, but the AVR architecture is rated at more or less 1 MIPS per MHz. Interrupt latency is substantially less than a microsecond. 50 cycles at 16 MHz = about 1/15th of a degree at 3600 RPM. -- john, KE5FX
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2017-07-02 22:56 -0400 |
| Message-ID | <ojcbh8$5ho$1@dont-email.me> |
| In reply to | #466633 |
John Miles, KE5FX wrote on 7/2/2017 8:49 PM: > On Sunday, July 2, 2017 at 5:30:20 PM UTC-7, rickman wrote: >> As I thought, the cycle counts range to at least 5. Even simple bit >> manipulation of an I/O register uses 2 clocks. > > The individual instruction timings vary, but the AVR architecture is rated > at more or less 1 MIPS per MHz. Interrupt latency is substantially less > than a microsecond. > > 50 cycles at 16 MHz = about 1/15th of a degree at 3600 RPM. You mean less or less, no? Clearly it won't reach 1 MIPS per MHz if *any* instructions you use are more than one clock. I found a large number of important instructions that are more than 1 clock just as you would find with many MCUs. -- Rick C
[toc] | [prev] | [next] | [standalone]
| From | "John Miles, KE5FX" <jmiles@gmail.com> |
|---|---|
| Date | 2017-07-02 21:52 -0700 |
| Message-ID | <09148598-f3bd-48ab-a6ee-7bd7a97217c9@googlegroups.com> |
| In reply to | #466647 |
On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: > You mean less or less, no? Clearly it won't reach 1 MIPS per MHz if *any* > instructions you use are more than one clock. I found a large number of > important instructions that are more than 1 clock just as you would find > with many MCUs. (Shrug) You'd have to take that up with Microchip's marketing department, I suppose. These parts have long been colloquially referred to as "1 MIPS per MHz." Usually this gets trotted out in flame wars between PIC advocates and AVR devotees. Now that the same company owns both architectures, and given how archaic they both are, it hardly seems worth arguing about. But... given that I've implemented a 3600 bps software modem (or at least the 'dem' half) on an ATmega128 without even resorting to assembly, I'm sure they can be used to measure the speed of pretty much any motor or generator to an adequate degree of both accuracy and precision. AVRs are great parts, much better than PICs. <g,d&r> -- john, KE5FX
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2017-07-03 01:38 -0400 |
| Message-ID | <ojcl1p$qgj$1@dont-email.me> |
| In reply to | #466653 |
John Miles, KE5FX wrote on 7/3/2017 12:52 AM: > On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: >> You mean less or less, no? Clearly it won't reach 1 MIPS per MHz if *any* >> instructions you use are more than one clock. I found a large number of >> important instructions that are more than 1 clock just as you would find >> with many MCUs. > > (Shrug) You'd have to take that up with Microchip's marketing department, > I suppose. These parts have long been colloquially referred to as "1 > MIPS per MHz." Usually this gets trotted out in flame wars between PIC > advocates and AVR devotees. Now that the same company owns both > architectures, and given how archaic they both are, it hardly seems > worth arguing about. > > But... given that I've implemented a 3600 bps software modem (or > at least the 'dem' half) on an ATmega128 without even resorting > to assembly, I'm sure they can be used to measure the speed of pretty > much any motor or generator to an adequate degree of both accuracy > and precision. AVRs are great parts, much better than PICs. <g,d&r> I get what you are saying, but I think you are not giving the task adequate consideration. A demodulator only needs to sample the waveform fast enough to capture the carrier. The issue with the software is the degree of processing required to demodulate. Implementing a 10 ppm accurate frequency counter in software has very different requirements from an audio signal demodulator. Notably it would require a sample rate of 6 MSPS. Of course if there is hardware on the chip that will do the heavy lifting by clocking at 6 MHz or faster and being capable of capturing the counter state on the fly without corruption while being trigger by an input pin, then the software load is tremendously reduced. Otherwise even a 16 MHz MCU will have a hard time sampling at an adequate rate to retain full accuracy of the crystal. -- Rick C
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2017-07-03 12:37 +0200 |
| Message-ID | <ojd6hm$ebt$1@dont-email.me> |
| In reply to | #466653 |
On 03/07/17 06:52, John Miles, KE5FX wrote: > On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: >> You mean less or less, no? Clearly it won't reach 1 MIPS per MHz if *any* >> instructions you use are more than one clock. I found a large number of >> important instructions that are more than 1 clock just as you would find >> with many MCUs. > > (Shrug) You'd have to take that up with Microchip's marketing department, > I suppose. These parts have long been colloquially referred to as "1 > MIPS per MHz." Usually this gets trotted out in flame wars between PIC > advocates and AVR devotees. Now that the same company owns both > architectures, and given how archaic they both are, it hardly seems > worth arguing about. > > But... given that I've implemented a 3600 bps software modem (or > at least the 'dem' half) on an ATmega128 without even resorting > to assembly, I'm sure they can be used to measure the speed of pretty > much any motor or generator to an adequate degree of both accuracy > and precision. AVRs are great parts, much better than PICs. <g,d&r> > I once made a 115 kbaud software UART on an AVR. But I admit to using assembly :-) I have also seen application notes for /software/ USB 1.0, 1.5 Mb/s, on an AVR. And we are talking here about measuring the frequency of a 60 Hz clock with a 16 MHz microcontroller. 266,667 ticks per cycle. Measure over four cycles for 1 ppm resolution. If you have good enough analogue parts to give a clean signal, it can be handled in an 8-bit hardware timer. It's peanuts.
[toc] | [prev] | [next] | [standalone]
| From | edward.ming.lee@gmail.com |
|---|---|
| Date | 2017-07-03 04:23 -0700 |
| Message-ID | <0b9ae365-1a81-439d-ad63-5860986eb4e6@googlegroups.com> |
| In reply to | #466672 |
On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: > On 03/07/17 06:52, John Miles, KE5FX wrote: > > On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: > >> You mean less or less, no? Clearly it won't reach 1 MIPS per MHz if *any* > >> instructions you use are more than one clock. I found a large number of > >> important instructions that are more than 1 clock just as you would find > >> with many MCUs. > > > > (Shrug) You'd have to take that up with Microchip's marketing department, > > I suppose. These parts have long been colloquially referred to as "1 > > MIPS per MHz." Usually this gets trotted out in flame wars between PIC > > advocates and AVR devotees. Now that the same company owns both > > architectures, and given how archaic they both are, it hardly seems > > worth arguing about. > > > > But... given that I've implemented a 3600 bps software modem (or > > at least the 'dem' half) on an ATmega128 without even resorting > > to assembly, I'm sure they can be used to measure the speed of pretty > > much any motor or generator to an adequate degree of both accuracy > > and precision. AVRs are great parts, much better than PICs. <g,d&r> > > > > I once made a 115 kbaud software UART on an AVR. But I admit to using > assembly :-) I have also seen application notes for /software/ USB 1.0, > 1.5 Mb/s, on an AVR. > > And we are talking here about measuring the frequency of a 60 Hz clock > with a 16 MHz microcontroller. 266,667 ticks per cycle. Measure over > four cycles for 1 ppm resolution. If you have good enough analogue > parts to give a clean signal, it can be handled in an 8-bit hardware > timer. It's peanuts. No, we are not. "Why do you think overloading will affect the frequency? It does not take much power for zero crossings. I beg it would not change the frequency at all. However, it will distort the wave form and make it more triangular than sinusoidal. In other words, you need to capture the exact waveform, not just oversampling it." Perfect job for my FPGA driven SRAM/A2D: 10 millions samples per second, 16 bits, using a cyclone II, 2x 128Kx8 sram, 4x quad comparators and 16x resistors. Have FPGA hammer, looking for FPGA nails.
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2017-07-03 14:10 +0200 |
| Message-ID | <ojdbvs$vd4$2@dont-email.me> |
| In reply to | #466678 |
On 03/07/17 13:23, edward.ming.lee@gmail.com wrote: > On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: >> On 03/07/17 06:52, John Miles, KE5FX wrote: >>> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: >>>> You mean less or less, no? Clearly it won't reach 1 MIPS per >>>> MHz if *any* instructions you use are more than one clock. I >>>> found a large number of important instructions that are more >>>> than 1 clock just as you would find with many MCUs. >>> >>> (Shrug) You'd have to take that up with Microchip's marketing >>> department, I suppose. These parts have long been colloquially >>> referred to as "1 MIPS per MHz." Usually this gets trotted out >>> in flame wars between PIC advocates and AVR devotees. Now that >>> the same company owns both architectures, and given how archaic >>> they both are, it hardly seems worth arguing about. >>> >>> But... given that I've implemented a 3600 bps software modem (or >>> at least the 'dem' half) on an ATmega128 without even resorting >>> to assembly, I'm sure they can be used to measure the speed of >>> pretty much any motor or generator to an adequate degree of both >>> accuracy and precision. AVRs are great parts, much better than >>> PICs. <g,d&r> >>> >> >> I once made a 115 kbaud software UART on an AVR. But I admit to >> using assembly :-) I have also seen application notes for >> /software/ USB 1.0, 1.5 Mb/s, on an AVR. >> >> And we are talking here about measuring the frequency of a 60 Hz >> clock with a 16 MHz microcontroller. 266,667 ticks per cycle. >> Measure over four cycles for 1 ppm resolution. If you have good >> enough analogue parts to give a clean signal, it can be handled in >> an 8-bit hardware timer. It's peanuts. > > No, we are not. > > "Why do you think overloading will affect the frequency? It does not > take much power for zero crossings. I beg it would not change the > frequency at all. However, it will distort the wave form and make it > more triangular than sinusoidal. In other words, you need to capture > the exact waveform, not just oversampling it." > If you need to look at the waveform accurately, and not just measure the frequency, then I have misunderstood the problem. Yes, that requires a good deal more effort. Whether it needs an FPGA or not depends on the sample rates you need and what you are doing with the waveform - an AVR is absolutely fine for measuring power, peaks, periods, etc., but not for calculating harmonics. > Perfect job for my FPGA driven SRAM/A2D: 10 millions samples per > second, 16 bits, using a cyclone II, 2x 128Kx8 sram, 4x quad > comparators and 16x resistors. > > Have FPGA hammer, looking for FPGA nails. >
[toc] | [prev] | [next] | [standalone]
| From | leongdentalsf@gmail.com |
|---|---|
| Date | 2017-07-03 06:14 -0700 |
| Message-ID | <5a647735-1bd6-4716-8df2-1c6e270acb43@googlegroups.com> |
| In reply to | #466688 |
On Monday, July 3, 2017 at 5:10:14 AM UTC-7, David Brown wrote: > On 03/07/17 13:23, edward.ming.lee@gmail.com wrote: > > On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: > >> On 03/07/17 06:52, John Miles, KE5FX wrote: > >>> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: > >>>> You mean less or less, no? Clearly it won't reach 1 MIPS per > >>>> MHz if *any* instructions you use are more than one clock. I > >>>> found a large number of important instructions that are more > >>>> than 1 clock just as you would find with many MCUs. > >>> > >>> (Shrug) You'd have to take that up with Microchip's marketing > >>> department, I suppose. These parts have long been colloquially > >>> referred to as "1 MIPS per MHz." Usually this gets trotted out > >>> in flame wars between PIC advocates and AVR devotees. Now that > >>> the same company owns both architectures, and given how archaic > >>> they both are, it hardly seems worth arguing about. > >>> > >>> But... given that I've implemented a 3600 bps software modem (or > >>> at least the 'dem' half) on an ATmega128 without even resorting > >>> to assembly, I'm sure they can be used to measure the speed of > >>> pretty much any motor or generator to an adequate degree of both > >>> accuracy and precision. AVRs are great parts, much better than > >>> PICs. <g,d&r> > >>> > >> > >> I once made a 115 kbaud software UART on an AVR. But I admit to > >> using assembly :-) I have also seen application notes for > >> /software/ USB 1.0, 1.5 Mb/s, on an AVR. > >> > >> And we are talking here about measuring the frequency of a 60 Hz > >> clock with a 16 MHz microcontroller. 266,667 ticks per cycle. > >> Measure over four cycles for 1 ppm resolution. If you have good > >> enough analogue parts to give a clean signal, it can be handled in > >> an 8-bit hardware timer. It's peanuts. > > > > No, we are not. > > > > "Why do you think overloading will affect the frequency? It does not > > take much power for zero crossings. I beg it would not change the > > frequency at all. However, it will distort the wave form and make it > > more triangular than sinusoidal. In other words, you need to capture > > the exact waveform, not just oversampling it." > > > > If you need to look at the waveform accurately, and not just measure the > frequency, then I have misunderstood the problem. Yes, that requires a > good deal more effort. Whether it needs an FPGA or not depends on the > sample rates you need and what you are doing with the waveform - an AVR > is absolutely fine for measuring power, peaks, periods, etc., but not > for calculating harmonics. FPGA is absolutely essential for noise and distortion measurements. I studied line waveform with my handwired FPGA/SRAM/A2D board before. We needed single cycle capture, not just the average of many cycles. Perhaps 12 bits are good enough, but 16 bits are not too difficult to build. > > > Perfect job for my FPGA driven SRAM/A2D: 10 millions samples per > > second, 16 bits, using a cyclone II, 2x 128Kx8 sram, 4x quad > > comparators and 16x resistors. > > > > Have FPGA hammer, looking for FPGA nails. > >
[toc] | [prev] | [next] | [standalone]
| From | Tom Gardner <spamjunk@blueyonder.co.uk> |
|---|---|
| Date | 2017-07-03 15:46 +0100 |
| Message-ID | <cNs6B.86428$_F5.33559@fx40.am4> |
| In reply to | #466692 |
On 03/07/17 14:14, leongdentalsf@gmail.com wrote: > On Monday, July 3, 2017 at 5:10:14 AM UTC-7, David Brown wrote: >> On 03/07/17 13:23, edward.ming.lee@gmail.com wrote: >>> On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: >>>> On 03/07/17 06:52, John Miles, KE5FX wrote: >>>>> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: >>>>>> You mean less or less, no? Clearly it won't reach 1 MIPS per >>>>>> MHz if *any* instructions you use are more than one clock. I >>>>>> found a large number of important instructions that are more >>>>>> than 1 clock just as you would find with many MCUs. >>>>> >>>>> (Shrug) You'd have to take that up with Microchip's marketing >>>>> department, I suppose. These parts have long been colloquially >>>>> referred to as "1 MIPS per MHz." Usually this gets trotted out >>>>> in flame wars between PIC advocates and AVR devotees. Now that >>>>> the same company owns both architectures, and given how archaic >>>>> they both are, it hardly seems worth arguing about. >>>>> >>>>> But... given that I've implemented a 3600 bps software modem (or >>>>> at least the 'dem' half) on an ATmega128 without even resorting >>>>> to assembly, I'm sure they can be used to measure the speed of >>>>> pretty much any motor or generator to an adequate degree of both >>>>> accuracy and precision. AVRs are great parts, much better than >>>>> PICs. <g,d&r> >>>>> >>>> >>>> I once made a 115 kbaud software UART on an AVR. But I admit to >>>> using assembly :-) I have also seen application notes for >>>> /software/ USB 1.0, 1.5 Mb/s, on an AVR. >>>> >>>> And we are talking here about measuring the frequency of a 60 Hz >>>> clock with a 16 MHz microcontroller. 266,667 ticks per cycle. >>>> Measure over four cycles for 1 ppm resolution. If you have good >>>> enough analogue parts to give a clean signal, it can be handled in >>>> an 8-bit hardware timer. It's peanuts. >>> >>> No, we are not. >>> >>> "Why do you think overloading will affect the frequency? It does not >>> take much power for zero crossings. I beg it would not change the >>> frequency at all. However, it will distort the wave form and make it >>> more triangular than sinusoidal. In other words, you need to capture >>> the exact waveform, not just oversampling it." >>> >> >> If you need to look at the waveform accurately, and not just measure the >> frequency, then I have misunderstood the problem. Yes, that requires a >> good deal more effort. Whether it needs an FPGA or not depends on the >> sample rates you need and what you are doing with the waveform - an AVR >> is absolutely fine for measuring power, peaks, periods, etc., but not >> for calculating harmonics. > > FPGA is absolutely essential for noise and distortion measurements. I studied line waveform with my handwired FPGA/SRAM/A2D board before. We needed single cycle capture, not just the average of many cycles. Perhaps 12 bits are good enough, but 16 bits are not too difficult to build. I'm not so sure of that anymore. I wonder whether the XMOS multicore devices might be sufficient; they have several attributes helpful for DSP applications (MAC operations, saturating arithmetic, many independent cores etc). They appear to be commercially successful in markets based on DSP, e.g. USB high resolution audio and "intelligent" microphone arrays. XMOS also has a decent comms/programming language, environment and dev tools.
[toc] | [prev] | [next] | [standalone]
| From | edward.ming.lee@gmail.com |
|---|---|
| Date | 2017-07-03 08:24 -0700 |
| Message-ID | <60dd3527-3c2e-42f4-851e-c4f87b72cf7e@googlegroups.com> |
| In reply to | #466704 |
On Monday, July 3, 2017 at 7:46:39 AM UTC-7, Tom Gardner wrote: > On 03/07/17 14:14, leongdentalsf@gmail.com wrote: > > On Monday, July 3, 2017 at 5:10:14 AM UTC-7, David Brown wrote: > >> On 03/07/17 13:23, edward.ming.lee@gmail.com wrote: > >>> On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: > >>>> On 03/07/17 06:52, John Miles, KE5FX wrote: > >>>>> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: > >>>>>> You mean less or less, no? Clearly it won't reach 1 MIPS per > >>>>>> MHz if *any* instructions you use are more than one clock. I > >>>>>> found a large number of important instructions that are more > >>>>>> than 1 clock just as you would find with many MCUs. > >>>>> > >>>>> (Shrug) You'd have to take that up with Microchip's marketing > >>>>> department, I suppose. These parts have long been colloquially > >>>>> referred to as "1 MIPS per MHz." Usually this gets trotted out > >>>>> in flame wars between PIC advocates and AVR devotees. Now that > >>>>> the same company owns both architectures, and given how archaic > >>>>> they both are, it hardly seems worth arguing about. > >>>>> > >>>>> But... given that I've implemented a 3600 bps software modem (or > >>>>> at least the 'dem' half) on an ATmega128 without even resorting > >>>>> to assembly, I'm sure they can be used to measure the speed of > >>>>> pretty much any motor or generator to an adequate degree of both > >>>>> accuracy and precision. AVRs are great parts, much better than > >>>>> PICs. <g,d&r> > >>>>> > >>>> > >>>> I once made a 115 kbaud software UART on an AVR. But I admit to > >>>> using assembly :-) I have also seen application notes for > >>>> /software/ USB 1.0, 1.5 Mb/s, on an AVR. > >>>> > >>>> And we are talking here about measuring the frequency of a 60 Hz > >>>> clock with a 16 MHz microcontroller. 266,667 ticks per cycle. > >>>> Measure over four cycles for 1 ppm resolution. If you have good > >>>> enough analogue parts to give a clean signal, it can be handled in > >>>> an 8-bit hardware timer. It's peanuts. > >>> > >>> No, we are not. > >>> > >>> "Why do you think overloading will affect the frequency? It does not > >>> take much power for zero crossings. I beg it would not change the > >>> frequency at all. However, it will distort the wave form and make it > >>> more triangular than sinusoidal. In other words, you need to capture > >>> the exact waveform, not just oversampling it." > >>> > >> > >> If you need to look at the waveform accurately, and not just measure the > >> frequency, then I have misunderstood the problem. Yes, that requires a > >> good deal more effort. Whether it needs an FPGA or not depends on the > >> sample rates you need and what you are doing with the waveform - an AVR > >> is absolutely fine for measuring power, peaks, periods, etc., but not > >> for calculating harmonics. > > > > FPGA is absolutely essential for noise and distortion measurements. I studied line waveform with my handwired FPGA/SRAM/A2D board before. We needed single cycle capture, not just the average of many cycles. Perhaps 12 bits are good enough, but 16 bits are not too difficult to build. > > I'm not so sure of that anymore. > > I wonder whether the XMOS multicore devices might be sufficient; > they have several attributes helpful for DSP applications (MAC > operations, saturating arithmetic, many independent cores etc). Can they meet the burst sampling spec? Namely, initial sampling at 10us. When the signal exceed certain percentage of the expected sinusoidal value, sample at 100ns. Switching has to be done within 10us.
[toc] | [prev] | [next] | [standalone]
| From | Tom Gardner <spamjunk@blueyonder.co.uk> |
|---|---|
| Date | 2017-07-03 17:12 +0100 |
| Message-ID | <Q1u6B.86429$_F5.85568@fx40.am4> |
| In reply to | #466707 |
On 03/07/17 16:24, edward.ming.lee@gmail.com wrote: > On Monday, July 3, 2017 at 7:46:39 AM UTC-7, Tom Gardner wrote: >> On 03/07/17 14:14, leongdentalsf@gmail.com wrote: >>> On Monday, July 3, 2017 at 5:10:14 AM UTC-7, David Brown wrote: >>>> On 03/07/17 13:23, edward.ming.lee@gmail.com wrote: >>>>> On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: >>>>>> On 03/07/17 06:52, John Miles, KE5FX wrote: >>>>>>> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: >>>>>>>> You mean less or less, no? Clearly it won't reach 1 MIPS per >>>>>>>> MHz if *any* instructions you use are more than one clock. I >>>>>>>> found a large number of important instructions that are more >>>>>>>> than 1 clock just as you would find with many MCUs. >>>>>>> >>>>>>> (Shrug) You'd have to take that up with Microchip's marketing >>>>>>> department, I suppose. These parts have long been colloquially >>>>>>> referred to as "1 MIPS per MHz." Usually this gets trotted out >>>>>>> in flame wars between PIC advocates and AVR devotees. Now that >>>>>>> the same company owns both architectures, and given how archaic >>>>>>> they both are, it hardly seems worth arguing about. >>>>>>> >>>>>>> But... given that I've implemented a 3600 bps software modem (or >>>>>>> at least the 'dem' half) on an ATmega128 without even resorting >>>>>>> to assembly, I'm sure they can be used to measure the speed of >>>>>>> pretty much any motor or generator to an adequate degree of both >>>>>>> accuracy and precision. AVRs are great parts, much better than >>>>>>> PICs. <g,d&r> >>>>>>> >>>>>> >>>>>> I once made a 115 kbaud software UART on an AVR. But I admit to >>>>>> using assembly :-) I have also seen application notes for >>>>>> /software/ USB 1.0, 1.5 Mb/s, on an AVR. >>>>>> >>>>>> And we are talking here about measuring the frequency of a 60 Hz >>>>>> clock with a 16 MHz microcontroller. 266,667 ticks per cycle. >>>>>> Measure over four cycles for 1 ppm resolution. If you have good >>>>>> enough analogue parts to give a clean signal, it can be handled in >>>>>> an 8-bit hardware timer. It's peanuts. >>>>> >>>>> No, we are not. >>>>> >>>>> "Why do you think overloading will affect the frequency? It does not >>>>> take much power for zero crossings. I beg it would not change the >>>>> frequency at all. However, it will distort the wave form and make it >>>>> more triangular than sinusoidal. In other words, you need to capture >>>>> the exact waveform, not just oversampling it." >>>>> >>>> >>>> If you need to look at the waveform accurately, and not just measure the >>>> frequency, then I have misunderstood the problem. Yes, that requires a >>>> good deal more effort. Whether it needs an FPGA or not depends on the >>>> sample rates you need and what you are doing with the waveform - an AVR >>>> is absolutely fine for measuring power, peaks, periods, etc., but not >>>> for calculating harmonics. >>> >>> FPGA is absolutely essential for noise and distortion measurements. I studied line waveform with my handwired FPGA/SRAM/A2D board before. We needed single cycle capture, not just the average of many cycles. Perhaps 12 bits are good enough, but 16 bits are not too difficult to build. >> >> I'm not so sure of that anymore. >> >> I wonder whether the XMOS multicore devices might be sufficient; >> they have several attributes helpful for DSP applications (MAC >> operations, saturating arithmetic, many independent cores etc). > > Can they meet the burst sampling spec? Namely, initial sampling at 10us. When the signal exceed certain percentage of the expected sinusoidal value, sample at 100ns. Switching has to be done within 10us. XMOS devices aren't a replacement for FPGAs, but they are encroaching into their territory in ways ARMs etc cannot. They are distinctive tool in the toolbox. I would expect it can sample at 100ns, given that it can implement a software 100Mb/s ethernet MAC. Whether it can do sufficient processing as well is a different issue! A lot would depend on what processing can be done within one sampling period in one core, whether bursts can be buffered for subsequent processing, and whether an application can be partitioned across multiple cores. I'm not an XMOS expert and I don't understand your application, but my understanding is... Each core is 100MIPs, and input instructions take 1 cycle. If an input isn't available, the core simply stalls until it is available. Maximum response time to multiple random asynchronous events is <100ns, due to the event-driven ports, interconnects, processor primitives, and language. Basically the programming paradigm is simple, well developed over the decades, and nice. There are no caches, nor interrupts to foul up worst-case timing. The IDE will state the execution times, based on a call-flow analysis of the object code. IO clocks can be up to 250MHz, and there are "FPGA-like" i/o structures on each port (internal/external clocks, SERDES, strobes, master-slave, ignore until equal/different, do i/o on a specified clock cycle etc). FFI a suitable starting point is their architecture flyer, http://www.xmos.com/published/xcore-architecture-flyer?version=latest A simple tutorial of the programming paradigm is at http://www.xmos.com/support/tools/programming?component=17653 XMOS has a plausible funding strategy, e.g. https://www.ft.com/content/7de0d9d4-0e9a-11e4-a1ae-00144feabdc0?mhq5j=e1 and I presume there is more recent news.
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2017-07-03 12:50 -0400 |
| Message-ID | <ojdsdi$pb9$1@dont-email.me> |
| In reply to | #466717 |
Tom Gardner wrote on 7/3/2017 12:12 PM: > On 03/07/17 16:24, edward.ming.lee@gmail.com wrote: >> On Monday, July 3, 2017 at 7:46:39 AM UTC-7, Tom Gardner wrote: >>> On 03/07/17 14:14, leongdentalsf@gmail.com wrote: >>>> On Monday, July 3, 2017 at 5:10:14 AM UTC-7, David Brown wrote: >>>>> On 03/07/17 13:23, edward.ming.lee@gmail.com wrote: >>>>>> On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: >>>>>>> On 03/07/17 06:52, John Miles, KE5FX wrote: >>>>>>>> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: >>>>>>>>> You mean less or less, no? Clearly it won't reach 1 MIPS per >>>>>>>>> MHz if *any* instructions you use are more than one clock. I >>>>>>>>> found a large number of important instructions that are more >>>>>>>>> than 1 clock just as you would find with many MCUs. >>>>>>>> >>>>>>>> (Shrug) You'd have to take that up with Microchip's marketing >>>>>>>> department, I suppose. These parts have long been colloquially >>>>>>>> referred to as "1 MIPS per MHz." Usually this gets trotted out >>>>>>>> in flame wars between PIC advocates and AVR devotees. Now that >>>>>>>> the same company owns both architectures, and given how archaic >>>>>>>> they both are, it hardly seems worth arguing about. >>>>>>>> >>>>>>>> But... given that I've implemented a 3600 bps software modem (or >>>>>>>> at least the 'dem' half) on an ATmega128 without even resorting >>>>>>>> to assembly, I'm sure they can be used to measure the speed of >>>>>>>> pretty much any motor or generator to an adequate degree of both >>>>>>>> accuracy and precision. AVRs are great parts, much better than >>>>>>>> PICs. <g,d&r> >>>>>>>> >>>>>>> >>>>>>> I once made a 115 kbaud software UART on an AVR. But I admit to >>>>>>> using assembly :-) I have also seen application notes for >>>>>>> /software/ USB 1.0, 1.5 Mb/s, on an AVR. >>>>>>> >>>>>>> And we are talking here about measuring the frequency of a 60 Hz >>>>>>> clock with a 16 MHz microcontroller. 266,667 ticks per cycle. >>>>>>> Measure over four cycles for 1 ppm resolution. If you have good >>>>>>> enough analogue parts to give a clean signal, it can be handled in >>>>>>> an 8-bit hardware timer. It's peanuts. >>>>>> >>>>>> No, we are not. >>>>>> >>>>>> "Why do you think overloading will affect the frequency? It does not >>>>>> take much power for zero crossings. I beg it would not change the >>>>>> frequency at all. However, it will distort the wave form and make it >>>>>> more triangular than sinusoidal. In other words, you need to capture >>>>>> the exact waveform, not just oversampling it." >>>>>> >>>>> >>>>> If you need to look at the waveform accurately, and not just measure the >>>>> frequency, then I have misunderstood the problem. Yes, that requires a >>>>> good deal more effort. Whether it needs an FPGA or not depends on the >>>>> sample rates you need and what you are doing with the waveform - an AVR >>>>> is absolutely fine for measuring power, peaks, periods, etc., but not >>>>> for calculating harmonics. >>>> >>>> FPGA is absolutely essential for noise and distortion measurements. I >>>> studied line waveform with my handwired FPGA/SRAM/A2D board before. We >>>> needed single cycle capture, not just the average of many cycles. >>>> Perhaps 12 bits are good enough, but 16 bits are not too difficult to >>>> build. >>> >>> I'm not so sure of that anymore. >>> >>> I wonder whether the XMOS multicore devices might be sufficient; >>> they have several attributes helpful for DSP applications (MAC >>> operations, saturating arithmetic, many independent cores etc). >> >> Can they meet the burst sampling spec? Namely, initial sampling at 10us. >> When the signal exceed certain percentage of the expected sinusoidal >> value, sample at 100ns. Switching has to be done within 10us. > > XMOS devices aren't a replacement for FPGAs, but they are > encroaching into their territory in ways ARMs etc cannot. > They are distinctive tool in the toolbox. > > I would expect it can sample at 100ns, given that it > can implement a software 100Mb/s ethernet MAC. Whether it > can do sufficient processing as well is a different issue! > A lot would depend on what processing can be done within > one sampling period in one core, whether bursts can be > buffered for subsequent processing, and whether an > application can be partitioned across multiple cores. > > I'm not an XMOS expert and I don't understand your > application, but my understanding is... > > Each core is 100MIPs, and input instructions take 1 cycle. > If an input isn't available, the core simply stalls until > it is available. Maximum response time to multiple random > asynchronous events is <100ns, due to the event-driven ports, > interconnects, processor primitives, and language. Basically > the programming paradigm is simple, well developed over the > decades, and nice. > > There are no caches, nor interrupts to foul up worst-case > timing. The IDE will state the execution times, based on > a call-flow analysis of the object code. > > IO clocks can be up to 250MHz, and there are "FPGA-like" > i/o structures on each port (internal/external clocks, > SERDES, strobes, master-slave, ignore until equal/different, > do i/o on a specified clock cycle etc). Even if you can squeeze a design into an XMOS the question is, why? If the programming were simple, why do so few people use them? It can't be price alone. Designers avoid FPGAs because two decades ago the only choices were large, power consuming, hot and expensive. With many designers their phobia has not lessened while the parts have gotten much better running on micropower, making virtually no heat, available in tiny packages and costing under $3 in low quantities (I have no idea how cheap they can be in high quantities, likely <$1). I don't see the advantage of programming with language extensions that suit exactly one brand of processor. The XMOS may have a niche which is an improvement over some MCUs, but where exactly does it improve on the FPGAs available today? -- Rick C
[toc] | [prev] | [next] | [standalone]
| From | Tom Gardner <spamjunk@blueyonder.co.uk> |
|---|---|
| Date | 2017-07-03 18:36 +0100 |
| Message-ID | <Vgv6B.124552$Ft7.112897@fx33.am4> |
| In reply to | #466726 |
On 03/07/17 17:50, rickman wrote: > Tom Gardner wrote on 7/3/2017 12:12 PM: >> On 03/07/17 16:24, edward.ming.lee@gmail.com wrote: >>> On Monday, July 3, 2017 at 7:46:39 AM UTC-7, Tom Gardner wrote: >>>> On 03/07/17 14:14, leongdentalsf@gmail.com wrote: >>>>> On Monday, July 3, 2017 at 5:10:14 AM UTC-7, David Brown wrote: >>>>>> On 03/07/17 13:23, edward.ming.lee@gmail.com wrote: >>>>>>> On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: >>>>>>>> On 03/07/17 06:52, John Miles, KE5FX wrote: >>>>>>>>> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: >>>>>>>>>> You mean less or less, no? Clearly it won't reach 1 MIPS per >>>>>>>>>> MHz if *any* instructions you use are more than one clock. I >>>>>>>>>> found a large number of important instructions that are more >>>>>>>>>> than 1 clock just as you would find with many MCUs. >>>>>>>>> >>>>>>>>> (Shrug) You'd have to take that up with Microchip's marketing >>>>>>>>> department, I suppose. These parts have long been colloquially >>>>>>>>> referred to as "1 MIPS per MHz." Usually this gets trotted out >>>>>>>>> in flame wars between PIC advocates and AVR devotees. Now that >>>>>>>>> the same company owns both architectures, and given how archaic >>>>>>>>> they both are, it hardly seems worth arguing about. >>>>>>>>> >>>>>>>>> But... given that I've implemented a 3600 bps software modem (or >>>>>>>>> at least the 'dem' half) on an ATmega128 without even resorting >>>>>>>>> to assembly, I'm sure they can be used to measure the speed of >>>>>>>>> pretty much any motor or generator to an adequate degree of both >>>>>>>>> accuracy and precision. AVRs are great parts, much better than >>>>>>>>> PICs. <g,d&r> >>>>>>>>> >>>>>>>> >>>>>>>> I once made a 115 kbaud software UART on an AVR. But I admit to >>>>>>>> using assembly :-) I have also seen application notes for >>>>>>>> /software/ USB 1.0, 1.5 Mb/s, on an AVR. >>>>>>>> >>>>>>>> And we are talking here about measuring the frequency of a 60 Hz >>>>>>>> clock with a 16 MHz microcontroller. 266,667 ticks per cycle. >>>>>>>> Measure over four cycles for 1 ppm resolution. If you have good >>>>>>>> enough analogue parts to give a clean signal, it can be handled in >>>>>>>> an 8-bit hardware timer. It's peanuts. >>>>>>> >>>>>>> No, we are not. >>>>>>> >>>>>>> "Why do you think overloading will affect the frequency? It does not >>>>>>> take much power for zero crossings. I beg it would not change the >>>>>>> frequency at all. However, it will distort the wave form and make it >>>>>>> more triangular than sinusoidal. In other words, you need to capture >>>>>>> the exact waveform, not just oversampling it." >>>>>>> >>>>>> >>>>>> If you need to look at the waveform accurately, and not just measure the >>>>>> frequency, then I have misunderstood the problem. Yes, that requires a >>>>>> good deal more effort. Whether it needs an FPGA or not depends on the >>>>>> sample rates you need and what you are doing with the waveform - an AVR >>>>>> is absolutely fine for measuring power, peaks, periods, etc., but not >>>>>> for calculating harmonics. >>>>> >>>>> FPGA is absolutely essential for noise and distortion measurements. I >>>>> studied line waveform with my handwired FPGA/SRAM/A2D board before. We >>>>> needed single cycle capture, not just the average of many cycles. >>>>> Perhaps 12 bits are good enough, but 16 bits are not too difficult to >>>>> build. >>>> >>>> I'm not so sure of that anymore. >>>> >>>> I wonder whether the XMOS multicore devices might be sufficient; >>>> they have several attributes helpful for DSP applications (MAC >>>> operations, saturating arithmetic, many independent cores etc). >>> >>> Can they meet the burst sampling spec? Namely, initial sampling at 10us. >>> When the signal exceed certain percentage of the expected sinusoidal >>> value, sample at 100ns. Switching has to be done within 10us. >> >> XMOS devices aren't a replacement for FPGAs, but they are >> encroaching into their territory in ways ARMs etc cannot. >> They are distinctive tool in the toolbox. >> >> I would expect it can sample at 100ns, given that it >> can implement a software 100Mb/s ethernet MAC. Whether it >> can do sufficient processing as well is a different issue! >> A lot would depend on what processing can be done within >> one sampling period in one core, whether bursts can be >> buffered for subsequent processing, and whether an >> application can be partitioned across multiple cores. >> >> I'm not an XMOS expert and I don't understand your >> application, but my understanding is... >> >> Each core is 100MIPs, and input instructions take 1 cycle. >> If an input isn't available, the core simply stalls until >> it is available. Maximum response time to multiple random >> asynchronous events is <100ns, due to the event-driven ports, >> interconnects, processor primitives, and language. Basically >> the programming paradigm is simple, well developed over the >> decades, and nice. >> >> There are no caches, nor interrupts to foul up worst-case >> timing. The IDE will state the execution times, based on >> a call-flow analysis of the object code. >> >> IO clocks can be up to 250MHz, and there are "FPGA-like" >> i/o structures on each port (internal/external clocks, >> SERDES, strobes, master-slave, ignore until equal/different, >> do i/o on a specified clock cycle etc). > > Even if you can squeeze a design into an XMOS the question is, why? You can ask that about any technology, including FPGAs; the answer never provides /general/ illumination. > If the > programming were simple, why do so few people use them? It can't be price alone. As with any technology, familiarity is an incentive and unfamiliarity is a disincentive. > I don't see the advantage of programming with language extensions that suit > exactly one brand of processor. All technology implementations have specific "extensions", in one form or another. Different FPGA families have many characteristics that make it difficult to port a design from one to another. With conventional processors, the architecture and peripherals form the same impediments. Single core processors are hitting a bottleneck; multicore is inevitable. But current programming languages and paradigms are poorly suited to multicore processors with caches and shared memories. The XMOS environment (paradigm, language, hardware) tackles those problems head on, with some success. It is worth knowing about and exploring the advantages and disadvantages, so that an appropriate technology can be chosen in each case. > The XMOS may have a niche which is an > improvement over some MCUs, but where exactly does it improve on the FPGAs > available today? If FPGAs were so wonderful, everybody would be using them :) (But speed of testing design changes is, in some senses, an advantage).
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2017-07-05 02:01 -0400 |
| Message-ID | <ojhv5e$25d$1@dont-email.me> |
| In reply to | #466732 |
Tom Gardner wrote on 7/3/2017 1:36 PM: > On 03/07/17 17:50, rickman wrote: >> Tom Gardner wrote on 7/3/2017 12:12 PM: >>> On 03/07/17 16:24, edward.ming.lee@gmail.com wrote: >>>> On Monday, July 3, 2017 at 7:46:39 AM UTC-7, Tom Gardner wrote: >>>>> On 03/07/17 14:14, leongdentalsf@gmail.com wrote: >>>>>> On Monday, July 3, 2017 at 5:10:14 AM UTC-7, David Brown wrote: >>>>>>> On 03/07/17 13:23, edward.ming.lee@gmail.com wrote: >>>>>>>> On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: >>>>>>>>> On 03/07/17 06:52, John Miles, KE5FX wrote: >>>>>>>>>> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: >>>>>>>>>>> You mean less or less, no? Clearly it won't reach 1 MIPS per >>>>>>>>>>> MHz if *any* instructions you use are more than one clock. I >>>>>>>>>>> found a large number of important instructions that are more >>>>>>>>>>> than 1 clock just as you would find with many MCUs. >>>>>>>>>> >>>>>>>>>> (Shrug) You'd have to take that up with Microchip's marketing >>>>>>>>>> department, I suppose. These parts have long been colloquially >>>>>>>>>> referred to as "1 MIPS per MHz." Usually this gets trotted out >>>>>>>>>> in flame wars between PIC advocates and AVR devotees. Now that >>>>>>>>>> the same company owns both architectures, and given how archaic >>>>>>>>>> they both are, it hardly seems worth arguing about. >>>>>>>>>> >>>>>>>>>> But... given that I've implemented a 3600 bps software modem (or >>>>>>>>>> at least the 'dem' half) on an ATmega128 without even resorting >>>>>>>>>> to assembly, I'm sure they can be used to measure the speed of >>>>>>>>>> pretty much any motor or generator to an adequate degree of both >>>>>>>>>> accuracy and precision. AVRs are great parts, much better than >>>>>>>>>> PICs. <g,d&r> >>>>>>>>>> >>>>>>>>> >>>>>>>>> I once made a 115 kbaud software UART on an AVR. But I admit to >>>>>>>>> using assembly :-) I have also seen application notes for >>>>>>>>> /software/ USB 1.0, 1.5 Mb/s, on an AVR. >>>>>>>>> >>>>>>>>> And we are talking here about measuring the frequency of a 60 Hz >>>>>>>>> clock with a 16 MHz microcontroller. 266,667 ticks per cycle. >>>>>>>>> Measure over four cycles for 1 ppm resolution. If you have good >>>>>>>>> enough analogue parts to give a clean signal, it can be handled in >>>>>>>>> an 8-bit hardware timer. It's peanuts. >>>>>>>> >>>>>>>> No, we are not. >>>>>>>> >>>>>>>> "Why do you think overloading will affect the frequency? It does not >>>>>>>> take much power for zero crossings. I beg it would not change the >>>>>>>> frequency at all. However, it will distort the wave form and make it >>>>>>>> more triangular than sinusoidal. In other words, you need to capture >>>>>>>> the exact waveform, not just oversampling it." >>>>>>>> >>>>>>> >>>>>>> If you need to look at the waveform accurately, and not just measure the >>>>>>> frequency, then I have misunderstood the problem. Yes, that requires a >>>>>>> good deal more effort. Whether it needs an FPGA or not depends on the >>>>>>> sample rates you need and what you are doing with the waveform - an AVR >>>>>>> is absolutely fine for measuring power, peaks, periods, etc., but not >>>>>>> for calculating harmonics. >>>>>> >>>>>> FPGA is absolutely essential for noise and distortion measurements. I >>>>>> studied line waveform with my handwired FPGA/SRAM/A2D board before. We >>>>>> needed single cycle capture, not just the average of many cycles. >>>>>> Perhaps 12 bits are good enough, but 16 bits are not too difficult to >>>>>> build. >>>>> >>>>> I'm not so sure of that anymore. >>>>> >>>>> I wonder whether the XMOS multicore devices might be sufficient; >>>>> they have several attributes helpful for DSP applications (MAC >>>>> operations, saturating arithmetic, many independent cores etc). >>>> >>>> Can they meet the burst sampling spec? Namely, initial sampling at 10us. >>>> When the signal exceed certain percentage of the expected sinusoidal >>>> value, sample at 100ns. Switching has to be done within 10us. >>> >>> XMOS devices aren't a replacement for FPGAs, but they are >>> encroaching into their territory in ways ARMs etc cannot. >>> They are distinctive tool in the toolbox. >>> >>> I would expect it can sample at 100ns, given that it >>> can implement a software 100Mb/s ethernet MAC. Whether it >>> can do sufficient processing as well is a different issue! >>> A lot would depend on what processing can be done within >>> one sampling period in one core, whether bursts can be >>> buffered for subsequent processing, and whether an >>> application can be partitioned across multiple cores. >>> >>> I'm not an XMOS expert and I don't understand your >>> application, but my understanding is... >>> >>> Each core is 100MIPs, and input instructions take 1 cycle. >>> If an input isn't available, the core simply stalls until >>> it is available. Maximum response time to multiple random >>> asynchronous events is <100ns, due to the event-driven ports, >>> interconnects, processor primitives, and language. Basically >>> the programming paradigm is simple, well developed over the >>> decades, and nice. >>> >>> There are no caches, nor interrupts to foul up worst-case >>> timing. The IDE will state the execution times, based on >>> a call-flow analysis of the object code. >>> >>> IO clocks can be up to 250MHz, and there are "FPGA-like" >>> i/o structures on each port (internal/external clocks, >>> SERDES, strobes, master-slave, ignore until equal/different, >>> do i/o on a specified clock cycle etc). >> >> Even if you can squeeze a design into an XMOS the question is, why? > > You can ask that about any technology, including > FPGAs; the answer never provides /general/ illumination. I don't follow your reasoning. If I don't have a reason to use a technology, I don't use it. I use FPGAs because they are best suited to the task, usually because they are the lowest price device with the shortest development time and the least risk of being able to meet the schedule and cost goals. Sometimes MCUs best meet those requirements. I am not able to picture situations where there is a compelling advantage to using the XMOS devices which will justify learning a new paradigm and language. Looking at the language it appears to treat parallelism in a fairly simplistic way. >> If the >> programming were simple, why do so few people use them? It can't be price >> alone. > > As with any technology, familiarity is an incentive > and unfamiliarity is a disincentive. > > >> I don't see the advantage of programming with language extensions that suit >> exactly one brand of processor. > > All technology implementations have specific "extensions", > in one form or another. Different FPGA families have many > characteristics that make it difficult to port a design > from one to another. With conventional processors, the > architecture and peripherals form the same impediments. You are talking about FPGA hardware features. I am talking about the programming language. Many of the features of various FPGAs are accommodated by the HDL tools in use. No special code needs to be written. The tools adapt the implementation to suit the target just like conventional MCU tools optimize for the device being used. > Single core processors are hitting a bottleneck; multicore > is inevitable. But current programming languages and > paradigms are poorly suited to multicore processors with > caches and shared memories. > > The XMOS environment (paradigm, language, hardware) > tackles those problems head on, with some success. > It is worth knowing about and exploring the advantages > and disadvantages, so that an appropriate technology > can be chosen in each case. You have acknowledged the XMOS devices suit a small niche in terms of suitability. I have said before I'm not sure it is worth learning the parts, tools and language to optimize for the small niche area where the XMOS parts are optimal unless a large proportion of your work is in that small niche. My work tends to be over a wider range. >> The XMOS may have a niche which is an >> improvement over some MCUs, but where exactly does it improve on the FPGAs >> available today? > > If FPGAs were so wonderful, everybody would be using > them :) They *are* widely used. I've already pointed out the issues that existed 20 years ago that constitute a myth creating a bias about FPGAs. They are held back because of what people *think* FPGAs are rather than what they are. That, and the fact that when the only tool you have is a hammer, every problem looks like a nail. As long as the problems can be solved by treating them as nails, there is not a lot of incentive to find a different tool. There is a lot of overlap where both MCUs and FPGAs do the job well, so MCU designers aren't inclined to learn FPGAs. Many FPGA designers are knowledgeable in using MCUs, so they well know the tradeoffs and can see where each fits or where both fit. > (But speed of testing design changes is, in some senses, > an advantage). -- Rick C
[toc] | [prev] | [next] | [standalone]
| From | Lasse Langwadt Christensen <langwadt@fonz.dk> |
|---|---|
| Date | 2017-07-03 09:30 -0700 |
| Message-ID | <972a449f-c48b-4da5-8f69-e755a77914f4@googlegroups.com> |
| In reply to | #466704 |
Den mandag den 3. juli 2017 kl. 16.46.39 UTC+2 skrev Tom Gardner: > On 03/07/17 14:14, leongdentalsf@gmail.com wrote: > > On Monday, July 3, 2017 at 5:10:14 AM UTC-7, David Brown wrote: > >> On 03/07/17 13:23, edward.ming.lee@gmail.com wrote: > >>> On Monday, July 3, 2017 at 3:37:20 AM UTC-7, David Brown wrote: > >>>> On 03/07/17 06:52, John Miles, KE5FX wrote: > >>>>> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: > >>>>>> You mean less or less, no? Clearly it won't reach 1 MIPS per > >>>>>> MHz if *any* instructions you use are more than one clock. I > >>>>>> found a large number of important instructions that are more > >>>>>> than 1 clock just as you would find with many MCUs. > >>>>> > >>>>> (Shrug) You'd have to take that up with Microchip's marketing > >>>>> department, I suppose. These parts have long been colloquially > >>>>> referred to as "1 MIPS per MHz." Usually this gets trotted out > >>>>> in flame wars between PIC advocates and AVR devotees. Now that > >>>>> the same company owns both architectures, and given how archaic > >>>>> they both are, it hardly seems worth arguing about. > >>>>> > >>>>> But... given that I've implemented a 3600 bps software modem (or > >>>>> at least the 'dem' half) on an ATmega128 without even resorting > >>>>> to assembly, I'm sure they can be used to measure the speed of > >>>>> pretty much any motor or generator to an adequate degree of both > >>>>> accuracy and precision. AVRs are great parts, much better than > >>>>> PICs. <g,d&r> > >>>>> > >>>> > >>>> I once made a 115 kbaud software UART on an AVR. But I admit to > >>>> using assembly :-) I have also seen application notes for > >>>> /software/ USB 1.0, 1.5 Mb/s, on an AVR. > >>>> > >>>> And we are talking here about measuring the frequency of a 60 Hz > >>>> clock with a 16 MHz microcontroller. 266,667 ticks per cycle. > >>>> Measure over four cycles for 1 ppm resolution. If you have good > >>>> enough analogue parts to give a clean signal, it can be handled in > >>>> an 8-bit hardware timer. It's peanuts. > >>> > >>> No, we are not. > >>> > >>> "Why do you think overloading will affect the frequency? It does not > >>> take much power for zero crossings. I beg it would not change the > >>> frequency at all. However, it will distort the wave form and make it > >>> more triangular than sinusoidal. In other words, you need to capture > >>> the exact waveform, not just oversampling it." > >>> > >> > >> If you need to look at the waveform accurately, and not just measure the > >> frequency, then I have misunderstood the problem. Yes, that requires a > >> good deal more effort. Whether it needs an FPGA or not depends on the > >> sample rates you need and what you are doing with the waveform - an AVR > >> is absolutely fine for measuring power, peaks, periods, etc., but not > >> for calculating harmonics. > > > > FPGA is absolutely essential for noise and distortion measurements. I studied line waveform with my handwired FPGA/SRAM/A2D board before. We needed single cycle capture, not just the average of many cycles. Perhaps 12 bits are good enough, but 16 bits are not too difficult to build. > > I'm not so sure of that anymore. > > I wonder whether the XMOS multicore devices might be sufficient; > they have several attributes helpful for DSP applications (MAC > operations, saturating arithmetic, many independent cores etc). > > They appear to be commercially successful in markets based on > DSP, e.g. USB high resolution audio and "intelligent" microphone > arrays. > > XMOS also has a decent comms/programming language, environment > and dev tools. at this rate soon nothing less than a stack of top end GHz scopes pushing data to a cluster of super computers will do ;)
[toc] | [prev] | [next] | [standalone]
| From | Tom Gardner <spamjunk@blueyonder.co.uk> |
|---|---|
| Date | 2017-07-03 12:32 +0100 |
| Message-ID | <KXp6B.137110$YI2.14984@fx47.am4> |
| In reply to | #466672 |
On 03/07/17 11:37, David Brown wrote: > On 03/07/17 06:52, John Miles, KE5FX wrote: >> On Sunday, July 2, 2017 at 7:56:19 PM UTC-7, rickman wrote: >>> You mean less or less, no? Clearly it won't reach 1 MIPS per MHz if *any* >>> instructions you use are more than one clock. I found a large number of >>> important instructions that are more than 1 clock just as you would find >>> with many MCUs. >> >> (Shrug) You'd have to take that up with Microchip's marketing department, >> I suppose. These parts have long been colloquially referred to as "1 >> MIPS per MHz." Usually this gets trotted out in flame wars between PIC >> advocates and AVR devotees. Now that the same company owns both >> architectures, and given how archaic they both are, it hardly seems >> worth arguing about. >> >> But... given that I've implemented a 3600 bps software modem (or >> at least the 'dem' half) on an ATmega128 without even resorting >> to assembly, I'm sure they can be used to measure the speed of pretty >> much any motor or generator to an adequate degree of both accuracy >> and precision. AVRs are great parts, much better than PICs. <g,d&r> >> > > I once made a 115 kbaud software UART on an AVR. But I admit to using > assembly :-) I have also seen application notes for /software/ USB 1.0, > 1.5 Mb/s, on an AVR. Here's an app note for a software ethernet 10/100/1000Mb/s mac driving a standard 12-pin MII interface. It looks like the source code is available too :) https://www.xmos.com/support/libraries/lib_ethernet TBH I'm not sure whether it makes good use of a few cores, or whether it would be better to use processor variants containing this as a hardware block. But it is impressive that it can be done in software at all! > And we are talking here about measuring the frequency of a 60 Hz clock > with a 16 MHz microcontroller. 266,667 ticks per cycle. Measure over > four cycles for 1 ppm resolution. If you have good enough analogue > parts to give a clean signal, it can be handled in an 8-bit hardware > timer. It's peanuts. Indeed.
[toc] | [prev] | [next] | [standalone]
| From | David Lesher <wb8foz@panix.com> |
|---|---|
| Date | 2017-07-03 00:54 +0000 |
| Message-ID | <ojc4kq$mml$1@reader2.panix.com> |
| In reply to | #466495 |
Don Y <blockedofcourse@foo.invalid> writes: >> Seeking a packaged line (~~60hz) frequency [or period] counter >> with I2C or SPI output to feed a Mega2560 box. The goal is to >> monitor a b/u generator's speed. >> >> Suggestions? >How accurate do you need to be? Presumably, the mains will not be >available when the generator's output is "of interest". But, the >device you're contemplating could be located *on* the "backed >up mains" just as easily as on the output of the genset. The goal it to detect if/when the generator is overloaded, and shed less critical loads. We don't care about 12:00 12:00 12:00 12:00 >Can it be indoors? (i.e., in a relatively constant environment) >Or, does it have to reside in the same environment that the generator >is likely located (which may be out-of-doors) Sure, it will be next to the other stuph.
[toc] | [prev] | [next] | [standalone]
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
Back to top | Article view | sci.electronics.design
csiph-web