DE0-nano cannot read multi-sensors in parallel
Started by 2 years ago●4 replies●latest reply 2 years ago●41 viewsHello. I have purchased DE0-nano (Terasic). I plug two sensors into the ADC system, but it needs to change the switch (or pin) in order to read another sensor. Is it possible to read several sensors in parallel? The demo exe can read multi-sensors in parallel without changing the switch (pin), but how to make it works in verilog code? Thank you.
The ADC you have is ADC128S022, 8-Channel, 12-bit A/D Converter, SPI interface.
You drive DIN serially on sclk by value, say 000 for ch0 input. Then ch0 DOUT is output as per ADC data sheet timing diagram.
So though there are 8 input pins but conversion is not parallel for channels 0 to 7, neither for 12 bits data.
You need to reconstruct the 12 bits in parallel per chosen channel.
You can do that from FPGA code.
Thank you for your reply. When I read another sensor, i need to use a toothpick to change the DIP switch (hardware) manually,
Can I read two sensors without changing the DIP switch (hardware) manually? I want to record temperature and humidity on a flying drone together.
Thank you again
Use the pin header 2x13
This provides 8 input pins, one per channel wired directly to ADC input pins.
The DIN value then selects which channel gets converted.
Thank you. But I dont quite understand.
Sensor A.
Vcc VA GND
Sensor B
Vcc VB GND
Connect VA pin to one of the pins in 2x13 header? i.e. One pin to one pin
Connect VB pin to one of the pins in 2x13 header?
i.e. One pin to one pin
If i do that, it is not [7:0] datatype
I think I misunderstand your advice.
I just would like to read another sensor by code only.
If i==0
Read sensor A
If i==1
Read sensor B
Thank you