Shop OBEX P1 Docs P2 Docs Learn Events
Stamp code for TPIC6595N? — Parallax Forums

Stamp code for TPIC6595N?

ArchiverArchiver Posts: 46,084
edited 2000-08-22 07:20 in General Discussion
Hello all,
I'm working on controlling some very large (5") seven segment
displays with a stamp and the TI TPIC6595N 8 bit shift register. If anyone
has interfaced to this chip it will save me from reinventing the wheel...

Kind regards to all, Duncan

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-08-21 15:07
    At 12:59 AM 8/21/00 -0400, you wrote:
    >
    >Hello all,
    > I'm working on controlling some very large (5") seven segment
    >displays with a stamp and the TI TPIC6595N 8 bit shift register. If anyone
    >has interfaced to this chip it will save me from reinventing the wheel...
    >
    >Kind regards to all, Duncan

    Duncan:

    I'm using eight of these chips in a 2 x 4 array to latch relays on/off in
    a X10 system thanks to help from others on this list a year ago.

    Low 8 'BS2-13 serial data to TPIC6595-3 SER IN
    Low 9 ' -14 shift reg clock " -13 SRCK
    High 10 ' -15 Clear " -8 SRCLR
    Low 11 ' -16 register clock " -12 RCK
    High 12 ' -17 ON strobe " -9 G
    High 13 ' -18 OFF strobe " -9 G

    ShiftReg:
    'Shift the house code LSB and sum with key code to make a 5 bit address
    OutNmbr = (16*(hCode & 1))+nCode
    debug "Output# ", dec (OutNmbr+1)

    PulsOut 10, 7 'SRCLR=Lo (shift reg clear)
    Out8=1 'Inject the lone bit
    PulsOut 9,7 'SRCK clock it in
    Out8=0
    for i=0 to 31 'step it on thru
    if (i=OutNmbr) then ShiftReg1
    PulsOut 9,7 'SRCK
    next
    ShiftReg1: 'lone bit is in position-output it
    PulsOut 11,7 '14 usec clock the output register
    return

    OutputON:
    Out12=0 'enable the ON transistor
    pause RlyPulsTim
    Out12=1
    debug " ON",cr
    return

    OutputOFF:
    Out13=0 'enable the OFF transistor
    pause RlyPulsTim
    Out13=1
    debug " OFF",cr
    return



    Wayne Roderick P.E. (EE, ret)
    CEO, Teton Short Line, (NMRA life-1721)
    e-mail tetonsl@i... Pocatello Idaho, USA
    http://www.ida.net/users/tetonsl/railroad
    Note new URL- /biz/ becomes /users/
  • ArchiverArchiver Posts: 46,084
    edited 2000-08-22 04:34
    At 08:07 AM 8/21/00 -0600, Wayne wrote:

    >
    >I'm using eight of these chips in a 2 x 4 array to latch relays on/off in
    >a X10 system thanks to help from others on this list a year ago.

    [noparse][[/noparse]code snipped for brevity]

    Thanks for the response Wayne, I had actually got it working on my own last
    night but it's *always* great to see another approach. I did it a bit
    differently - instead of bit banging it I used Shiftout and just tied SRCK
    and RCK together. Also, I'm not bothering to clear the shift register each
    time, new data seems to clock in just fine with CLR held high.

    Thanks again, Duncan
  • ArchiverArchiver Posts: 46,084
    edited 2000-08-22 07:20
    At 11:34 PM 8/21/00 -0400, Duncan wrote:
    >Thanks for the response Wayne, I had actually got it working on my own last
    >night but it's *always* great to see another approach. I did it a bit
    >differently - instead of bit banging it I used Shiftout and just tied SRCK
    >and RCK together. Also, I'm not bothering to clear the shift register each
    >time, new data seems to clock in just fine with CLR held high.

    Duncan:

    A couple hours before I read your response, I was addressing a BS2 with
    the SHIFTOUT- Yes- it is the better way to go. I'm spitting out 28 commands
    to LEDs and switch motors for model railroading use via 3 ports using a
    quad string of ancient 74164 that were lounging in the junk box. Works great.
    Will be using the SHIFTIN to read 20 push buttons via 74165s- Yeh- junk
    box:-)
    Beats the heck out of a big handfull of logic on my new staging yard.




    Wayne Roderick P.E. (EE, ret)
    CEO, Teton Short Line, (NMRA life-1721)
    e-mail tetonsl@i... Pocatello Idaho, USA
    http://www.ida.net/users/tetonsl/railroad
    Note new URL- /biz/ becomes /users/
Sign In or Register to comment.