driving one prop chip using another prop
mikediv
Posts: 825
Hi guys I was trying to find details on this .I was trying to put together a multi prop design just 2 props I would use a 5 meg crystal for the main prop but I wanted to drive the second prop clock from the first using the prop chip itself ..
I initially just tried this to see how fast the prop would run with no delays my prop proto board has 5 meg crystal I ran this program
Pub Clock
repeat
dira [noparse][[/noparse] 0 ] : = 1
outa [noparse][[/noparse] 0 ] : = 1
outa [noparse][[/noparse] 0 ] : = 0
actually pullmoll helped me with this , this program works and should toggle the pin as fast as the prop can , I do not have a freq counter but using my prop scope it showed this running at only 2.8K !!! I know this can not be right can it?
Can anyone show me a simple way to calculate how fast my square wave would run using the prop this program and some delays I want 5 meg to drive the second prop chip instead of using crystal is this even possible
thanks guys
I initially just tried this to see how fast the prop would run with no delays my prop proto board has 5 meg crystal I ran this program
Pub Clock
repeat
dira [noparse][[/noparse] 0 ] : = 1
outa [noparse][[/noparse] 0 ] : = 1
outa [noparse][[/noparse] 0 ] : = 0
actually pullmoll helped me with this , this program works and should toggle the pin as fast as the prop can , I do not have a freq counter but using my prop scope it showed this running at only 2.8K !!! I know this can not be right can it?
Can anyone show me a simple way to calculate how fast my square wave would run using the prop this program and some delays I want 5 meg to drive the second prop chip instead of using crystal is this even possible
thanks guys
Comments
The ~~ thing is just a faster way of saying :=1. The !outa inverts the outa pin in one instruction.
Now that say, if by 2.8K you mean 2.8 kilohertz then something is wrong. Are you sure you have the directives in the top object to set the clkmode? Because it sounds like you might be running rcfast or even rcslow instead of pll16x.
Even in·PASM you could·only get to 10MHz with a 2 instruction loop (xor and jmp) so kuroneko's method is the·best way to go.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Post Edited (Cluso99) : 4/20/2010 2:44:48 AM GMT
kuroneko thank you for including the code sample
So you need no counter and no I/O pin to drive the second Propeller.
I've done this with a Prop and a PIC, but not tried it with 2 Propellers.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
The jitters are probably phase noise on the first Prop's output, these will be x16'd too
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Post Edited (Toby Seckshund) : 4/21/2010 7:37:23 PM GMT
kuroneko I hate to be thick but here is what I tried with your code
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
clockpin = 0
PUB TEST
dira | = | < clockPin
ctra : = %0_00100_000 << 23 | clockPin
frqa : = %0001_00000 << 23
repeat
Please assume I have the proper indentation it just looks bad when I post it but the program will compile and run the way it is with no errors it just does not output anything
Edit: you can actually get away with "| =" but it just looks wrong [noparse]:)[/noparse] OTOH, ":=" must not contain a space.
Post Edited (kuroneko) : 4/22/2010 1:34:13 AM GMT
Here is a schematic, but you got it right. Just left XO of the slave Prop open.
The schematic also shows what I expect how it looks inside the Prop.
Toby Seckshund made a valid point, either the 2 Props must be reseted / started at the same time, or the
first Prop must reset the second.
But this is the same if you drive the second Prop by a pin and a counter from the first Prop. Only 2 crystals
or an independent Clock source will help if the second Prop must run while the first is stopped.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz