I would like to interface the CMPS03 compass module to the SSC-32.
I have tried the following wiring, but I am failing. I have attached the ground and the + from the CMPS03 to - and + of the 4 AD inputs. Also, I have connected the PWM output of the CMPS03 to “D” of the AD inputs.
If I am looking to what I am seeing in Lynxterm there are numbers moving permanently up and down on ALL 4 input channels. I suppose that I have done something stupid here and that either PWM is not the right thing to connect to the inputs or the wiring is wrong.
I see I2c and PWM outputs, neither if which can be directly read by the SSC32. What outputs are you connecting? I’m not seeing an analog output.
There are PIC circuits that can convert PWM signals. The PIC on the BASIC Atom could probably be programmed to do I2C (maybe there’s already a canned routine for I2C in it).
I’d like to find a US distributor for Davenport compass.
I was hoping to simply use the PWM output of the CMPS03 to the AD input of the SSC-32. But I understand following what you are saying that this is impossible.
I was hoping that it would work as the same works with the Robonova controller board (where you can write PWM data to the analog port)…
I know the Atom PRO can do I2C just fine because I have used it. I haven’t use I2C on the Basic Atom yet, but will be soon. The commands are I2CIN and I2COUT.
This is not possible. The CMPS03 only has PWM and I2C interfaces, and no analog output. There is no way to connect this to the SSC-32 and read the values from the compass. It’s important to be familiar with the various parts you want to use and the methods they have to interface - two parts must be able to use the interface(s) (PWM or I2C in this case) to communicate. You can find this information in datasheets or manuals for each device you want to interface.
Actually, with a resistor and a capacitor, you can make the PWM output of the compass module into an analogue voltage. The resistor and capacitor can be used to form a simple low-pass filter (google ‘r-c filter’ or ‘rc network’). The output of the rc network will be the ‘effective’ voltage of the PWM signal.