Shop OBEX P1 Docs P2 Docs Learn Events
"digital pattern generator" on the Prop anyone? — Parallax Forums

"digital pattern generator" on the Prop anyone?

Nick MuellerNick Mueller Posts: 815
edited 2009-11-16 12:45 in Propeller 1
Hi!

Just one of my ideas ... smurf.gif
I had a look around for a signal generator. The best thing I could find was one of the RIGOL DG 2000 series. But after having a look at the manual (in original Chinglish) and at the price, I thankfully said "NO"!

This generator has quite an unique feature (except you compare it so some 10k$++ Agilent stuff):
It can send 16(?) bits with a defined pattern. That pattern is editable. It also has special patterns like RS232, I2C and SPI. Can only send sequences without listening to a response (except a trigger), but for degugging, that would be a big step forward.
Also has adjustable output (IIRC 3.3V .. 5V) except for RS232 that is something like -/+5V.

This sounds like an ideal candidate for a Prop! The UI in SPIN (or C devil.gif ) shuffling data out by a COG. An other one watching for triggers, etc. Data could be a precomputed table. The RIGOL makes a constant 20(?)MSh-stream.

One point that I don't know what chip to use is the output drivers. Fast (20MHz minimum, rise-time adjustable would be an extra bonus) preferably short circuit-proof, can sink and source at least 20mA and with an variable supply voltage (up to 15V).


If someone steals my idea for the Parallax contest, I'd be glad. No really, I fear that I don't find the time for it. sad.gif


Nick

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!

The DIY Digital-Readout for mills, lathes etc.:
YADRO

Post Edited (Nick Mueller) : 11/12/2009 9:08:00 PM GMT

Comments

  • ericballericball Posts: 774
    edited 2009-11-13 01:14
    For single pin output only patterns at a fixed rate you can easily use the video generator to spit out bits very, very quickly (up to 128MHz).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Composite NTSC sprite driver: Forum
    NTSC & PAL driver templates: ObEx Forum
    OnePinTVText driver: ObEx Forum
  • kwinnkwinn Posts: 8,697
    edited 2009-11-13 06:20
    A prop, an external ram chip to hold the bit pattern, and a counter for addressing is all you really need for a digital signal generator. The prop could download the bit patterns to the ram and provide the clock to the counter. Add a fast DAC and you have an arbitrary waveform generator as well. The hard part would be finding the line drivers to match the drive, frequency and voltage specs.
  • AleAle Posts: 2,363
    edited 2009-11-13 15:55
    If you need a pattern, it will probably not be at 12V. I'd go with a dual voltage level shifter and a series resistor. Of course some kind of not that capacitive zener diodes could help prevent damage.
    I also thought about something similar but I did not think about I2C or SPI it really could help to program some values and send them and maybe listen to, the prop has enough to do that at some MHz!.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
  • Nick MuellerNick Mueller Posts: 815
    edited 2009-11-13 18:47
    > If you need a pattern, it will probably not be at 12V.

    Some applications require even 24V. But simple patterns or even just a square wave would be enough for that.
    I found the schematics of a HP 8116A, it does have (almost) suitable output-stages with 50MHz and 6ns (IIRC) rise-time. But I dind't have a closer look at it yet.

    For the serial protocols (just as a clarification):
    It simply sends the signals, does not receive. "The quick brown fox jumps over the lazy cat". wink.gif


    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • AleAle Posts: 2,363
    edited 2009-11-13 21:06
    What I forgot was: If you need 12V pattern it will probably be low speed, so some transistors may do.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
  • ErNaErNa Posts: 1,752
    edited 2009-11-13 21:48
    Hi,
    if a high output level is needed, a simple Mosfet driver may be adequate if the frequency is not to high, like www.intersil.com/products/deviceinfo.asp?pn=HIP2100#longdesc. They are cheap and the high-side driver not even needs to have ground potential, what may be another advantage
    ErNa

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_5511&partName=htmltext
    Hello Rest Of The World
    Hello Debris
    Install a propeller and blow them away wink.gif
  • Nick MuellerNick Mueller Posts: 815
    edited 2009-11-14 08:29
    > a simple Mosfet driver may be adequate if the frequency is not to high,

    This doesn't look to bad. Diagrams end at 1MHz, but rise and fall time would allow almost 50MHz. OK, stressing the chip a bit behind specs maybe. smile.gif

    Thanks for the suggestion!

    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • Q*bertQ*bert Posts: 59
    edited 2009-11-15 00:58
    Nick Mueller said...
    This generator has quite an unique feature (except you compare it so some 10k$++ Agilent stuff):
    It can send 16(?) bits with a defined pattern. That pattern is editable. It also has special patterns like RS232, I2C and SPI. Can only send sequences without listening to a response (except a trigger), but for degugging, that would be a big step forward.
    Also has adjustable output (IIRC 3.3V .. 5V) except for RS232 that is something like -/+5V.

    For $30 you may want to consider the The Bus Pirate.

    I've not seen anyone on this board mention it, but it seems to be pretty well known in the hardware hacker world. It can both send and receive, and you interact with it from a terminal emulator on your PC. There is also a GUI for Windows, OSX or linux in development.

    It looks pretty useful. I've ordered one and am waiting for the next shipment in a couple of weeks.

    From their website:

    The ‘Bus Pirate’ is a universal bus interface that talks to most chips from a PC serial terminal, eliminating a ton of early prototyping effort when working with new or unknown chips. Many serial protocols are supported at 0-5.5volts, more can be added.

    * 1-Wire
    * I2C
    * SPI
    * JTAG
    * Asynchronous serial
    * MIDI
    * PC keyboard
    * HD44780 LCD
    * 2- and 3-wire libraries with bitwise pin control
    * Scriptable binary bitbang, 1-Wire, I2C, SPI, and UART modes

    We added other stuff we need, like,

    * 0-6volt measurement probe
    * 1Hz-40MHz frequency measurement
    * 1kHz - 4MHz pulse-width modulator, frequency generator
    * On-board multi-voltage pull-up resistors
    * On-board 3.3volt and 5volt power supplies with software reset
    * Macros for common operations
    * Bus traffic sniffers (SPI, I2C)
    * A bootloader for easy firmware updates
    * Transparent USB->serial mode
    * 10Hz-1MHz low-speed logic analyzer
    * Supported in AVRDude SVN
    * Scriptable from Perl, Python, etc.
  • DroneDrone Posts: 433
    edited 2009-11-15 19:07
    Hi Nick,

    I have a Bus Pirate V2 (the V3 out now is supposedly hardware and software compatible). Haven't tried generating signatures with it yet. The Propeller would be an excellent candidate for a signature generator, parallel and serial, but you would likely in the end code in PASM for speed. Cog synchronization may be an issue. Remember PASM is typically four clocks per instruction which is 20MIPS per cog at 80MHz, without cog synchronization or access to HUB RAM which is slower. Plus starting cogs can be a bit slow (something like 100ms if memory serves).

    I would really like to see something like the Bus Pirate done on an ATMEL AVR micro-controller instead of a PIC; typically 1 clock per instruction for AVR vs. four for PIC's, plus IMHO there is a full IDE for AVR's available for Windows unencumbered and not limited (AVR Studio plus WinAVR which is GCC-based). I could go on about AVR vs. PIC but this is probably not appropriate for this Propeller-Specific Forum.

    It turns out Rigol makes the likes of DSO's for Agilent which re-brands them. I saw a YouTube video somewhere where someone exposed that Rigol is over-clocking ADI A/D converters to get higher sample rates - dicey approach in my opinion. Can't remember the YouTube link at the moment.

    There are other ways to make fast signature generators. Fast DRAM externally refresh-clocked and programmed via a CPLD from an EEPROM, or something like this come to mind.

    Bringing my post back to the propeller... I'm still waiting to see the release of the Prop-Scope from Parallax. The possibilities are almost endless and the device will (hopefully) be open and user-extensible. Hopefully the Prop-Scope will not rely on .NET framework.

    Regards, David
  • LeonLeon Posts: 7,620
    edited 2009-11-15 21:54
    An XMOS chip would be a lot better than an AVR for that sort of thing - 100 MHz I/O. I'm thinking of doing something like it using one of the new $50 SFE XS1-L1-64 boards; I've just got two of them.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 11/15/2009 10:00:54 PM GMT
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-11-16 02:20
    Leon,

    Are you using SFE's XMOS XTAG2 Debug Adapter?

    BTW, all of SFE's XMOS breakout boards are sold out.
    Did you order them all?. tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH

    Post Edited (James Michael Huselton) : 11/16/2009 3:16:28 AM GMT
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-11-16 02:56
    Last month I received a DS1077 Programmable Oscillator Breakout - 16.2kHz to 133MHz. At $4.95, it was too good to pass up.
    As a clock for a 23K256 serial or faster parallel static RAM, what do you think of assigning one cog as output, and one or more cogs as
    triggered inputs for a pattern generator/receiver?

    I tire of waiting for the Prop2. XMOS is looking much more attractive lately, as is the 100 mhz ARM Cortex M3 LPC1700.
    When the Prop2 is announced, the price is likely to be in line with these XMOS and ARM processors, so price is no reason to wait.
    But the prop mental programming model is burned into my brain.

    I just don't know - I must remember that this is supposed to be fun. wink.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH

    Post Edited (James Michael Huselton) : 11/16/2009 3:08:02 AM GMT
  • HannoHanno Posts: 1,130
    edited 2009-11-16 03:13
    The PropScope comes with a function generator. Capable of outputting 600 8bit samples at 25msps. Signal is buffered and scaled/biased to any range -1.5..1.5 or 0..5v. Easy interface to do square/sine/sawtooth/noise at configurable frequencies, amplitude, offset. Or, draw your own with the mouse and specify min/max, amp/off, freq/period. Also let's you load from file. A while back (~year ago) I posted a thread about it... Uses video generator.
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-11-16 03:18
    Hanno,

    All I've got to say is: wow tongue.gif .

    I have to remember that it isn't the chip, but the imagination of the programmer that uses the chip.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH

    Post Edited (James Michael Huselton) : 11/16/2009 3:23:42 AM GMT
  • LeonLeon Posts: 7,620
    edited 2009-11-16 03:24
    James Michael Huselton said...
    Leon,

    Are you using SFE's XMOS XTAG2 Debug Adapter?

    BTW, all of SFE's XMOS breakout boards are sold out.
    Did you order them all?. tongue.gif

    I am using the XTAG-2. One came with my XMOS XK-1 kit.

    They only made a small batch of boards initially, probably to see how much interest there was in them. It looks like it could be a big seller for them. I think that most people buying them are already XMOS users, there has been a lot of discussion about them on the Xlinkers forum..

    A DIL Propeller chip could be squeezed onto the prototyping area, the XMOS chip would make a nice peripheral device.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 11/16/2009 3:35:18 AM GMT
  • Nick MuellerNick Mueller Posts: 815
    edited 2009-11-16 12:45
    Even if the Prop has a bottleneck getting patterns from HUB to COG, several COGs can work in parallel and put out data interlaced. Syncing has been solved somewhere here.

    OK, then the Prop II. smile.gif
    From an architectural POV, the Prop is a perfect match.

    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
Sign In or Register to comment.