Hi all,
I am and experienced electronics engineer but totally new to Arduino, not a programmer and going nuts with this..!! Appreciate any help.
I am building a Radio Telescope and have some Analog Devices SDC1740 series 14 bit Synchro/ Resolver ADCs that give very accurate positioning data. These are old 14 and 12 Bit Parallel format and easy to drive -
http://www.analog.com/static/imported-files/data_sheets/SDCRDC1740_1741_1742.pdf
Can anyone help with a bit of code / sketch that might get the basics going please? Then I might understand how to develop it further. Struggling to get off the blocks with this one!
Using a Mega2560 with the intention of reading the ADC every 100mS or so.
Plan is to interface it to the PA0-7 and PC0-5 ports of the Arduino with a single input from ADC BUSY (PL0) and an /INHIBIT ADC output (PL1). to freeze the data before each read.
The plan is to connect to the PC initially via the USB serial port and capture the data in Serial Monitor as a single Decimal Degrees to about 4 or 5 decimal places.
The ADC outputs as MSB 180 deg, 90, 45, 22.5, etc right down to the LSB.
My data port runs 14 pins from pin 22 which is PA0 (MSB) through pin 29 which is PA7. Then PC0 is pin 37 going down to pin 32 for PC5 (LSB). (Order of the pin sequence changes for port PCx).
All ADC Data values produce a Positive Decimal. 0 to 360.0000 No negative numbers.
So was thinking the Arduino Read cycle might be something like this:-
- Initialize the Serial port etc
- Drop the Inhibit pin.(Freezes the ADC output)
- Read the Pin states of the 14 inputs.
- Attribute the 'Number of degrees' (value) to each pin number. EG:- " Pin 22 = Value(180)" " Pin 23 = Value(90)" kind of thing (Might be a much better way to do this??) ( See page 4 of the datasheet).
- Add the total of those values (degrees). 180 +90+45 etc..
- Send the completed total number in Decimal to the serial Port.
- Add a "Wait Time" and do it again. 100mS - (Eventually, will send a character to the Mega to trigger the read on demand.)
I got the serial port bit going using examples etc and that's all fine. My problem is that I can find nothing relevant to 'How to read and process the data from Parallel ports' . There's loads on writing out to DACs LCD's etc. So, I am at a loss. Even looked for 8 bit examples with a plan to extend it out.
Would urgently welcome any assistance on this.
Many thanks
Geofiz