Shop OBEX P1 Docs P2 Docs Learn Events
Test migration of difficult posts. Visitors welcome! — Parallax Forums

Test migration of difficult posts. Visitors welcome!

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2010-08-16 14:19 in General Discussion
I'll be testing my post migration filter here. Comments are welcome. And if you have a post that got clobbered in the new forum, feel free to try my filter at www.phipi.com/postfix on your original post from forums.parallaxinc.com and paste your results as a reply here. I will try to keep the online filter up to date with each new modification.

Your assistance in identifying difficult posts is much appreciated!

Thanks,
-Phil
«1

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2010-08-09 18:24
    If the old post starts with e.g. there is a leading space in the new one. Also, [code] blocks are never closed ([font] close is missing as well).

    Also, when I keep the [font] tags then there are some extra (empty) lines at the end of the actual code. Removing the [font] tags (Courier) will leave me with just one line (which I assume covers the horizontal scroll bar).

    http://forums.parallaxinc.com/forums/default.aspx?r=q&f=25&m=410364
  • BRBR Posts: 92
    edited 2010-08-09 19:27
    Phil, help! After 5 years of continuous service, my windows install finally decomposed into a pile of useless goo and I was forced to re-install...but forgot to backup my web links. Where, oh where, is the spin code formatter on PhiPi.com? No link from main page...I'd like to see if your formatter helps pretty up code posts in this forum so they're a bit more readable.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-09 20:26
    BR,

    http://www.phipi.com/format

    But I don't know yet if that will work with the new forum.

    -Phil
  • Jim EwaldJim Ewald Posts: 733
    edited 2010-08-09 20:31
    The new BB codes are ready to go. I'll load them onto the test system after the database xref tables.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-09 21:19
    kuroneko,

    Try it now. BTW, I have no idea why there are so many blank lines at the end of the code segment. They're not in the generated BB code.

    -Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-09 21:27
    Strikethroughs work!

    Occasionally, it's handy to be able to manipulate the z and c flags directly, without causing other side effects or relying on externally-defined longs. This is often done at the end of a subroutine to return a status or error condition, which the calling program can then check. Herewith is what I came up with for various sets, clears, copies, and complements, plus some saves and restores. Each uses its own instruction as a source of known destination data, which provides the necessary bits for flag manipulation.
    [font="parallax"]
    
    set_z         test      $,#0  wz         'Instr = %01100010011111$$$$$$$$$000000000 z = result (instr & 0) == 0
    set_nz        test      $,#1  wz         'Instr = %01100010011111$$$$$$$$$000000001 z = result (instr & 1) == 1
    set_c         test      $,#1  wc         'Instr = %01100001011111$$$$$$$$$000000001 c = parity (instr & 1) == 1
    set_nc        test      $,#0  wc         'Instr = %01100001011111$$$$$$$$$000000000 c = parity (instr & 0) == 0
    
    set_z_c       shr       $,#31 wz,wc,nr   'Instr = %00101011011111$$$$$$$$$000011111 z = result (instr >> 31) == 0, c = instr.0  == 1
    set_z_nc      shr       $,#30 wz,wc,nr   'Instr = %00101011011111$$$$$$$$$000011110 z = result (instr >> 30) == 0, c = instr.0 == 0
    set_nz_c      shr       $,#1  wz,wc,nr   'Instr = %00101011011111$$$$$$$$$000000001 z = result (instr >> 1) <> 0, c = instr.0  == 1
    set_nz_nc     shr       $,#2  wz,wc,nr   'Instr = %00101011011111$$$$$$$$$000000010 z = result (instr >> 2) <> 0, c = instr.0  == 0
    
    [s]mov_z_c       muxnc     $,#1  wz,nr      'Instr = %01110110011111$$$$$$$$$000000001 z = result (nc & instr & 1) == c
    mov_z_nc      muxc      $,#1  wz,nr      'Instr = %01110010011111$$$$$$$$$000000001 z = result (c & 1) == nc
    mov_c_z       muxz      $,#1  wc,nr      'Instr = %01111001011111$$$$$$$$$000000001 c = parity (z & 1) == nz                   
    mov_c_nz      muxnz     $,#1  wc,nr      'Instr = %01111101011111$$$$$$$$$000000001 c = parity (nz & 1) == nz[/s]
    
    swap_z_c      'Left as an exercise for the reader.
    
    [s]not_z         muxz      $,#1  wz,nr      'Instr = %01111010011111$$$$$$$$$000000001 z = result (z & 1) == nz
    not_c         muxnc     $,#1  wc,nr      'Instr = %01110101011111$$$$$$$$$000000001 c = parity (nc & 1) == nc[/s]
    
    save_z        muxnz     restore_z,#1
    restore_z     test      $,#1 wz          'Instr = %01100010011111$$$$$$$$$00000000[s]z[/s] z = result (instr & nz) == z
    
    save_c        muxc      restore_c,#1
    restore_c     test      $,#1 wc          'Instr = %01100001011111$$$$$$$$$00000000c c = parity (instr & c) == c
    
    save_z_c      'Left as an exercise for the reader.
    restore_z_c   'Left as an exercise for the reader.
    
    [/font]
    

    These are, so far, untested. My confidence that they will work is based solely on my trust in the Parallax documentation for these instructions (and my ability to understand it smile.gif ). If the assembler supported macros, these could be defined as such. Otherwise, it wouldn't be the worst idea in the world to include them as native instructions. (The items left as exercises probably can't be done in the same spirit as single instructions and without auxiliary longs.)

    -Phil

    Update: Thanks to mpark for correcting my spelling via private communication. (He needn't have worried about embarrassing me online, though. I have a pretty thick skin.) I had spelled "exercise" as "exercize", thinking that the two were British and American variants, respectively. But unlike many such words, "exercise" doesn't have an Americanized (Americanised?) equivalent.

    Post Edited (Phil Pilgrim (PhiPi)) : 3/3/2010 7:08:07 PM GMT
  • kuronekokuroneko Posts: 3,623
    edited 2010-08-09 21:28
    Try it now. BTW, I have no idea why there are so many blank lines at the end of the code segment. They're not in the generated BB code.
    Thanks, that looks fine. Seems we are getting there. And superscript works as well!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-09 21:31
    Jim,

    Any idea why code blocks generate so many blank lines at the end? Also, is it possible to eliminate the horizontal scroll? The width parameter seems to be the offender in the HTML code:
    <div class="smallfont" style="margin-bottom:2px">Code:</div>
    	<pre class="alt2" dir="ltr" style="
    		margin: 0px;
    		padding: 6px;
    		border: 1px inset;
    		[b]width: 640px;[/b]
    		height: 498px;
    		text-align: left;
    		overflow: auto">
    

    Thanks,
    -Phil

    Addendum: The extra lines at the end of a code block only happen when I specify a font (e.g. "Parallax") inside the code block, if that's any help.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-09 21:39
    Here's one with embedded images, external links, and superscripts. Indeed the superscripts do work! Thanks, Jim!

    Okay, the title's a bit of a come-on, since it's not a very good radio; but it's an AM radio, nonetheless, with digital tuning to boot. Moreover, it can be built without any additional active components. If you have a Propeller Demo Board, a resistor, cap, inductor, wire antenna, and a decent ground are all you need.

    THEORY

    Now that I've got your attention, here's the theory behind it. Most consumer radios on the market are superheterodynes. In such receivers, the incoming RF signal is "mixed" with a sinewave coming from a tunable local oscillator (LO). Mixing is basically analog multiplication, which produces, in addition to the original RF and oscillator signals, signals which are at both the sum and difference frequencies of the two. The output of the mixer is filtered to a single, fixed, "intermediate frequency" (IF) and then amplified. In AM (amplitude modulation) broadcast radios, which tune from 550KHz to 1600KHz, the IF is usually at 455KHz. So, by varying the frequency of the local oscillator from 1005KHz to 2055KHz, one can obtain a 455KHz difference signal from the mixer for the entire broadcast band. The output of the IF amplifier is then introduced to a "detector", which rectifies and low-pass filters the IF signal to produce an audio waveform.

    A receiver similar to the superheterodyne is the direct conversion receiver. In such a receiver the "intermediate frequency" is zero. In other words, the LO is tuned to the exact frequency you want to listen to, and the difference signal is simply the detected audio, which can then be lowpass filtered and amplified. But there's a catch: the local oscillator must not only have the same frequency as the desired signal, it must also have the same phase. To understand this, suppose the incoming RF carrier and the LO were 90° out of phase with each other. When multiplied together, these two signals would effectively cancel each other out, and you'd hear nothing. When they're in phase, the positive swings would multiply, returning positive results, and the negative swings would multiply, also returning positive results. But getting the LO to lock onto an incoming carrier can be tricky — especially if that carrier is weak.

    One way around this is to have two LOs, 90° out of phase with each other, and two mixers. The idea is, what one LO oscillator misses by having the wrong phase, the other will catch. In fact, the outputs from the two mixers can be combined in such a way that the actual LO phases are irrelevant, so long as they're 90° apart. The formula for doing so is:

    ____Audio Amplitude = sqrt(I² + Q²),

    where I is the output of one mixer (from the "In-phase" LO), and Q is the output of the other mixer (from the "Quadrature-phase" LO).

    Well, that's enough theory to lay the groundwork for the Propeller receiver. I've really glossed over a lot of stuff, but this is a forum post, not a book, and I want to get to the actual hardware and software.

    APPLICATION

    The use of a Propeller counter as the basis for an analog-to-digital converter (ADC) is now well-established. So why not simply attach an antenna to the input of one of these ADCs and see what comes out? Basically, that's what I've done. Here's a schematic:

    attach.aspx?a=24153

    The antenna (a wire strung across the ceiling of my shop) is connected, through an inductor to both digital ground and earth ground. I used a 330uH power inductor I found in my junkbox. It actually worked better than the ferrite antenna scavenged from a cheap transistor radio. A bunch of enameled wire wound on a plastic sewing machine bobbin worked almost as well, too. I'm sure Beau Schwabe (i.e "He Who Understands Inductors and Knows What to Do with Them") can shed a lot more light on the choice of inductors and why one is needed here. I just grabbed what I had until I found something that worked. My "earth ground" consists of the ground clip from my scope attached to the ground stud on the Demo Board. My scope input return ground and its AC protective ground are connected together, thence back to the breaker box and to a metal grounding rod. (By the way, I live in a fringe area for AM reception. If you live in a city with strong AM transmitters, you may not have to go to all this trouble.)

    The antenna also connects, through a capacitor, to pin A3 of the Propeller. This is the "analog" input terminal. The feedback comes from A4 through a 470K 0805 SMD resistor, which I soldered between pins A3 and A4 right on the chip itself. I've omitted the usual filter caps to Vdd and Vss (Gnd), choosing instead to let the inherent input capacitance of A3 do the filtering. This keeps both the input impedance and frequency response of the ADC high, which is necessary for detecting weak RF signals. During positive swings of an incoming signal, A4 will be sending more 0s than 1s to counterbalance it; during negative swings, more 1s than 0s. One counter can do this, set up in the "positive-with-feedback" special analog mode. Unlike the usual ADC usage, though, we're never going to read this counter again. It's just that string of 1s and 0s fed back from A4 that we're interested in.

    I love the Propeller's counters! I don't know if Chip knew what all could be done with them when he designed them, or if he just had an inkling that, with the right set of features, almost anything could be accomplished. In any event, the counters make ideal local oscillators and mixers! The oscillator part is pretty easy: just configure two counters as numerically-controlled oscillators (NCOs) in quadrature with each other. The frequency will be the frequency of the station you want to tune in. So, if I want to receive KIXI 880 in Seattle, I set up both counters to output 880KHz square waves, 90° out of phase with each other (i.e. PHSB = PHSA + $4000_0000).

    Now comes the magic part: the mixers. The counters can be configured to count up whenever two inputs satisfy a Boolean conditional. The Boolean equation can be anything you want: AND, OR, NAND, NOR, XOR, you name it. I used XOR. Each "mixer" counter gets two inputs: the feedback from A4 and one of the LO outputs. If the LO output is low when A4 is feeding back 1s, predominantly (i.e. when the antenna signal is low), the counter will count up at a fast clip. Likewise, if LO is high when A4 is feeding back 0s, predominantly, the counter will, again, count up at a fast clip. In other words, the counter will count up faster when an incoming RF signal is in phase with the LO than when it's not. Moreover, the rate at which it counts up will be proportional to the amplitude of that signal. So, to read the amplitude of a signal in phase with the LO, one need only zero the mixer counter, wait awhile, then read it to see how far up it counted. On average, there will be as many increments during the sample period as non-increments, so the mean (average) count will be half the number of system clocks occurring during the same period. Any signal that's out of phase with LO, or of a different frequency, will contribute as many increments as non-increments, thus having no effect on driving the net count away from the mean.

    Therefore, after each sample period, we can subtract the actual count from the mean count to get the instaneous amplitude of the signal. By doing this for both the I mixer and Q mixer, squaring the individual amplitudes, adding them, and taking the square root, we get the signal's amplitude, which can then be fed to the audio output: another counter in DUTY mode, feeding a lowpass filter. (I used A10 on the Demo board, which has the filtering hardware already in place.)

    The length of the sample period will affect two things: the audio frequency response and the signal-to-noise ratio. Like most things in life, each of these two desirable qualities increases at the expense of the other, so you have to strike a balance. I got the most pleasing results with a 16KHz sample rate, which yields an 8KHz audio bandwidth. This is about as good as AM radio audio can get anyway, since the stations are spaced 10KHz apart. You can lower the sampling rate to get less static, but the audio starts to sound more "boomy".

    SUMMARY

    To summarize, the receiver uses six counters (spread over four cogs), as follows: (1) ADC (actually just a digitizing RF amplifier), (2) Local Oscillators in quadrature, (2) Mixers, and (1) Audio Output. Here's a block diagram:

    attach.aspx?a=24067

    The counters do virtually all the work. There's not a lot of code required, outside of setting up the counters, reading them, and shuffling data between them via the hub. The attached program is configured as a scanner for the AM broadcast band. It increments continuously by 10KHz steps from 550KHz to 1600Khz, pausing at each frequency for three seconds, which is long enough to tell if something's there. It displays the frequency on a TV monitor, via tv_wtext (included). I've also used it for LF reception below the broadcast band with some minor success. As I stated in the intro, it's not a very good receiver — in fact it sounds pretty crappy and noisy. If, like me, you live in a fringe area, you may be disappointed by its performance. But, even then, it does illustrate the capabilities of those amazing Propeller counters. And that, really, was the main point.

    -Phil

    Update: Owing to advice received from Beau Schwabe, based on his own testing, I've changed some component values. The inductor is now 500uH; the feedback resistor, 10M; the coupling cap, 0.047uF; and the antenna, a 2-meter-long vertical wire. The attached schematic reflects these changes, which did lead to an improvement in performance.

    Also, I've corrected a bug in the program's square routine. The bug should have had no effect on the small values involved, but could cause trouble if adapted for other uses.

    In a later post (17 Aug 08), I show how to wind the required inductor using readily-available parts. There's also a photo of the complete setup, with a detailed look at the feedback resistor.

    Post Edited (Phil Pilgrim (PhiPi)) : 6/11/2010 11:11:36 PM GMT




    Image Attachment :
    thumb.aspx?a=24067&ImageID=11288
    am_radio_blocks.gif
    _ 14KB (image/gif)This image has been viewed 4028 time(s).

    Image Attachment :
    thumb.aspx?a=24153&ImageID=11324
    PropellerRadio.gif
    _ 5KB (image/gif)This image has been viewed 3677 time(s).




    File Attachment :
    am_receiver - Archive [Date 2008.08.17 Time 14.11].zip _ 18KB (application/zip)This file has been downloaded 304 time(s).
  • WhitWhit Posts: 4,191
    edited 2010-08-10 08:53
    Phil,

    Here is a thread from the old forums that I would like to restore - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=442984

    I looked at your instructions, but could not find the bubble quote icon at the top of the post. Any ideas?
  • WhitWhit Posts: 4,191
    edited 2010-08-10 08:56
    Phil,

    Sorry - it was because I was logged in to the old forums. I will try it now and report back!

    Edit - Phil, I tried to fix the links on the thread listed above. I seem to have had partial success. Could you take a look? Thanks for working on this!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-08-10 09:33
    @Phil

    I appreciate the fact that you've been both vocal and proactive with solutions to solve the issues plaguing the new software. People who complain without helping to be part of the solution drive me crazy. Thanks for being one of the solid gold folks that I've come to know in these circles.

    Here's a thread that your conversion tool chokes on..
    http://forums.parallaxinc.com/forums/default.aspx?f=33&m=312639

    It was created to bypass the original forum link limitation by using Microsoft word, viewing a local copy with Internet explorer, then copy/pasting it into the old forum software.

    Have a look.
    OBC
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-10 09:49
    Whit, I think I've got the bugs worked out of links now, except maybe for colors. Had you specified the colors for your links?

    Thanks for the help! I need all I can get.

    -Phil

    _________________________________________________

    Hey All,
    _
    Here is a list of interesting forum posts regarding the Stingray (placed here for ease of use). Add your favorites below_and I will edit them in_to this_post.
    _
    General:
    _

    Stingray Robot Feedback__- http://forums.parallaxinc.com/forums/default.aspx?f=10&m=391099
    _
    _
    Hardware Accessories and Add-ons:
    _
    Stingray Motor Shaft Encoders - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=415461
    _
    Power options for Stingray - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=411929
    _
    Stingray Battery Adapters - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=411625
    _
    Grommet Tip - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=396058
    _
    IR on Stingray - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=414262
    _
    Stingray Socket Connectors for Motors - http://forums.parallaxinc.com/forums/?f=10&m=391272&g=448034#m448034
    _
    _
    Misc:
    _
    Easier Stingray Battery or Other Access - PART 2 -
    http://forums.parallaxinc.com/forums/?f=10&m=442976&g=442976#m442976_and
    http://forums.parallaxinc.com/forums/default.aspx?f=10&m=460417
    _
    RFC: Stingray/MRS1 Standard 0.01 Configuration Protocol - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=424948
    _

    Battery Access - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=395076
    _
    Tony B.'s Stingray Work/Test Stand - http://forums.parallaxinc.com/forums/default.aspx?f=10
    _
    _
    Software and Code:
    _
    Stingray Challenge__- http://forums.parallaxinc.com/forums/default.aspx?f=10&m=440728
    _
    Stingray Sample / Demo Code?_-_http://forums.parallaxinc.com/forums/default.aspx?f=10&m=410362
    _

    Stingray 3 Ping Demo - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=413611
    _
    _
    Stingray Look-a-likes and Propeller Robot Control Board:
    _
    My Stingray Look a Like Plywood Robotics Platform - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=422434_
    _
    _
    Gotchas:
    _
    Stingray Hardware Trap - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=401933
    _
    MSR1 translator Lesson 1: driving capacitive loads. ATTN Stingray users__- http://forums.parallaxinc.com/forums/default.aspx?f=10&m=439121
    _
    Robot Control Board MSR1 Fatal Design Flaw - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=455326
    _
    _
    _

    _
    _
    _
    _
    _
    _
    _
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-10 10:37
    OBC, I think this is better than what you first experienced. One hiccup is at the very end, where the original HTML incorrectly nested the <font> and <b> tags, leaving the dangling in your webpage link. Here's the output from my HTML analizer:

    Start: a <a href="http://www.warrantyvoid.us/tiki-index.php?page=Propeller&quot; target="_blank">
    Start: font <font style="color:000099;">
    Start: b <b>
    Text: The Propeller Pages
    End: font </font> This /tag and the next /tag are in the wrong order.
    End: b </b>
    End: a </a>

    The HTML generated by dotNetBB is not the best in the world. Improper tag nesting is probably my biggest headache. I'm able to compensenate for missing or extra closing tags, but the algo that does that chokes on something like this.
    ______________________________________

    _
    Games and Entertainment:
    _
    _ 3D Monster Maze
    _ Adventure
    _ ASCII Wing
    _ Battlez0wned
    _ Clickn'Collapser
    _ Defender
    _ Donkey Kong
    _ Frogger
    _ Grid Runner
    _ Jetpac
    _ Kaboom!
    _ Loadrunner
    _ Manic Miner
    _ Maze Mania
    _ Mercury Mission
    _ Mythic Flight
    _ Planetary Defense
    _ Progue
    _ Prop Chess
    _ Prop Invaders
    __PropInVGAders
    _ Repeat (Simon clone)
    _ Snake
    _ Spacewar!
    _ Spinpong
    _ Spintris
    _ Spydriver
    _ Sudoku
    _ The Hydra Monster Cave
    _ VCS: FREEWAY
    _ Unterwelt
    __Vecctor _
    _ ZX Spectrum Jumping Jack
    _
    _ Miscellaneous demos
    _ Turbulence Demo - VGA demo (lft)
    _
    Sound
    _ 16-bit, 4-channel, sample based audio driver (XlogicX)
    _ Hydra Dense Music Format (HDMF)
    _ Hydra Sound System (HSS)
    _ S3M to HSS Converter Utility (Sachiel7)
    _ Music Synthesizer object with General MIDI sound set__(Ariba)
    _ Propeller MIDI player (based on GM sound set)
    _
    _
    Graphics
    _ 16 color fat pixel bitmap (128x192 4bit TV) - (Baggers)
    _ 3D TV Graphics Driver - 3D glasses not included ;)_ - Phil Pilgrim (PhiPi)
    _ 50 Line graphics driver (trainer)
    __Another High Color TV driver_ /_ High Color TV driver
    _ Apple ][ tv Driver (Baggers)
    _ Atari 2600-esque display driver (Baggers)
    _ barbones VGA bitmap driver - multiple resolutions supported (Kye)
    _ Composite NTSC sprite driver (ericball)
    _ Fantasia
    _ Full Color driver for Hydra SRAM expansion card
    _ Keyboard, Video, and Mouse Drivers
    _ Keyboard, Video, and Mouse Drivers #2
    _ Multi Cog Tile Driver Tutorial
    _ Seriously improved 8x8 NTSC text driver (80 Column Color) (potatohead)
    _ ZX Spectrum TV driver
    _
    _
    Utilities & Applications
    _ Alternate Firmware for Hydra SRAM expansion card to allow random access to locations >64K
    _ Ariba's Editor Application for the 'fat pixel' driver
    _ Atari 2600 emu
    _ Building the Lattice ISP Programmer for the Hydra HX512_ (RossH)
    _ Digital Screen Grab
    _ Femto BASIC
    _ Hydra Asset Manager
    _ HYDRA Demo Source Code
    _ Hydra Logo
    _ SPIN Conditional Compilation Managment (SCCuM)
    _ Wii Controller Objects for the Propeller (DogP)
    _
    _
    Spin Language Compliers/IDE's
    _ Propeller Tool Software (v 1.2.6)
    _ BST - The multi-platform Propeller Tool Suite (BradC)
    _
    _
    C Language Compilers/IDE's:
    _ ImageCraft C for the Propeller (ImageCraft)
    __Catalina - a free C compiler for the Propeller (RossH)


    _
    Assembly Language Compliers:
    _ propasm - Assembler for the Parallax Propeller (Cliff L. Biffle)
    _ Plasma - The Propeller Low-level Assembly Aggregator (lft)
    _ Las: Largos LMM Assembler (Bill Henning)


    _
    For more tools/tools under development, see Cluso99's thread:
    _ http://forums.parallaxinc.com/forums/default.aspx?f=25&m=296149
    _
    Emulators: CPUs Z80 8080 6809 6502; Micros Altair ZX81 Atari (List Maintained by Cluso99)
    __http://forums.parallaxinc.com/forums/default.aspx?f=25&m=321808
    _
    Related Websites
    _ Propeller Wiki
    _ HYDRA forum on XGameStation.com
    _ The Propeller Pages @ Warrantyvoid
    ___________________________________

    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
    Post Edited (Oldbitcollector) : 10/26/2009 11:42:45 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-10 10:37
    Whit, I think I've got the bugs worked out of links now, except maybe for colors. Had you specified the colors for your links?

    Thanks for the help! I need all I can get.

    -Phil


    Hey All,
    _
    Here is a list of interesting forum posts regarding the Stingray (placed here for ease of use). Add your favorites below_and I will edit them in_to this_post.
    _
    General:
    _

    Stingray Robot Feedback__- http://forums.parallaxinc.com/forums/default.aspx?f=10&m=391099
    _
    _
    Hardware Accessories and Add-ons:
    _
    Stingray Motor Shaft Encoders - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=415461
    _
    Power options for Stingray - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=411929
    _
    Stingray Battery Adapters - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=411625
    _
    Grommet Tip - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=396058
    _
    IR on Stingray - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=414262
    _
    Stingray Socket Connectors for Motors - http://forums.parallaxinc.com/forums/?f=10&m=391272&g=448034#m448034
    _
    _
    Misc:
    _
    Easier Stingray Battery or Other Access - PART 2 -
    http://forums.parallaxinc.com/forums/?f=10&m=442976&g=442976#m442976_and
    http://forums.parallaxinc.com/forums/default.aspx?f=10&m=460417
    _
    RFC: Stingray/MRS1 Standard 0.01 Configuration Protocol - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=424948
    _

    Battery Access - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=395076
    _
    Tony B.'s Stingray Work/Test Stand - http://forums.parallaxinc.com/forums/default.aspx?f=10
    _
    _
    Software and Code:
    _
    Stingray Challenge__- http://forums.parallaxinc.com/forums/default.aspx?f=10&m=440728
    _
    Stingray Sample / Demo Code?_-_http://forums.parallaxinc.com/forums/default.aspx?f=10&m=410362
    _

    Stingray 3 Ping Demo - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=413611
    _
    _
    Stingray Look-a-likes and Propeller Robot Control Board:
    _
    My Stingray Look a Like Plywood Robotics Platform - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=422434_
    _
    _
    Gotchas:
    _
    Stingray Hardware Trap - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=401933
    _
    MSR1 translator Lesson 1: driving capacitive loads. ATTN Stingray users__- http://forums.parallaxinc.com/forums/default.aspx?f=10&m=439121
    _
    Robot Control Board MSR1 Fatal Design Flaw - http://forums.parallaxinc.com/forums/default.aspx?f=10&m=455326
    _
    _
    _

    _
    _
    _
    _
    _
    _
    _
  • WBA ConsultingWBA Consulting Posts: 2,938
    edited 2010-08-10 12:20
    Corrupted Nested List example:

    The parts list for my Reverse Geo-Cache Project (bottom of 4th post):
    http://forums.parallax.com/showthread.php?t=118830

    original:
    http://forums.parallaxinc.com/forums/default.aspx?f=21&m=414611
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-10 13:28
    Thanks, Andrew! Does this look okay?

    -Phil

    BTW, I still need examples of an ordered list, and a list within a list. Thanks.
    ________________________________________

    SPIN Code and Program Flow:

    The code creation for this project was very fun, intimidating, frustrating, annoying, enlightening, time-consuming, and rewarding. I am still a newbie with the propeller (only been playing with the propeller since UPEW '09 in July) and my weakness is still SPIN fundamentals. However, as I mentioned on another post somewhere before, I can mash up SPIN objects fairly well already. I may not completely understand what everything does, but I can accomplish tasks that would be above my head with anything other than the propeller chip.

    Some of my development is in the Reverse GeoCache Project thread in the sandbox. However, I cleaned things up quite a bit since those and added heavy commenting, developmental version details, a connection list, etc, to the final version attached here. This project started with the Google Earth GPS SD Card Logger by Paul_H. After getting it to work properly on my demoboard, I moved onto harvesting that program's core for this project. Over several hours each day for a week, the project moved from the demoboard, to my Propeller PDB, and finally to the USB Protoboard that is installed in the case. The PPDB made testing and debugging extremely easy. I have already gotten my money's worth for it as far as I am concerned. On the PPDB, I did all the code learning for the servos, uOLED display, and it made the debugging process easy by having extra LEDs, pushbottons, and servo headers at my finger tips. Kye's servo engine is extremely easy to use, and that helped me considerably to get past the servo learning curve. Kye's object worked out perfectly, but I noticed that the servo jitters a bit upon power up by itself. To compensate for that, I start the servo engine early on in the program and ensure that the servo is in the locked position. If I cycled power at the right time after power up, I could "jitter" the servo a bit at each power cycle to eventually drive it far enough to open the box. The uOLED was a bear at first, but once I figured out it's quirks (IE: you must have the pullup on it's receive pin) I got rather comfortable with displaying text how and where I wanted with ease. The uOLED object by Steve McManus is easy to use and provides the necessary tools to put the uOLED display to work for you. I will be playing with it more to learn about displaying pictures from the uSD card as well as drawing shapes because it will be used in one of my propeller design contest entries.

    The basic program concept is as follows (detailed program flowchart is attached):
    • Power up and initialize
    • If bypass switch is enabled, open box if it's held while showing a pixel "progress bar" on screen, then reboot after a delay
    • If bypass switch is not enabled, continue normally
    • Flash Happy Birthday message on screen a few times
    • Show "locating" while waiting for GPS satellite lock
    • Once NMEA strings begin flowing from GPS module:
    • Check longitude/latitude against target location
    • If not matched, display long/lat in red on screen and loop to checking location
    • If matched show long/lat in green briefly, then flash "you got it" on screen before unlocking.
    The connections are quite simple and straightforward, so I did not bother with a schematic, just a connection list. NOTE: The I/O pins for the servo and uOLED are defined in their SPIN object files, not the main program.
    • P00 - LED1 Status LED, 330 ohm series resistor through LED to GND
    • P02 - SW01 Bypass Switch, 10k pullup, switch pulls to GND
    • P04 - Servo data pin (defined in servoEngine1.spin)
    • P05 - uOLED Reset Pin
    • P06 - uOLED TX (connected to uOLED module RX pin and 10k pullup)
    • P07 - uOLED RX (connected to uOLED module TX Pin)
    • P16 - GPS Module Output pin (connected to GPS Module SIO pin)
    • P17 - Not Connected but referenced by GPS object so it must be left unconnected
    • uOLED Vcc - +3.3V
    • GPS VCC - 5V
    • Servo VCC - 5V
    • ALL GNDs - Vss
    • Battery pack routes through main power switch then to protoboard input
    The program code has a lot of comments and seems to be somewhat clean for understanding. I am sure there are bugs hiding in it somewhere and that the code could probably be streamlined by power-SPINners. (I know it's using two versions of the full-duplex serial objects for example). I would appreciate any feedback, constructive criticism, ridicule, and (hopefully) a few compliments.

    I do plan on making another version that is stripped down to the GPS module and LCD Terminal AppMod for a cost effective version. I used the uOLED because I originally planned on loading pictures onto the uSD card that would be displayed as clues for a scavenger hunt that would involve multiple locations. Since I was working to a fixed deadline, I didn't get to figuring out how to do all of that. I still want to accomplish that, so look for that version as well someday (hopefully in time for UPEW). For now, this is considered done and I am shifting gears back to my two propeller contest entries.
    ___________________________________

    Andrew Williams
    WBA Consulting
    WBA-TH1M Sensirion SHT11 Module
    Special Olympics Polar Bear Plunge, Mar 20, 2010
    Post Edited (WBA Consulting) : 1/2/2010 8:13:06 PM GMT




    Image Attachment :
    thumb.aspx?a=37867&ImageID=18092
    ReverseGeoCacheFlow.jpg
    _ 195KB (image/jpeg)This image has been viewed 229 time(s).






    File Attachment :
    ReverseGeoCache_U16.spin _ 16KB (application/octet-stream)This file has been downloaded 103 time(s).
    File Attachment :
    ReverseGeoCache_vU16-Archive.zip _ 294KB (application/x-zip-compressed)This file has been downloaded 85 time(s).
  • WhitWhit Posts: 4,191
    edited 2010-08-10 14:25
    Thanks Phil!

    I think the colors were crazy on the original! No complains here!

    You da man! (Sorry, but the Saints did win the Super Bowl and all...)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-10 14:51
    OBC, I think I've got the styles figured out from the <span> tag now, so your links show up green like they did in the original.

    -Phil
    _________________________

    _
    Games and Entertainment:
    _
    _ 3D Monster Maze
    _ Adventure
    _ ASCII Wing
    _ Battlez0wned
    _ Clickn'Collapser
    _ Defender
    _ Donkey Kong
    _ Frogger
    _ Grid Runner
    _ Jetpac
    _ Kaboom!
    _ Loadrunner
    _ Manic Miner
    _ Maze Mania
    _ Mercury Mission
    _ Mythic Flight
    _ Planetary Defense
    _ Progue
    _ Prop Chess
    _ Prop Invaders
    __PropInVGAders
    _ Repeat (Simon clone)
    _ Snake
    _ Spacewar!
    _ Spinpong
    _ Spintris
    _ Spydriver
    _ Sudoku
    _ The Hydra Monster Cave
    _ VCS: FREEWAY
    _ Unterwelt
    __Vecctor _
    _ ZX Spectrum Jumping Jack
    _
    _ Miscellaneous demos
    _ Turbulence Demo - VGA demo (lft)
    _
    Sound
    _ 16-bit, 4-channel, sample based audio driver (XlogicX)
    _ Hydra Dense Music Format (HDMF)
    _ Hydra Sound System (HSS)
    _ S3M to HSS Converter Utility (Sachiel7)
    _ Music Synthesizer object with General MIDI sound set__(Ariba)
    _ Propeller MIDI player (based on GM sound set)
    _
    _
    Graphics
    _ 16 color fat pixel bitmap (128x192 4bit TV) - (Baggers)
    _ 3D TV Graphics Driver - 3D glasses not included ;)_ - Phil Pilgrim (PhiPi)
    _ 50 Line graphics driver (trainer)
    __Another High Color TV driver_ /_ High Color TV driver
    _ Apple ][ tv Driver (Baggers)
    _ Atari 2600-esque display driver (Baggers)
    _ barbones VGA bitmap driver - multiple resolutions supported (Kye)
    _ Composite NTSC sprite driver (ericball)
    _ Fantasia
    _ Full Color driver for Hydra SRAM expansion card
    _ Keyboard, Video, and Mouse Drivers
    _ Keyboard, Video, and Mouse Drivers #2
    _ Multi Cog Tile Driver Tutorial
    _ Seriously improved 8x8 NTSC text driver (80 Column Color) (potatohead)
    _ ZX Spectrum TV driver
    _
    _
    Utilities & Applications
    _ Alternate Firmware for Hydra SRAM expansion card to allow random access to locations >64K
    _ Ariba's Editor Application for the 'fat pixel' driver
    _ Atari 2600 emu
    _ Building the Lattice ISP Programmer for the Hydra HX512_ (RossH)
    _ Digital Screen Grab
    _ Femto BASIC
    _ Hydra Asset Manager
    _ HYDRA Demo Source Code
    _ Hydra Logo
    _ SPIN Conditional Compilation Managment (SCCuM)
    _ Wii Controller Objects for the Propeller (DogP)
    _
    _
    Spin Language Compliers/IDE's
    _ Propeller Tool Software (v 1.2.6)
    _ BST - The multi-platform Propeller Tool Suite (BradC)
    _
    _
    C Language Compilers/IDE's:
    _ ImageCraft C for the Propeller (ImageCraft)
    __Catalina - a free C compiler for the Propeller (RossH)



    _
    Assembly Language Compliers:
    _ propasm - Assembler for the Parallax Propeller (Cliff L. Biffle)
    _ Plasma - The Propeller Low-level Assembly Aggregator (lft)

    _ Las: Largos LMM Assembler (Bill Henning)


    _
    For more tools/tools under development, see Cluso99's thread:
    _ http://forums.parallaxinc.com/forums/default.aspx?f=25&m=296149
    _
    Emulators: CPUs Z80 8080 6809 6502; Micros Altair ZX81 Atari (List Maintained by Cluso99)
    __http://forums.parallaxinc.com/forums/default.aspx?f=25&m=321808
    _
    Related Websites
    _ Propeller Wiki
    _ HYDRA forum on XGameStation.com
    _ The Propeller Pages @ Warrantyvoid

    ___________________________________

    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
    Post Edited (Oldbitcollector) : 10/26/2009 11:42:45 PM GMT
  • trodosstrodoss Posts: 577
    edited 2010-08-10 21:10
    @Phil,
    I just ran across a "quote within a quote" post...

    Title: Hydra Asset Manager released! (page 2 has quote-within-quote)

    old forum (actual post):
    http://forums.parallaxinc.com/forums/default.aspx?r=q&f=33&m=191301

    or:
    http://forums.parallaxinc.com/forums/default.aspx?f=33&p=2&m=168490

    new forum (on page 2):
    http://forums.parallax.com/showthread.php?t=91596

    I have been getting "You do not have permission to post in this forum." when trying to quote the results, otherwise I would have tried to post that as well.
  • Jim EwaldJim Ewald Posts: 733
    edited 2010-08-10 21:29
    I don't see the blank lines at the end of the code page but I also do not have the Parallax font installed on this machine. (I know - don't tell my boss). The HTML looks fine and I have verified that there are no CSS interactions that could contribute to the issue. I can ask Jeff about it in the morning.

    I also adjusted the code page width out to 750 px. I think that might be a little too wide. Let's see what the community has to say about it.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-10 21:52
    trodoss,

    Whoa! Good catch! Thanks! The reason no results were returned is that the post is on page two of that thread, and the filter software was looking on page one. I'm really not sure why the forum number and page number are even necessary to retrieve the post. It seems like just the post number should be enough. So I've got an inquiry in with Jim on this one. Anyway, the translation from the program is below, once it was programmed to find the right page.

    Thanks,
    -Phil
    __________________________
    CardboardGuru said...
    epmoyer said...
    The quickest install solution I can imagine is 1) have an end-user run a pre-compiled .eeprom file which is the HAM communications engine 2) run the HAM windows app and click some new "load .eeprom image" button 3) select the release .eeprom image from a file browser 4) the code loads, you click reset, and you're up and running.

    Or one step further. How about this:

    Winzip has an install feature. If you have a setup.exe or install.exe file in a zip file, then when you open the zip file, you can click on Install and winzip will extract to a temporary directory and run setup.exe or install.exe.

    So how about creating a zip file with 3 files in it.

    1) Install.exe
    2) Install.ini
    2) benson_ham_driver_1_06.eeprom
    3) Spacewar.eeprom

    The Install.exe is a special build of HAM which has minimal interface, and automatically loads benson_ham_driver_1_06.eeprom into Hydra RAM as the spin tool would. It then uses that to upload the file named in install.ini. In this case case, install.ini would contain the name Spacewar.eeprom.

    If you have the registered version of Winzip you could go even further and create a self-extracting zip file that will run the install program automatically. So that would be one double click from the desktop to install the 128K EEPROM file on the Hydra. You can't get much easier for the end-user than that.

    Well, if nothing else, I do agree that there should be a one button solution in HAM to upload and launch the HAM driver. That wouldn't be too bad.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-11 11:49
    Okay, Potatohead, here's the first one. Good find, BTW! Thanks! I had to rethink how I handled newlines vis-a-vis <div> tags.

    -Phil
    _________________________________
    Mike said...
    All bit manipulation on the propeller is done with 32 bit integer logical operations (&, |, ^, !) including the many different kinds of shift operations. For using individual bits as flags, use a mask like $00400000, preferably as a named constant (for clarity) and use the bit logical operations so to set the bit do "x |= $00400000", to clear the bit do "x &= !$00400000", to test if set do "(x & $00400000) <> 0", and to test if clear do "(x & $00400000) == 0". If you're careful, you can do combinations of bits the same way.
    Mike....the mask has me confused. Setting them.....Ok.....I get that part. I was going to do_ combinations.....that way I could have 32 flags in one group.
    _
    Chip said...
    If you have over 32__bits, you_could make an array_of longs with routines to read and write by bit number:
    _
    VAR long Bits[32] '1024 bits
    _
    PRI ReadBit(BitNum) : Bit
    _ Bit := Bits[BitNum >> 5] >> BitNum & 1
    _
    PRI WriteBit(BitNum, State)
    _ Bits[BitNum >> 5] |=_|< BitNum _ Bits[BitNum >> 5] ^=_|< BitNum &_not_State_
    _
    If you have only 32 bits, you could use the above code, but get rid of the [BitNum >> 5] indexes:
    _
    VAR long Bits '32 bits
    _
    PRI ReadBit(BitNum) : Bit
    _ Bit := Bits >> BitNum & 1
    _
    PRI WriteBit(BitNum, State)
    _ Bits |=_|< BitNum _ Bits ^=_|< BitNum &_not_State_
    _
    Chip I know I could have over 32 bit as flags.....but really doubtful. I use them alot ...but not in huge amounts.
    _
    I'll have to read up on your method of affecting them.....but I think I get it.
    _
    James
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-11 12:05
    PH, here's a post from your second link. Back to Courier for the code blocks, I'm afraid. If I try to make a style change inside the code box, vBulletin sticks extra newlines at the end. I do wish we could be rid of the scrollbars.

    -Phil
    _____________________________________________

    Here is a little something I have been putting together... It still needs some code optimization, but feel free to play around with it.
    It uses the 'VGA_512x384_Bitmap' object that Chip put out awhile ago to allow you to include graphics as well as text.


    [b]COMMAND Summary[/b]
    [b]PUB[/b] Sine(Ang)|Arg1_             ' Input = 13-bit angle ranging from 0 to 8191
    [b]PUB[/b] Cosine(Ang)|Arg1_           ' Input = 13-bit angle ranging from 0 to 8191
    [b]PUB[/b] ArcSine(Ang)|Arg1_          ' Input = signed 16-bit value ranging from $FFFF0001 ('-1') to $0000FFFF ('1')
    [b]PUB[/b] ArcCosine(Ang)|Arg1_,sign   ' Input = signed 16-bit value ranging from $FFFF0001 ('-1') to $0000FFFF ('1')
    [b]PUB[/b] plot(x,y)| Arg2_,Arg3_,Arg4_                        'Sets pixel value at location x,y
    [b]PUB[/b] point(x,y)| Arg2_ , Arg3_,Arg4_                     'Reads pixel value at location x,y
    [b]PUB[/b] character(offX,offY,chr)|Arg3_,Arg4_,Arg5_          'Place a text character from the ROM table at offset location offsetX,offsetY
    [b]PUB[/b] line (px,py,dx,dy)| Arg4_,Arg5_,Arg6_,Arg7_,Arg8_   'Draws line from px,py to dx,dy
    [b]PUB[/b] box(x1,y1,x2,y2)| Arg4_,Arg5_,Arg6_,Arg7_,Arg8_     'Draws a box from opposite corners x1,y1 and x2,y2
    [b]PUB[/b] color(tile,cval)                                    'Set Color tiles on VGA screen
    [b]PUB[/b] pointcolor(pc)                                      'Sets pixel color "1" or "0"
    [b]PUB[/b] Text(offX,offY,Address)|chr,i                       'Place a text string from the ROM table at offset location offsetX,offsetY
    [b]PUB[/b] shape(x,y,sizeX,sizeY,sides,rotation)|angle,sx1,sy1,sx2,sy2         'Draws a shape with center located at x,y
    [b]PUB[/b] deg(angle)                                          'translate deg(0-360) ---> to ---> 13-bit angle(0-8192)
    [b]PUB[/b] bit13(angle)                                        'translate 13-bit angle(0-8192) ---> to ---> deg(0-360)
    [b]PUB[/b] SimpleNum(x,y,DecimalNumber,DecimalPoint)|sign,DecimalIndex,TempNum,spacing,DecimalFlag,Digit    'Crude decimal number printing
    



    Simple Spin Demo program:
    [b]CON[/b]
      [b]_clkmode[/b] = [b]xtal[/b]1 + [b]pll[/b]16x
      [b]_xinfreq[/b] = 5_000_000
    
      '512x384
      tiles = gr#tiles
    [b]OBJ[/b]
      gr    : "vga graphics ASM"
    
    [b]PUB[/b] MainLoop|h,i,deg,x,y,mask,ii,char
        gr.start
        gr.pointcolor(1)
        [b]repeat[/b] i [b]from[/b] 0 to tiles - 1                        'init tile colors to white on black
          'gr.color(i,$FF00)
          gr.color(i,$FF<<8+i)                              'init tile colors "Nice view" 
        gr.text(0,0,[b]string[/b]("Parallax VGA text [b]and[/b] graphics"))
        gr.SimpleNum(464,32,123,3)
    
        gr.box(30,50,80,100)                                'draw a box
        'or
        'gr.shape(55,75,71,71,4,gr.deg(45))                  'draw a box
    
        [b]repeat[/b] i [b]from[/b] 3 to 15
          gr.shape(256,192,300,300,i,gr.deg(90))            'i = 3  triangle
                                                            'i = 4  square
                                                            'i = 5  pentagon
                                                            'i = 6  hexagon
                                                            'i = 7  heptagon
                                                            'i = 8  octagon
                                                            'i = 9  nonagon
                                                            'i = 10 decagon
                                                            'i = 11 hendecagon
                                                            'i = 12 didecqgon
                                                            'i = 13 tridecagon
                                                            'i = 14 tetradecagon
                                                            'i = 15 pentadecagon
        [b]repeat[/b]
          [b]repeat[/b] i [b]from[/b] 0 to 359
            gr.pointcolor(1)
            gr.shape(256,192,145,145,3,gr.deg(i))
            gr.shape(256,192,70,70,4,gr.deg(359-i*2))
            gr.shape(256,192,30,30,5,gr.deg(i*3))
            [b]repeat[/b] 4000                                                  
            gr.pointcolor(0)
            gr.shape(256,192,145,145,3,gr.deg(i))
            gr.shape(256,192,70,70,4,gr.deg(359-i*2))
            gr.shape(256,192,30,30,5,gr.deg(i*3))
    
    

    ___________________________________

    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 9/26/2006 3:56:22 AM GMT




    Image Attachment :
    thumb.aspx?a=9347&ImageID=4183
    Color VGA.JPG
    _ 473KB (image/jpeg)This image has been viewed 1454 time(s).






    File Attachment :
    VGA graphics DEMO - V1.0.zip _ 13KB (application/x-zip-compressed)This file has been downloaded 691 time(s).
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-11 12:32
    PH, and number three. Another good example, as it required rethinking the <p> tag. (Now inserting a newline before every <p> and after every </p>.)

    -Phil
    _____________________________________

    _Hi AReal Person,

    Happy New year!

    O.K. , I Have Some answers for you:

    Hear are the link/s to all of my posts to date, (not including this onelol.gif ), so that you may find the info that you seek: (w/out me having to retype it all over a gain.)

    _I'll put them in an order that will be most useful to you.

    This one will help you with your TV out question:

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=126302&g=126380#m126380

    And here are the rest for the sake of Electronic Review, listed_In reverse order:(Oldest first)

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=126139

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=126139&g=126168#m126168

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=126302&g=126380#m126380

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=131097&g=131148#m131148

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=130452&g=131149#m131149

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=136388&g=136722#m136722

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=136388&g=136809#m136809

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=136388&g=136977#m136977

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=131097&g=143603#m143603

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=145241&g=146236#m146236

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=146195&g=146238#m146238

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=145909&g=146274#m146274

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=121344&g=149249#m149249

    And this_next one_is the post that I made to your last question about FRAMs.

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=161510&g=161647#m161647

    Ok. Now I have some News for you:

    At this link:

    http://forums.parallaxinc.com/forums/default.aspx?f=25&m=163387

    Well I hope you like the news,

    and the links help you out,

    IAI Captain

    ___________________________________


    [font=Verdana"]IAI (Indigenous Alien Intelligence),[/font]

    [font=Verdana"]The New View on Machine Intelligence.[/font]

    [font=Verdana"]Because There is nothing Artificial about it![/font]
  • potatoheadpotatohead Posts: 10,261
    edited 2010-08-11 16:46
    I'll go trolling through the posts again later today.

    Courier on the code is no crime. If it reads fine, we can deal.

    Thanks for all your efforts Phil!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-11 17:08
    potatohead,

    Thank you and everyoine else who has posted here for the help. You have no idea how valuable it's been!

    -Phil
  • SSteveSSteve Posts: 808
    edited 2010-08-13 10:19
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-13 11:50
    SSteve,

    Thanks for those examples! That second example was great: code in a quote, quote in quote in quote, two parallel quotes in a quote! Here's a conversion of the second example's entire page. (The start and end markers won't be in the new forum, of course, and each post will be attached to its user.)

    -Phil
    _____________________


    ====================START of #404488=====================
    A way to measure the difference between two signals could be prepared: I face the problem to measure a high voltage (battery 24V) and the current through a high side shunt. How to do that? As the battery voltage is only changing slowly, while the shunt voltage changes fast, I use two of the props ADC's. Now I connect a low pass to the compensating output of the battery ADC. The pulses are integrated and the cap charges to a voltage proportional to the battery voltage, but negative in relation to the comparator level of the input. This voltage is fed into the shunt ADC, so the ADC is measuring the difference between the shunt terminals. The precision is mainly effected by the precision of the input resistors, the resolution is not to high, but we have a "differential" input. Maybe, the low pass can be integrated if there is a way to do it with a little capacitor.
    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
    =====================END of #404488======================

    ====================START of #404490=====================
    tonyp12 said...
    >Chip Gracey (Parallax) said..
    >From what I gather, the toggle rate for such is in the GHz. That's beyond our 3.3V I/O capability.

    Lowest pixel clock rate for hdmi is 25Mhz,
    so if you somehow could get Waitvid to be programmed to send burst of 10bit data at 25mhz
    *
    But this would mean a bit rate of 250MHz if the pixel rate was 25MHz, right? I think the most interesting modes are going to require bits rates at over 1GHz.

    When we could have 720x480p of pure digital display.

    PropII will be around to 2020, Analog VGA and PS2 etc will long gone by then.

    http://www.hdmi.org/download/HDMISpecification13a.pdf
    *
    Thanks for posting this. I will look at it. These standards always seem to bury the vital details between the lines.
    ___________________________________
    *
    Chip Gracey
    Parallax, Inc.
    =====================END of #404490======================

    ====================START of #404491=====================
    ErNa said...
    A way to measure the difference between two signals could be prepared: I face the problem to measure a high voltage (battery 24V) and the current through a high side shunt. How to do that? As the battery voltage is only changing slowly, while the shunt voltage changes fast, I use two of the props ADC's. Now I connect a low pass to the compensating output of the battery ADC. The pulses are integrated and the cap charges to a voltage proportional to the battery voltage, but negative in relation to the comparator level of the input. This voltage is fed into the shunt ADC, so the ADC is measuring the difference between the shunt terminals. The precision is mainly effected by the precision of the input resistors, the resolution is not to high, but we have a "differential" input. Maybe, the low pass can be integrated if there is a way to do it with a little capacitor.
    ErNa
    On the next Propeller there are very accurate delta-sigma ADCs built into every pin. With some precision voltage dividers and filter caps, you could do this differential measurement on two pins, with each using two resistors for the divider and a cap for the low-pass filter.
    I've still got the Propeller walnuts you gave me.
    ___________________________________
    *
    Chip Gracey
    Parallax, Inc.
    =====================END of #404491======================

    ====================START of #404495=====================
    dMajo said...
    @Chip, what about my question here http://forums.parallaxinc.com/forums/default.aspx?f=25&m=403348&g=404171#m404171. I am specially interested in movs/movd instructions. You have put together a magnificent assembler and more an as more I familiarize with it and its sefl-modifyng possibilities the more I love it. Now (hope you have understood the way I'd like these two instructions to work with and without the wc flag set - source selector switch, Carry flag not modified) when I execute a line (where the destination was modified by previous instruction) and next execution is based upon the result of this line you can save a lot of lines with this. Here is an example:
    Median Filter (3)                                       With new instruction             
    ==============================================          ========================================
                 CMP   MEM2,   INPUT      wc                             CMP   MEM2,   INPUT      wc
           if_c  MOVS  Med31,  @INPUT                              if_c  MOVS  Med31,  @INPUT
           if_nc MOVS  Med31,  @MEM2                               if_nc MOVS  Med31,  @MEM2
                 MOVD  Med32,  Med31                                     MOVD  Med32,  Med31
           if_c  MOVS  Med33,  @MEM2                               if_c  MOVS  Med33,  @MEM2
           if_nc MOVS  Med33,  @INPUT                              if_nc MOVS  Med33,  @INPUT
    Med31        CMP   MEM3,   @0         wc                Med31        CMP   MEM3,   @0         wc
           if_c  MOVD  Med32,  @MEM3                               if_c  MOVD  Med32,  @MEM3
                 NOP                                                     NOP
    Med32        CMP   @0,     @0         wc                Med32        CMP   @0,     @0         wc 
    [color=red]             MOV   Temp,   Med32
                 SHR   Temp,   #9
           if_c  MOVS  Med33,  Temp                                if_c  MOVS  Med33, Med32       wc[/color] ;this WC is source mux ctrl bit; the instructon doesn't modify the carry flag
                 NOP                                                     NOP
    Med33        MOV   OUTPUT, @0                           Med33        MOV   OUTPUT, @0
                 MOV   MEM3,   MEM2                                      MOV   MEM3,   MEM2
                 MOV   MEM2,   INPUT                                     MOV   MEM2,   INPUT
    
    *

    *
    This is possible to do using the wc, though it creates an ugly exception. It could be covered up by adding, as someone suggested, a MOVSD and MOVDD instruction which could affect the 'wc' opcode bit. The deal would be that MOVS, MOVD, MOVSD, and MOVDD would no longer allow for 'wc', as*its state*would now be determined by the instruction*mnemonic.
    ___________________________________
    *
    Chip Gracey
    Parallax, Inc.
    =====================END of #404495======================

    ====================START of #404496=====================
    Spreader said...
    Hi Chip, congratulations to you and your team for a magnificent device that truly breaks the mould. do you have any tentative dates yet for the PII release?
    I suppose a year, but I said that a year ago, too.
    ___________________________________
    *
    Chip Gracey
    Parallax, Inc.
    =====================END of #404496======================

    ====================START of #404497=====================
    And I didn't find new ones! They were unique, did You ever find someone else who had seen those?
    ___________________________________
    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
    =====================END of #404497======================

    ====================START of #404554=====================
    Hi Ariba


    I need that for one more posiblity.
    In my programs that I work on to some customer I need have one SUPERVISOR COG that can control all others (You said simple interupt) it is more as that.
    BUT has same function and many usages. As I reuse area of HUB memory that COG code reside with start ... I cant simply reload it (and it take to much time)
    And as You said with system that is in Propeller I. I lose all data stored in COG's Variable bufer that was colected in some time and COG wil after RESTART USE it ........... Important that this data are from last RUN.

    Regards
    Christoffer J
    ___________________________________

    Nothing is impossible, there are only different degrees of difficulty.

    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it*as simple as*possible yet as versatile as posible.
    *
    Sapieha
    =====================END of #404554======================

    ====================START of #404555=====================
    I agree, I could use a "soft reset" for LMM cogs.
    Sapieha said...
    Hi Ariba


    I need that for one more posiblity.
    In my programs that I work on to some customer I need have one SUPERVISOR COG that can control all others (You said simple interupt) it is more as that.
    BUT has same function and many usages. As I reuse area of HUB memory that COG code reside with start ... I cant simply reload it (and it take to much time)
    And as You said with system that is in Propeller I. I lose all data stored in COG's Variable bufer that was colected in some time and COG wil after RESTART USE it ........... Important that this data are from last RUN.

    Regards
    Christoffer J
    ___________________________________
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
    =====================END of #404555======================

    ====================START of #404572=====================
    Chip Gracey (Parallax) said...
    Spreader said...

    Hi Chip, congratulations to you and your team for a magnificent device that truly breaks the mould. do you have any tentative dates yet for the PII release?
    I suppose a year, but I said that a year ago, too.

    If you rush the chef you get a lousy meal!

    Chip, it looks like you are adding quite a few new assembler instructions. How are you massaging things to fit them into the existing 32 bit opcode structure, or have you changed the opcode structure?
    ___________________________________
    If you always do what you always did, you always get what you always got.
    =====================END of #404572======================

    ====================START of #404574=====================
    BradC said...
    Chip Gracey (Parallax) said...
    Spreader said...

    Hi Chip, congratulations to you and your team for a magnificent device that truly breaks the mould. do you have any tentative dates yet for the PII release?
    I suppose a year, but I said that a year ago, too.

    If you rush the chef you get a lousy meal!

    Chip, it looks like you are adding quite a few new assembler instructions. How are you massaging things to fit them into the existing 32 bit opcode structure, or have you changed the opcode structure?
    *
    I took one regular S,D-type instruction space and used the S field to define the functionality while the*D field*declares the register to work on. With 512 immediate S possibilities, there's lots of space for these new instructions. Many of them take a partial span of this space to declare some embedded constants.

    ___________________________________
    *
    Chip Gracey
    Parallax, Inc.
    =====================END of #404574======================

    ====================START of #404576=====================
    may i sugest that one of the output video modes be thrugh a TFP410

    This would give you the ability to do HDMI Output easily and the option to get licensed for the TFP510 for encrypted signals.
    ___________________________________
    24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.
    =====================END of #404576======================

    ====================START of #404613=====================
    mctrivia: In Gods name why?
    ___________________________________
    For me, the past is not over yet.
    =====================END of #404613======================

    ====================START of #404623=====================
    Chip said...
    ...In thinking about this more: over process, temperature, and voltage, we could not rely on the chip having better than +/-20% absolute tolerance, which is pretty poor. However, if rather than make the graduated values follow an R, 2R, 3R, 4R...) pattern, we could do (R, 2R, 4R, 8R...) and easily get 16 levels per high or low resistor attached. 5% tolerant resistors would be fine, too.
    Yes. This circuitry would only be required on the top pin (if it is complex) which would be used as a configuration pin. And it can still be used as an output later. 5% tolerance (although 1% are pretty much the norm) and yes, would have to allow for 20% process variation. This is an extremely simple mechanism to select boot options. In a proto board, 3 machine pin sockets would allow various resistors to be plugged in.
    *
    Have you thought about the nr option writing to a register/cog location. Further thoughts, $1FF might be the easiest as a set of 9 'OR' gates on the write address or'd with the nr bit. An exception would be the read/write hub instructions.
    ___________________________________
    Links to other interesting threads:
    * Home of the MultiBladeProps: TriBlade,*RamBlade,*SixBlade, website
    * Single Board Computer:*3 Propeller ICs*and a*TriBladeProp board (ZiCog Z80 Emulator)
    * Prop Tools under Development or Completed (Index)

    * Emulators: CPUs Z80 etc; Micros Altair etc;* Terminals*VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
    * Search the Propeller forums*(uses advanced Google search)
    My cruising website is: *www.bluemagic.biz** MultiBladeProp is: www.bluemagic.biz/cluso.htm
    =====================END of #404623======================

    ====================START of #404670=====================
    Why because I only have room for hdmi header and don't own a analog tv. All vga or hdmi/dvi
    ___________________________________
    24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.
    =====================END of #404670======================

    ====================START of #404674=====================
    Fair enough but it was the "licensed for ... encrypted signals." that worries me. I have a gut feeling we should not be supporting that stuff in anyway let alone paying licence fees for it.
    ___________________________________
    For me, the past is not over yet.
    =====================END of #404674======================

    ====================START of #404675=====================
    I would not bother getting a license. The 410 is good enough for me but some customers may want to and the 2 chips are compatible.
    ___________________________________
    24 bit LCD Breakout Board coming soon. $21.99 has backlight driver and touch sensitive decoder.
    =====================END of #404675======================

    ====================START of #404686=====================
    Chip Gracey (Parallax) said...

    3) Windows sucks too.

    Please consider Unix(OS X)/Linux as the cross development platform of choice.

    We'll probably first support Windows, because we don't know any better, but anything else could follow.

    Chip, if you really want to break away from Windows you just have to do it. Stop using the excuse of "because we don't know any better." Parallax is a collection of very smart people who do know better. Start infesting the office with a few boxes running the other operating systems and let the process begin organically.

    I'd suggest doing exactly what BradC is doing by decoupling the IDE, compiler, and loader. If you can only make the IDE on Windows at first then so be it. But if there's a Parallax-sanctioned command-line compiler and loader available for the Prop II on OS X and Linux from day one, it will make things a lot easier for your ever-growing corps of non-Windows users. We can implement the IDE on our platforms.

    -Steve

    This thread is exploding in a half-dozen different directions at once and I can't keep up so please forgive me if this post is redundant.
    ___________________________________
    OS-X: because making Unix user-friendly was easier than debugging Windows

    links:
    My band's website
    Our album on the iTunes Music Store
    Post Edited (SSteve) : 11/27/2009 5:03:08 PM GMT
    =====================END of #404686======================

    ====================START of #404716=====================
    Steve,

    With the Propeller I many made that suggestion, but did not agree Parallax. Then, as they gave some information and was achieved through reverse engineering to make several compilers and emulators.

    Lost Parallax? On the contrary, won more users.

    What I think they should do with the next version is to give all the specifications, in order to create all kinds of tools.

    All businesses are opening up their data, because the time to pay $ 1000.00 by a compiler or just use Windows has passed.

    Sure, they can continue with its model because it is better for them to support and write the documentation, but it is important to give information to create other tools.
    =====================END of #404716======================

    ====================START of #404785=====================
    SSteve said...

    I'd suggest doing exactly what BradC is doing by decoupling the IDE, compiler, and loader. If you can only make the IDE on Windows at first then so be it. But if there's a Parallax-sanctioned command-line compiler and loader available for the Prop II on OS X and Linux from day one, it will make things a lot easier for your ever-growing corps of non-Windows users. We can implement the IDE on our platforms.

    bstc was spawned from the interpreter source being posted. I figured if I had that and knew precisely what it was doing with the bytecodes I could write a compiler to compile them. That, and I really don't like windows. I did originally ask for some information to try and enhance WINE to run the propeller tool.

    It is a bit of a shame that nobody outside of this forum knows you can develop for the propeller outside of a windows environment though.

    I don't particularly agree that the IDE, compiler and loader are decoupled though. The IDE has some very, very deep hooks into the compiler to allow access to the symbol table so that when you click on a symbol in the editor you get some information about it down the bottom (plus a few other funky background bits). As I had no experience previously providing cross platform tools, I wrote the loader first as a test, then the compiler and then the IDE followed. They are still published as separate tools as I find it useful to have command line tools, but in the IDE they are as tightly coupled as you could get. There is no way to separate out the compiler and substitute it for example.
    ___________________________________
    If you always do what you always did, you always get what you always got.
    =====================END of #404785======================

    ====================START of #404812=====================
    I'm not going to get started on this one, but really, why on earth would Parallax switch to making compilers for OS's that are simply a geek fad that will be soon outdated and then to keep up with technology will have to get as stuffed up as Windows? It is OK to have both compilers, but why switch entirely? If you switched OS's on compilers, then me allong with several others would have to backup all our data and change Operating Systems on our programming computers. I vote to stick with windows but to also put up 3rd party Linux and Mac compilers on your download page listed as 3rd party. This way compilers like Brad's could be used by non forum users/viewers too.
    Don't let this thread turn into an OS battle, though.
    ___________________________________
    Computers are microcontrolled.
    Robots are microcontrolled.
    I am microcontrolled.
    *
    But you*can*call me micro.
    *
    Want to*experiment with the SX or just put together a cool project?
    SX Spinning light display*
    Want cheap wholesale electronic parts?
    Transistor parts wholesale
    =====================END of #404812======================

    ====================START of #404814=====================
    dMajo said...
    BTW: @Chip, how is the instruction fetching of the new PropII made? It will be still necessary to interpose a line between the modifier and the modified code lines?
    Chip Gracey said...
    Yes, when you modify an instruction ahead, you must execute one in the middle ...
    Thank goodness this "feature" will propagate to the P2. It's what makes coroutine implementation drop-dead simple! smile.gif

    -Phil
    =====================END of #404814======================

    ====================START of #404829=====================
    Phil Pilgrim (PhiPi) said...
    dMajo said...
    BTW: @Chip, how is the instruction fetching of the new PropII made? It will be still necessary to interpose a line between the modifier and the modified code lines?
    Chip Gracey said...
    Yes, when you modify an instruction ahead, you must execute one in the middle ...
    Thank goodness this "feature" will propagate to the P2. It's what makes coroutine implementation drop-dead simple! smile.gif

    -Phil
    *
    @PhiPi: could you explaint better? I don't get the meaning of your words. I tought that if you modify the next following line and are able to execute it immediately is better. Than if you need you can still put some line(s) between. One thing is you can do, other is you must do. What the benefit of "must" in this case?
    ___________________________________
    * Propeller Object Exchange (last Publications / Updates);** Vaati's custom search
    =====================END of #404829======================

    ====================START of #404836=====================
    > I'm not going to get started on this one, but really, why on earth would Parallax switch to making compilers for OS's that are
    > simply a geek fad that will be soon outdated and then to keep up with technology will have to get as stuffed up as Windows?

    If the compiler is written in C or C++, it could be recompiled (the compiler) on almost any platform. Then you need a loader that is platform-dependant but only in the part where you open and close and write to the comm-port. The IDE needs to hook to the two programs. IDEs that run on different platforms are available, for free. ImageCraft's ICCProp almost does it that way. And a lot of other compiler do work that way. IDE and compiler are completely different things.For bells and whistles and better integration, the IDE could read information (variable size, data size, code size etc.) from a map file.


    Nick
    ___________________________________
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
    =====================END of #404836======================

    ====================START of #404840=====================
    Nick Mueller said...
    > I'm not going to get started on this one, but really, why on earth would Parallax switch to making compilers for OS's that are
    > simply a geek fad that will be soon outdated and then to keep up with technology will have to get as stuffed up as Windows?

    If the compiler is written in C or C++, it could be recompiled (the compiler) on almost any platform. Then you need a loader that is platform-dependant but only in the part where you open and close and write to the comm-port. The IDE needs to hook to the two programs. IDEs that run on different platforms are available, for free. ImageCraft's ICCProp almost does it that way. And a lot of other compiler do work that way. IDE and compiler are completely different things.For bells and whistles and better integration, the IDE could read information (variable size, data size, code size etc.) from a map file.


    Nick
    The IDE can also interact with the compiler and the loader if these are made as libraries (DLL) the same as if they were built-in (they can share variables, classes ...). Moreover as DLLs they can be used by other apps (IDEs)

    ___________________________________
    * Propeller Object Exchange (last Publications / Updates);** Vaati's custom search
    =====================END of #404840======================

    ====================START of #404841=====================
    microcontrolled: When you say "OS's that are simply a geek fad" I presume you are referring to Apple's OS X, Linux and such. I have to say that "FAD" is a rather strange way to describe systems that can trace their linage back to 1969 en.wikipedia.org/wiki/Unix.
    Seen it that light it looks like Windows is the "FAD" albeit not a geek one.

    Nobody is suggesting creating tools that don't work on Windows. There are plenty of ways to create applications that run multiple platforms nowadays. Even if you have to do it in Java or C# (Gak and gak). Just means having to avoid using features that are unique to a single system.

    Our favourite example around here is the BST tool. Runs everywhere important.

    It's about time the world started to think seriously about weaning itself of off it's dependence on a single company for it's computing infrastructure. I find it a bizarre and unhealthy situation.
    ___________________________________
    For me, the past is not over yet.
    =====================END of #404841======================
Sign In or Register to comment.