{ 20081202 Propeller Cluster Driver Phase 0 : 1 prop, 8 cogs Phase 1 : 2 props, 16 cogs Phase 2 : 4 props, 32 cogs Phase 3 : 8 props, 64 cogs Phase 4 : 16 props, 2 per board, 128 cogs Phase 5 : 32 props, 4 per board, 256 cogs Michael O'Brien michael@fmichael.com automation: propellent /port COM3 _propDisp4x8_1inch_blue_7seg.spin 20081202 : Start development for a single propeller with cog->cog interaction Investigate whether to dedicate 4 cogs as comms and 4 as cells 20081205 : programmed 2 propellers to run of a single EEPROM started with tutorial by Christian de Godzinsky at http://forums.parallax.com/forums/attach.aspx?a=25638 http://forums.parallax.com/forums/default.aspx?f=25&m=301878 : succeeded in running 2 chips off a single eeprom using the above tutorial but using pin 1 to toggle reset - as the 10kohm pulldown resistor on p0 did not bring the voltage past 2 volts I used two separate crystals for now until I construct an external clock circuit } { We need to load the same processing object on all 4 cell cogs and load the same comm object on all 4 comm cogs } VAR byte tPin long pulse long maxPulse DAT cog long 0 'cog flag/id CON ' non-spin stamp _CLKMODE = XTAL1 + PLL16X ' clock speed to high = 12Mhz _XINFREQ = 5_000_000 ' _XINFREQ = 8_000_000 ' _CLKMODE = XTAL1 + PLL8X ' clock speed to high = 12Mhz ' _XINFREQ = 10_000_000 PUB Main ' prepare pins for output repeat tPin from 0 to 28 dira[tPin] := 1 'outa[tPin] := 1 ' set p0 as an output immediately so we can cascade programming other propellers outa[1] := 1 waitcnt(clkfreq/2 + cnt) outa[1] := 0 waitcnt(clkfreq/2 + cnt) outa[1] := 1 ' cycle the leds with small on-time 1/10th square wave duty cycle maxPulse := 150000 repeat repeat pulse from 100 to 5000 step 100 repeat 40 waitcnt(clkfreq/pulse + cnt) repeat tPin from 16 to 23 outa[tPin] := 1 waitcnt(clkfreq/maxPulse + cnt) repeat tPin from 16 to 23 outa[tPin] := 0