Author Topic: A shift register IC with individually settable tristate outputs ?  (Read 8818 times)

0 Members and 1 Guest are viewing this topic.

Offline PsiTopic starter

  • Super Contributor
  • ***
  • Posts: 9951
  • Country: nz
As the topic says, i'm wondering if such a think exists in a discrete IC
A shift register where each output can be set 0,1 or tristate by the input data stream.

I need to clock the serial out at about 1mhz with a 48mhz MCU driving it so being able to
"load it with data all at once then let it run"
is a big plus to take load off the MCU.

Obviously it would need two input bits for each output (to handle the 3 possible states)
« Last Edit: April 14, 2014, 11:55:43 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: A shift register IC with individually settable tristate outputs ?
« Reply #1 on: April 14, 2014, 11:57:00 am »
CPLD and program it yourself? Sounds like a real custom ic to me not something off the shelf.
 

Offline PsiTopic starter

  • Super Contributor
  • ***
  • Posts: 9951
  • Country: nz
Re: A shift register IC with individually settable tristate outputs ?
« Reply #2 on: April 14, 2014, 12:02:24 pm »
yeah, i was afraid of this.

I might try running the two build-in SPI ports of the MCU in parallel and combine the outputs somehow to get H/L/Tristate
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7388
  • Country: nl
  • Current job: ATEX product design
Re: A shift register IC with individually settable tristate outputs ?
« Reply #3 on: April 14, 2014, 12:24:34 pm »
You can daisy chain two shift register, and route the output of one to two 74xx126 or similar IC. Or 4 bit from one register sets the output, 4 sets it tri-state, or any combination...
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: A shift register IC with individually settable tristate outputs ?
« Reply #4 on: April 14, 2014, 03:07:01 pm »
Pca9535 or 9565 should be able to do that.
If you flick a pin to input it becomes hi impedant. If you set it to output one chip is hard pull down , pull up , the other is a true pushpull.
You can blast them at 1MHz i2c

The chip is register based. There is a control register where you can flick a bit to turn off the register autoimcrement. Set the config registers once. Then flick the autoimcrement off and send a packet to the io register. If you dont send a stop you can keep blasting bytes. If you blast at 800kz clock you will get roughly 100k updates per second.

Cpld is your other option.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Online Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: A shift register IC with individually settable tristate outputs ?
« Reply #5 on: April 14, 2014, 07:10:44 pm »
Pca9535 
That one has 400kHz I2C not 1MHz, the other one is unknown  :-//
Personally I don't trust I2C port expanders for blast and forget applications but that might be my bad experiences.
I have had a couple of problems in the past with sporadically stuck I2C busses from expander chips (microchip not NXP BTW) and since then i always read back what I have sent to them in order to be confident and if I am going to use I2C chips in the future I insist that they have a reset input.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: A shift register IC with individually settable tristate outputs ?
« Reply #6 on: April 14, 2014, 08:53:25 pm »
you can run them at 1MHz without problems.
the other type number could be a 9555 .. there is a whole series of em.

i2c is robust if done properly. most software libraries are badly written.  microshit … they have weird behaviour in their registermap. bass-ackwards
i suspect microchips are actually programmed microcontrollers and not hard logic ...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline PsiTopic starter

  • Super Contributor
  • ***
  • Posts: 9951
  • Country: nz
Re: A shift register IC with individually settable tristate outputs ?
« Reply #7 on: April 15, 2014, 09:37:39 am »
Thanks guys.

Sounds like a microcontroller would be ideal for this. You can customize the serial interface any way you like, speed won't be a problem, extremely low cost etc.

Im using a STM32 but i can't see any way to output a tri-state stream of data in hardware without using multiple ports at once plus some external components. As far as i can tell all the built in serial hardware devices can only output data in push/pull or open drain but not all 3 together.
« Last Edit: April 15, 2014, 09:41:32 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: A shift register IC with individually settable tristate outputs ?
« Reply #8 on: April 15, 2014, 09:54:48 am »
i think he means bit banging the output, using both the port output register and the port direction register,
 

Offline PsiTopic starter

  • Super Contributor
  • ***
  • Posts: 9951
  • Country: nz
Re: A shift register IC with individually settable tristate outputs ?
« Reply #9 on: April 15, 2014, 09:58:16 am »
yeah, i dont think the 48mhz STM32F0 has enough power to bitbang at 1mhz without any jitter while processing other interrupts
Preloading the SPI FIFO with 16bit chunks and letting it run should work, but i'd need to use both SPI ports and external logic to get a tristate system.


« Last Edit: April 15, 2014, 10:01:45 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline veryevil

  • Supporter
  • ****
  • Posts: 221
  • Country: gb
Re: A shift register IC with individually settable tristate outputs ?
« Reply #10 on: April 15, 2014, 12:03:47 pm »
You could easily do it with a 2 x non-inverting octal tristate buffer 74xx126 and 2 x 74xx595.

Chain the two shift registers together and have one as the tristate enable lines on the buffers and one as the outputs.

EDIT: NANDBlog got there first
« Last Edit: April 15, 2014, 12:05:19 pm by veryevil »
 

Offline daveatol

  • Regular Contributor
  • *
  • Posts: 136
  • Country: au
Re: A shift register IC with individually settable tristate outputs ?
« Reply #11 on: April 15, 2014, 02:44:23 pm »
A rather cheap and lame method would be to use diodes on the shift register outputs; two outputs, two diodes (one provides pull-down, the other pull-up - or Hi-Z if both reverse-biased). Alternately a single MOSFET between two SR outputs (G & S -- the Drain is the output) can be used for a similar effect.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: A shift register IC with individually settable tristate outputs ?
« Reply #12 on: April 17, 2014, 11:35:12 am »
Quote
I need to clock the serial out at about 1mhz with a 48mhz MCU driving it so being able to
"load it with data all at once then let it run"

One obvious solution would be to use a mcu.

If that doesn't work, use OC/OD or diodes on the output + high value pull-up/down resistors.

If that doesn't work, use two ports / shift registers, one to control the output states ('0' or '1'), and another to control direction via a switch.
================================
https://dannyelectronics.wordpress.com/
 

Offline hooverphonique

  • Contributor
  • Posts: 23
  • Country: dk
Re: A shift register IC with individually settable tristate outputs ?
« Reply #13 on: April 17, 2014, 08:38:09 pm »
is the thing you're looking for an 8 bit serial load, parallel out shift register with individually tristatable outputs?

if so, do you not have the option of selecting a compatible mcu with more pins, so you can use an 8 bit mcu port? or am I misunderstanding something here?
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: A shift register IC with individually settable tristate outputs ?
« Reply #14 on: April 18, 2014, 01:21:26 am »
OK, here's the really dirty way for a quick one-off home project!
Run 'n' buffered shift registers in parallel (not serial), and pick one bit off from each SR.
Then you can twitch the OE pin on each individual SR with a regular port output - to achieve exactly what you want!
Horrible - but in a pinch !
Don't ask a question if you aren't willing to listen to the answer.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: A shift register IC with individually settable tristate outputs ?
« Reply #15 on: April 18, 2014, 01:28:35 am »
Quote
Run 'n' buffered shift registers in parallel (not serial), and pick one bit off from each SR.

Run two shift registers, one controls the data and another controls analog switches.
================================
https://dannyelectronics.wordpress.com/
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: A shift register IC with individually settable tristate outputs ?
« Reply #16 on: April 18, 2014, 05:15:20 am »
Quote
Run 'n' buffered shift registers in parallel (not serial), and pick one bit off from each SR.

Run two shift registers, one controls the data and another controls analog switches.

That is how i do that in an fpga. We have a domain specific serial protocol. Looks like spi but it isnt as the addressfield length can change on the fly.
High priority address is 1 bit. Second priority is 2 bits.

So 1data32, 001data32,010data32,011data32,000<5bit addr><16 bit data>

I blast that using three shifters. One has the bitpatter, the second has the tri pin of the buffer after the first shifter, the third controls the select line.


Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline PsiTopic starter

  • Super Contributor
  • ***
  • Posts: 9951
  • Country: nz
Re: A shift register IC with individually settable tristate outputs ?
« Reply #17 on: April 18, 2014, 11:33:52 am »
Thanks guys

You've all given me some good ideas to pursue.
Greek letter 'Psi' (not Pounds per Square Inch)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf