Finally get to respond...!!
Hi all,
Sorry it has taken me so long to respond. I tried many times this morning, but was pulled away..anyways...to clarify some things...
I made a mistake on the timer, it IS a 0.01 time base, and a 1 preset, so it is a 10 mS timer, NOT a 1mS timer..I agree, that would be fast!!! I must have interpurted it wrong yesterday.
Eric and Panic Mode:
Yes, I had the binary representaion the B3:10 BACKWARDS!!! I just wasnt thinking yesterday..!!
It should have read...
Word B3:10 |<--etc | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Bits |
------------------------------------------
Shift 1: 0 0 0 0 0 0 1
Shift 2: 0 0 0 0 0 1 0
Shift 3: 0 0 0 0 1 0 0
Shift 4: 0 0 0 1 0 0 0
Shift 5: 0 0 1 0 0 0 0
Shift 6: 0 0 0 0 0 0 1
Shift 7: 0 0 0 0 0 1 0
Shift 8: 0 0 0 0 1 0 0
Shift 9: 0 0 0 1 0 0 0
Shift 10: 0 0 1 0 0 0 0
BITS 6-15 are "Dont Care's"
Panic Mode:
I agree with you on testing out instructions, I had tried testing BSL out before posted, but was still having some trouble, so I posted a question!!!
As for what my logic has turned out like, here it is....
Initiate word with bits to be to be shifted on first scan....
S1:15 ----MOV----------------------
-----| |-----------------------| Move |
1 | |
|Source A : 1 |
|Destination : B3:10 |
-----------------------------
Bit Shift Timer....
T65:0 ----TON----------------------
-----|/|-----------------------| Timer ON Delay |-(EN)
DN | |
|Timer : T65:0 |-(DN)
|Time Base : 0.01 |
|Preset : 50 |
|Accum : 0 |
-----------------------------
Shift Bits Left.....
T4:65 ----BSL----------------------
-----| |-----------------------| Bit Shift Left |-(EN)
DN | |
|File : #B3:10 |-(DN)
|Control : R6:0 |
|Bit Address: B3:11/0 |
|Length: 1 |
-----------------------------
Reset(Re-Seed) Bit Shift Left Instruction ....
B3:10 ----MOV----------------------
-----| |-----------------------| Move |
4 | |
|Source A : 1 |
|Destination : B3:10 |
-----------------------------
This seems to do exactly what I want..so if it works, then I'll try it..
Alternativly, this works too, as posted by 93lt1
Initiate word with bits to be to be shifted on first scan....
S1:15 ----MOV----------------------
-----| |-----------------------| Move |
1 | |
|Source A : 1 |
|Destination : B3:10 |
-----------------------------
Bit Shift Timer....
T65:0 ----TON----------------------
-----|/|-----------------------| Timer ON Delay |-(EN)
DN | |
|Timer : T65:0 |-(DN)
|Time Base : 0.01 |
|Preset : 50 |
|Accum : 0 |
-----------------------------
Shift Bits Left.....
T4:65 ----BSL----------------------
-----| |-----------------------| Bit Shift Left |-(EN)
DN | |
|File : #B3:10 |-(DN)
|Control : R6:0 |
|Bit Address: B3:10/4 |
|Length: 1 |
-----------------------------
Again, thanks for all your help. I appreciate ALL your tips, comments.
Andrew Evenson