Shop OBEX P1 Docs P2 Docs Learn Events
"Simultaneous" I/O — Parallax Forums

"Simultaneous" I/O

Jim BockJim Bock Posts: 8
edited 2005-08-05 21:36 in BASIC Stamp
I have a TLC2543 11-channel A/D converter that I'd like to use with a BS2, but the TLC inputs instructions and outputs data on the same clock tick. Is there any way to get the BS2 to accommodate this using PBASIC?

Comments

  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-08-04 18:12
    emesys.com/OL2tlc2543.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-08-04 18:30
    Darn, Tracy, you're good.
  • Jim BockJim Bock Posts: 8
    edited 2005-08-04 21:49
    Thanks, Tracy. Of course! They don't need to be simultaneous!! Duh
  • nick bernardnick bernard Posts: 329
    edited 2005-08-05 21:36
    some time ago i wrote a routine that shifted in and out on the same clock at the same time. it was slow compared to shiftin and shiftout commands. its probably a better solution for the sx.

    off the top of my head...

    for idx = 0 to 7
    out_pin = out_byte.bit0
    out_byte = ou_bytet/2
    in_byte = in_byte*2
    in_byte.bit0 = in_pin
    high clock
    low clock
    next

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If I lived back in the wild west days, instead of carrying a six-gun in my holster, I'd carry a soldering iron. That way, if some smart-aleck cowboy said something like "Hey, look. He's carrying a soldering iron!" and started laughing, and everybody else started laughing, I could just say, "That's right, it's a soldering iron. The soldering iron of justice." Then everybody would get real quiet and ashamed, because they had made fun of the soldering iron of justice, and I could probably hit them up for a free drink. - Jack Handy
Sign In or Register to comment.