From: email@example.com (Peet Grobler)
Subject: Re: Alternative design to this?
Date: Mon, 23 Sep 2002 08:06:06 GMT
References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com>
X-Newsreader: Forte Free Agent 1.21/32.243
On Fri, 20 Sep 2002 09:39:32 +0100, Tony Williams
>In article <firstname.lastname@example.org>,
> Peet Grobler wrote:
>> What does shift registers do? Maybe I should go find a datasheet and
>> have myself a look.
> Peet, I have been investigating a remote control
> system recently. It does (isolated) remote DAC/ADC,
> and digital i/o, all based on a very simple serial
> shift register.
> Opto LED --+
> supply \|/ _________ +----Remote target
> from host +--| Opto | \|/ supply
> DATA-------->-|LED Trans|--+
> |_________| |
> | _________ | ________
> +--| Opto | +--| S/R |
> CLOCK------->-|LED Trans|-----| CD4094 |->More CD4094?
> |_________| +--|________|
> | _________ | ||||||||
> +--| Opto | | 8x digital
> STROBE------>-|LED Trans|--+ outputs
> |_________| |
> _________ | __\|/______________
> | Opto |--+ | |
> READ--------<-|Trans LED|-<---|CMOS Multiplexer(s)|
> /|\ |_________| |___________________|
> | |||||||||||||||||||
> Connections Your remote switches
> to host.
> Every remote target has those 4x Optos, a 4094 shift
> register, and an "1 of N" CMOS multiplexer (4051 or
> whatever). The remote target also has its own supply.
> A single 4094 will handle all the digital i/o needed,
> but remote ADC/DAC will require at least one other
> 4094 cascaded onto the first (and DACs + comparators).
> The host system sends synchronous DATA/CLOCK signals
> to shift 8-bits of data into the 4094, and then a
> single STROBE pulse latches the data onto the 4094's
> 8 output pins. In the simple sketch above this would
> set the CMOS muxer to select the required switch to
> look at, whose state appears on the READ line.
> I'm generating all the control signals in software,
> in the controlling host, at about 20KHz. It takes
> about 1mS to load 16-bits into a pair of 4094's
> and read the result. A 12-bit DAC-load takes about
> 5mS and a 12-bit succesive approximation ADC-sequence
> takes 85mS.
> Over long distances you may wish to clock slower.
> After all, switches might takes 10's of mS to
> reliably change state anyway.
>> My application does not rqequire high speed as such, problem is,
>> I'll have to poll all the inputs all the time.
> Use your AVR as the central host, spinning in a loop,
> polling all remote target locations and logging the
> results into registers. Send the data from those
> registers to the PC, over a local RS232 line.
> To drive several remote targets, parallel DATA, CLOCK,
> and READ, and give each target its own STROBE. eg, an
> 8-bit AVR port could control 5 remote targets.
Yes... This sounds interesting. I'll give it a try and see if I can