dwayne
When you're using LOW or HIGH it make pin automatically as output. BUT i agree TRIS setting is always a safe practice.
robert
what about if you change your variable DATAI as followCode:DATAI VAR BIT[16] . . . . SHIFTIN SHFTIQ7,_ ' Shift in bits from registers SHFTICP,_ LSBPRE,_ [DATAI\16]
DATAI VAR WORD 'it's now 16bits
and then change
BUT using your code without changing VAR definition (was DATAI VAR BIT[16] )Code:FOR LOOP = 0 TO 15 ' Check bits for a high bit GOSUB BITNUM IF DATAI.0(LOOP) = 1 THEN GOSUB HIFND ENDIF NEXT LOOP
and also i see some RESUME that must be change to RETURN. RESUME are use for interrupts.Code:FOR LOOP = 0 TO 15 ' Check bits for a high bit GOSUB BITNUM IF DATAI [LOOP] = 1 THEN GOSUB HIFND ENDIF NEXT LOOP
for now, it's the only thing i can see. I didn't check the Datasheet for the shift register as now. Wait for your relply on that.
A la prochaine




Bookmarks