Yes, specifically bit 7..0 of the instruction/register (which happens to hold the source parameter). For your small fragment it's probably better to use separate register variables. It's not that you need the space.
Conveniently everything you have in a cog is registers ...
I did have a nice long explanation on what my other cogs were doing. When i went to post it, I was redirected to sign in again, Fail. The page never loaded and I just lost about 30mins of typing. Here is the short version.
(1) the cog I'm currently working on.
(2) data input cog, 8 inputs, via shift reg and optoisolators. updates every 3.5uS (PASM)
(3) Data Output cog, 8 outputs, via shift reg and relays. updates every 0.3mS (SPIN)
(4) Data logging Cog,w/ serial input(5), SD Card driver(6). receives serial data every 50mS, currently using up ~25mS processing data and writing it to the sd card, waiting/wasting the rest.
(7) Quadrature Encoder driver, reads data byte from Data input cog(Spin), encoder channels A and B limited to 2.75Khz each(Because of SPIN).
(8) Data processing, used for some math and standard deviation calculations, responsible for setting alarm conditions and also in charge of a LCD display.
At least for me there is a lot going on there, once i get the system running as a whole I'll be a little more willing to consolidate cogs.
I'm currently stuck again though, it appears the Propeller Tool doesn't like a few of my jmp addresses. It States there undefined when they are, I'm sure that there is something I'm missing. Maybe you or Marko, may be willing to lend a hand.
Problem is that there is a global label in the way (_two). You try to jump to the local label :testAlarm which is behind said global label and therefore not visible. Simply change _two to :two. It's a scope thing.
Comments
Conveniently everything you have in a cog is registers ...
Thanks Again.
What do you have in the other cogs? Maybe they could be combined simply???
I did have a nice long explanation on what my other cogs were doing. When i went to post it, I was redirected to sign in again, Fail. The page never loaded and I just lost about 30mins of typing. Here is the short version.
(1) the cog I'm currently working on.
(2) data input cog, 8 inputs, via shift reg and optoisolators. updates every 3.5uS (PASM)
(3) Data Output cog, 8 outputs, via shift reg and relays. updates every 0.3mS (SPIN)
(4) Data logging Cog,w/ serial input(5), SD Card driver(6). receives serial data every 50mS, currently using up ~25mS processing data and writing it to the sd card, waiting/wasting the rest.
(7) Quadrature Encoder driver, reads data byte from Data input cog(Spin), encoder channels A and B limited to 2.75Khz each(Because of SPIN).
(8) Data processing, used for some math and standard deviation calculations, responsible for setting alarm conditions and also in charge of a LCD display.
At least for me there is a lot going on there, once i get the system running as a whole I'll be a little more willing to consolidate cogs.
I'm currently stuck again though, it appears the Propeller Tool doesn't like a few of my jmp addresses. It States there undefined when they are, I'm sure that there is something I'm missing. Maybe you or Marko, may be willing to lend a hand.
Here's my current code:
Man your on your guns. Thanks.