elctronics questions on new project
cvt
Posts: 6
just as an intro, I'm pretty fluent in basic, and not real good at electronics.
But I am in a rushed to be built project, and need some help, as I have ran out of pins.
My pins are currently assigned.
0 - sensitivity/more (INPUT)
1 - sensitivity/less (INPUT)
2 - solenoid/lower (OUTPUT)
3 - solenoid/lift (OUTPUT)
4 - adc1/cs
5 - adc1/clk
6 - adc1/data
7 - lcd/serial (OUTPUT)
8 - autocontrol/off (INPUT)
9 - autocontrol/on (INPUT)
10 - adc2/cs
11 - adc2/clk
12 - adc2/data
13 - adc3/cs
14 - adc3/clk
15 -adc3/data
now, my issue is with the operation of the automatic ON/OFF
I could use it as a momentary switch to turn it on, momentary off
but when one part of the machine is operated, if the button is tapped, and not held, it must deactivate the auto.
if I run it with the autocontrol/off line, one in every 4 or 5 times I tapped it, it didn;t register due to the amount of code/datain/dataout in one loop.
I can't put a D Flip-Flop in there, because I'd need an extra line to manipulate the CLK
My question is, as all 3 ADC's are identical, could I make the CLK line on the common across all 3, freeing me up 1 line, is it also possible to do this with the cs line.
thats all I have for reading the adc's, it just goes from one to the next adc in a row.
with the shift high, shift low, between each read would be too fast for the ADC's to reset, or would it, this is where I am currently stuck.
I'm using a BS2e
my ADC is NatSemi ADC0831
But I am in a rushed to be built project, and need some help, as I have ran out of pins.
My pins are currently assigned.
0 - sensitivity/more (INPUT)
1 - sensitivity/less (INPUT)
2 - solenoid/lower (OUTPUT)
3 - solenoid/lift (OUTPUT)
4 - adc1/cs
5 - adc1/clk
6 - adc1/data
7 - lcd/serial (OUTPUT)
8 - autocontrol/off (INPUT)
9 - autocontrol/on (INPUT)
10 - adc2/cs
11 - adc2/clk
12 - adc2/data
13 - adc3/cs
14 - adc3/clk
15 -adc3/data
now, my issue is with the operation of the automatic ON/OFF
I could use it as a momentary switch to turn it on, momentary off
but when one part of the machine is operated, if the button is tapped, and not held, it must deactivate the auto.
if I run it with the autocontrol/off line, one in every 4 or 5 times I tapped it, it didn;t register due to the amount of code/datain/dataout in one loop.
I can't put a D Flip-Flop in there, because I'd need an extra line to manipulate the CLK
My question is, as all 3 ADC's are identical, could I make the CLK line on the common across all 3, freeing me up 1 line, is it also possible to do this with the cs line.
Read_ADC1: LOW adc1_cs SHIFTIN adc1_dio, adc1_clk, MSBPOST, [noparse][[/noparse]adc1\8] <---- yes, 7 bit resolution intentionally HIGH adc1_cs RETURN
thats all I have for reading the adc's, it just goes from one to the next adc in a row.
with the shift high, shift low, between each read would be too fast for the ADC's to reset, or would it, this is where I am currently stuck.
I'm using a BS2e
my ADC is NatSemi ADC0831
Comments
my button code, incase anyone is curious is
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don Kinzer
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Very helpful!