|
I switched from BS2p40 to BasicAtom 40 And try to convert and extend my Program When I use : SHIFTOUT DataPin,ClockPin,msbpre,[schalten216] Only with one variable “schalten2†It works fin. But when I use: SHIFTOUT DataPin,ClockPin,msbpre,[schalten116,schalten216] two variables my connected UCN 5833 (Allegro 32-Bit serial-Input Driver) switches always on, the Out1. I am not switching the bit 0.. I used the same shiftout command on the BasicStamp40 and as far as I understand the manual, it works similar on the Atom40, On the debug the variable has the correct value on both variables (schalten1 and schalten2) but the UCN 5833 switches on the out1. It looks like as if the Atom gifs out one more data and clock pulse then the Stamp.
Or did I misunderstand something ??
Heinz PS Here my code with the two variables (schalten1 and schalten2)
schalten1 VAR Word...............' Bit 0-15 for shift schalten2 VAR Word............... 'Bit 16-32 for shift
schalten2 = 0 schalten1 = 0 gosub UCN
start: .....schalten2.bit13 = 1 .....schalten1 = %1111111111111111 ..gosub UCN .....Pause 500 .....schalten1 = 0 .....schalten2 = 0 ..gosub UCN .....Pause 500 .........goto start
...UCN: ..... SHIFTOUT DataPin,ClockPin,msbpre,[schalten116,schalten216] ..........' Daten zum UCN5830 .....PULSOUT strobePin,1...........................................................................' Transfer to outputs. ..........RETURN
|