View previous topic :: View next topic |
Author |
Message |
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Sat Jul 05, 2014 1:59 pm |
|
|
Sounds really 'fuzzy' to me....as most "multi-axis accelerometer chips" have access to registers to configure the device.
I'm 'thinking' this 'device' works as follows...
PIC sends a 'strobe' signal down the 'strobe' line......
DEVICE sends 'data' to PIC up the 'data' line....
Simple and easy to do IF you KNOW the format of the device's communications protocol. It's all in the details, NONE of which we are allowed access to.Sigh..as this is interesting to me.
Presumably once the 'strobe' signal is sent the device sends a stream of data, a series of ones and zeros. Unknown quantity of bits, unknown rate....it could be 'fixed' at a 'baudrate' hence the UART reference, though again we're left 'in the dark'.
Another option is that the PIC sends a series of 'strobe' signals to the device where each 'strobe' tells the device to send back one data bit. So if the datastream has 44 bits the PIC would need to send 44 'strobes'. This way is somewhat harder to do..as WHAT defines the beginning or end of the datastream?
Clear as mud !
I have reversed engineered 'black box' devices in the past, including a nice 22 bit serial protocol that interlaced control and data on ONE wire and ground (long before the Dallas 'one wire' stuff came out, so I am interested in this thread.
Jay |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Jul 05, 2014 2:26 pm |
|
|
If you want to waste your time on it, Google for "multi-axis sensor with
data buffer". You will quickly find the QuickLogic Sensor Hub or "Sensor
Fusion" device. Google for that (a little detective work) and you will find
articles in the trade press that say it has a "low power i2c" or SPI interface.
That fits his "strobe" requirement. In a previous post, he says the
maximum clock frequency in his data sheet is given as 2 MHz. That could
easily be the SCL or SCLK maximum for a low power, battery operated,
wearable QuickLogic device. You can spend all afternoon as an amateur
sleuth trying to ferret out his actual chip. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Sun Jul 06, 2014 5:07 am |
|
|
hmm.. I'm guessing if he only has 2 pins, it's really the 'low power I2C ' interface..
not exactly a lot of tech details on their website though....
PCMP's I2C scanner would be a start
While I do like a mind challenge, I've officially lost interest in this thread.
jay |
|
|
gabirelms
Joined: 28 Jun 2014 Posts: 38
|
|
Posted: Sun Jul 06, 2014 5:23 am |
|
|
I'm sorry, I explained myself very bad. I'm very new to PIC programming and I'm experimenting with things harder than my level. I really appreciate all replies.
To read data from the buffer memory: pulse STROBE input high and then low to move forward. When STROBE input is low, a low on DATA means a 1 bit and a high means a 0 bit.
The buffer memory has a size of 256 bits.
Maximum STROBE frequency: 2Mhz.
That is why I tried to produce a 2Mhz square wave. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Sun Jul 06, 2014 7:00 am |
|
|
1) you really should post ANY/all information ( link ?) to how to access the data, the more WE know the better, faster we can help.
2) forget about the 2MHz clock. Since the strobe is the 'timing' signal, simply create a loop for 256. Do a simple bit set, bit clear of the 'strobe' pin and then read the 'data' pin, put result into a buffer. I'd also send the 'data' to a PC terminal program to see the data coming back. This low level approach should work. Once you've got real data THEN speed up the loop to get the data faster.
I am concerned about HOW you 'sync' the datastream though..as well as the format.
hth
jay |
|
|
gabirelms
Joined: 28 Jun 2014 Posts: 38
|
|
Posted: Sun Jul 06, 2014 7:15 am |
|
|
Thanks again for your help.
I will try that.
By the way, this is neither USART nor spi, right ? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Sun Jul 06, 2014 9:59 am |
|
|
right...
as posted it's a just another form of serial communications with 'sync' .
jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Sun Jul 06, 2014 11:04 am |
|
|
Question.
Is there anything at all to start/stop/reset/identify the transmission?.
What you are describing can be done either quite simply in software or using the USART, _except_ for surviving if an extra pulse is seen, or a pulse is lost.
If this happens, _everything_ from this point on, is going to be corrupted. It _will_ happen. So there needs to be some way to recover. Either something in the data to 'mark' the ends of the data (identify), or a way of resetting the counter in the device. This is what the CS line does for SPI, and while it is possible to have SPI devices without this, it requires a device that has some way of handling recovery (I've done ones for instance where if no clock is seen for half a second, the counters are automatically reset).
So, what is there in the format to help in this?.
Without this, you are in problems..... |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
|
|