The PBPbook says I can use a simple number for CLOCKPIN: SHIFTOUT,datapin,2,5,[var]...... DOESN'T GO. How is the beasty supposed to know that 2 means portc.2....The thing is I gotta use 0 - 7 as the clockpin and using a variable does not work! (I am feeding 8 shift registers sequentially)
I spoke to the bloke that has the old thing I did, but that is useless to me without a DE COMPILER (is there such a thing) to get it back to a language I can understand.
I have tried port indexing, using examples found in here also, but nothing seems to work. EG SHIFTOUT DAT,2,5,[S1] DAT is the DATAPIN which is common to all the S/Rs S1 is the data variable and 2 is the clockpin (goes to the second of 8 S/R's). This don't go.
SHIFTOUT DAT,portc.2,5,[S1] DOES go
SHIFTOUT DAT,sect,5,[S1] DON'T go (sect is the index var which is pointing at the relevant S/R.)
SHIFTOUT DAT,portc.0[sect],5,[S1] Also DON't go.
The overall program is running, as I can see the DATAPIN blinking away merrily on my logic probe, it's just the CLOCKPIN part that has me stymied.
If I do SHIFTOUT DAT,portc.2,5,[S1] and watch the clock on the S/R and the outputs from the S/R all is fine.
The thing I did a while ago works great (as a prototype) but I'm damned if I can remember what I did with this bit of code. IT BLOODY WORKS I TELL YA!!!!!
This current model is simply a smaller device with EXACTLY same circuit, so???????????????????????????????????????????????? ??????
Well, I s'pose something's gotta keep me up at night?
I think I'll try a new chip, but seeing that it does work sometimes, I'm not too excited about that fixing it.
Bookmarks