74HC/HCT166 shift register datasheet, error...?


Results 1 to 16 of 16

Threaded View

  1. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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

    Code:
    DATAI VAR BIT[16]
    
    .
    .
    .
    .
    SHIFTIN SHFTIQ7,_ ' Shift in bits from registers
            SHFTICP,_
            LSBPRE,_
           [DATAI\16]
    what about if you change your variable DATAI as follow

    DATAI VAR WORD 'it's now 16bits

    and then change
    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
    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 [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.

    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
    Last edited by mister_e; - 28th January 2005 at 23:55.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 21:31
  2. PIC16F877A pwm use for IR transmission
    By mcbeasleyjr in forum General
    Replies: 0
    Last Post: - 11th July 2009, 19:51
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  4. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 05:58
  5. Replacing shift register with PIC
    By TonyA in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 7th April 2008, 19:31

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts