| Author |
Message |
HarrySieber3
Guest
|
Posted:
Thu Sep 29, 2005 4:15 pm Post subject:
time detection via WWVB and the CME8000 module |
|
|
I am attempting to provide automated time detection via the WWVB signal
for embedded logging devices. I want to be able to time/date stamp data
collection without requiring the user to set it manually. The CME8000
is a receiver chip that seems ideal. I have purchased and powered up
the CME8000-BUS-LP-01 module (easily available form Digi-Key). This
module uses one of the most bizarre protocols I have ever seen- a
mishmash of IIC, RS232, and others. The data sheet is also one of the
worst I've ever seen, requiring inference and extrapolation to figure
out how the thing actually works. The purpose of this long-winded post
is to ask if anyone else has used this device, and figured out how to
generate the CRC bytes required by the protocol. I have contacted C-MAX
(a chinese company), their domestic rep, and tech suport at DigiKey,
all to no avail. I have tried CRC16, CRCITT, (and their reverse
polynomials), msb-lsb and lsb-msb ordering of crc bytes without being
able to communicate to this opaque device. The pdf document
CME8000-BUS-B6.pdf) I downloaded from their site refers to sample
source code in the appendix- the appendix doesn't exist. If anyone has
cracked the CRC algorithm I would be very grateful for any help.
TIA
Harry Sieber
Sieber Consulting |
|
| Back to top |
|
 |
realexander
Joined: 13 Oct 2005
Posts: 2
|
Posted:
Thu Oct 13, 2005 6:27 pm Post subject:
Re: time detection via WWVB and the CME8000 module |
|
|
Sorry I can't help with the CME8000, though I've tried using C-Max's CMM6 without any luck. When I looked at what the CME8000 needed, I figured that the software to decode the WWVB signal is not that big a deal, so I went with the cheaper, smaller, simpler device.
However, as near as I can tell, I'm not getting any signal out of the CMM6. I tried moving the antenna around, letting it run overnight, using pull up and/or pull down resistors, but I get absolutely no signal. C-Max's tech support confirmed I wired it up right (if you try it, be careful: some wires go to the front of the board, and some go to the back). Store-bought radio clocks work great when they're sitting right next to the CMM6.
The one caveat in this is that I'm not a EE. I'm a software engineer working with the CMM6 at home as a hobbyist. My tools are a voltmeter and logic probe: no oscilloscope. And my knowledge of electronics is weak. I might've screwed up something obvious, but I can't figure out what.
If you choose to try the CMM6, please let me know what results you get. I know my experience might discourage you from even attempting it, but keep in mind that, if you can get it to work, it'll be cheaper and smaller for your product, and the software really isn't that difficult.
Another choice is Galleon's EM2S WWVB receiver. It's like the CMM6, but has been around much longer. However, I've had a hell of a time trying to get them to answer their phone or return my voicemail or e-mail messages. I sent them an order by US mail weeks ago, and I'm trying to find out if they got it or not.
- Bob |
|
| Back to top |
|
 |
realexander
Joined: 13 Oct 2005
Posts: 2
|
Posted:
Fri Oct 14, 2005 12:16 am Post subject:
Re: time detection via WWVB and the CME8000 module |
|
|
Hi Harry,
Sorry I can't help with the CME8000, though I've tried using C-Max's
CMM6 without any luck. When I looked at what the CME8000 needed, I
figured that the software to decode the WWVB signal is not that big a
deal, so I went with the cheaper, smaller, simpler device.
However, as near as I can tell, I'm not getting any signal out of the
CMM6. I tried moving the antenna around, letting it run overnight,
using pull up and/or pull down resistors, but I get absolutely no
signal. C-Max's tech support confirmed I wired it up right (if you try
it, be careful: some wires go to the front of the board, and some go to
the back). Store-bought radio clocks work great when they're sitting
right next to the CMM6.
The one caveat in this is that I'm not a EE. I'm a software engineer
working with the CMM6 at home as a hobbyist. My tools are a voltmeter
and logic probe: no oscilloscope. And my knowledge of electronics is
weak. I might've screwed up something obvious, but I can't figure out
what.
If you choose to try the CMM6, please let me know what results you get.
I know my experience might discourage you from even attempting it, but
keep in mind that, if you can get it to work, it'll be cheaper and
smaller for your product, and the software really isn't that difficult.
Another choice is Galleon's EM2S WWVB receiver. It's like the CMM6, but
has been around much longer. However, I've had a hell of a time trying
to get them to answer their phone or return my voicemail or e-mail
messages. I sent them an order by US mail weeks ago, and I'm trying to
find out if they got it or not.
- Bob |
|
| Back to top |
|
 |
mike50
Joined: 29 Nov 2005
Posts: 5
|
Posted:
Wed Nov 30, 2005 3:22 am Post subject:
|
|
|
Has anyone yet discovered the CRC algorithm used by the CME8000-BUS-LP1 ?
If not, I will try to discover it by running the CME8000-BUS demo program and trace the activity on the serial port. Hopefully I will be able to reverse engineer the algorithm from that.
Of course it would be lots easier if someone already has the algorithm.
Mike |
|
| Back to top |
|
 |
mike50
Joined: 29 Nov 2005
Posts: 5
|
Posted:
Thu Dec 01, 2005 4:22 am Post subject:
|
|
|
By running the CME8000-BUS demo program and tracing the serial port data, I was able to determine the CRC algorithm.
The CRC used is a 16-bit CRC using the CCITT polynomial. That is x^16 + x^12 + x^5 + 1. The initial value is 0x0000, not the 0xFFFF usually used with this algorithm. The data is fed MSB (most significant bit) first.
As an example, one of the requests sent by the demo program was the following string:
0x02 0x59 0x08 0x84 0x99 0xEA 0x21 0x03
which breaks down as:
0x02 STX
0x59 address of CME8000-BUS module
0x08 number of bytes in packet
0x84 command = RD_RX_STATE
0x99 address of sender
0xEA21 CRC
0x03 ETX
The CRC is computed over 0x59, 0x08, 0x84, 0x99
Mike |
|
| Back to top |
|
 |
sykessler
Joined: 05 Dec 2005
Posts: 1
|
Posted:
Mon Dec 05, 2005 6:14 am Post subject:
Tx Rx Px pins |
|
|
Hi,
I made the (apparently) poor decision to use the CME8000-Bus for my senior project. I concur with all said above about the uselessness of the datasheet. I still have questions:
Did you connect the the serial connection as depicted in the datasheet with the 74HC14 invenrting schmitt trigger and the PNP 2N4403?
What is the PX connection? Is it the Ready pin?
What is a CRC algorithm?
How are the values Mike discovered used?
I'm sure I'll have more questions. Thanks, Shmuel |
|
| Back to top |
|
 |
mike50
Joined: 29 Nov 2005
Posts: 5
|
Posted:
Mon Dec 05, 2005 4:55 pm Post subject:
Re: Tx Rx Px pins |
|
|
I can answer some of the questions.
| sykessler wrote: | Hi,
I made the (apparently) poor decision to use the CME8000-Bus for my senior project. I concur with all said above about the uselessness of the datasheet. I still have questions:
Did you connect the the serial connection as depicted in the datasheet with the 74HC14 invenrting schmitt trigger and the PNP 2N4403? |
The scheme in the datasheet you refer to is describing a method that can be used to connect to the CME8000-BUS-LP1 using a single wire. I didn't attempt that. I originally connected directly to the TX and RX pins on the CME8000-BUS-LP1 from the uart pins on my u-controller (ATMega128). This didn't work, although the transmitted bytes were echoed back as I expected. I suspect I need to invert the signals...I intend to build that circuit in the next few days.
| sykessler wrote: | | What is the PX connection? Is it the Ready pin? |
I don't know what they were referring to there, but it can't be the Ready pin.
| sykessler wrote: | | What is a CRC algorithm? |
A CRC (cyclic Redundancy Check) algorithm is a method to detect errors in transmitted data. The sender computes the CRC value of the data before sending it, sends the data and the CRC and the receiver also computes the CRC value over the data and compares it to the transmitted CRC. If they don't match there was an error. Of course it is important that both the sender and the receiver use the same algorithm.
| sykessler wrote: |
How are the values Mike discovered used?
|
As you send bytes to the CME8000-BUS you compute the CRC value corresponding to the data sent and then send the CRC at the end (just before the ETX (end of transmission) byte. The CME8000-BUS will also compute the CRC and verify that the data was sent/received correctly.
I will post some CRC code here (later today or tomorrow) that matches the algorithm I found the demo program using.
| sykessler wrote: |
I'm sure I'll have more questions. Thanks, Shmuel |
|
|
| Back to top |
|
 |
mike50
Joined: 29 Nov 2005
Posts: 5
|
Posted:
Mon Dec 05, 2005 7:00 pm Post subject:
|
|
|
Here is code that will calculate the CRC used by the CME8000-BUS module.
| Code: | // Compute CRC based on CCITT polynomial x^16+x^12+x^5+1
// which is encoded as the 0x1021 mask below
// For CME8000-BUS use initial crc value of 0x0000
//
// Usage:
//
// unsigned short crc;
//
// crc = 0x0000;
// send STX
// do {
// get next_byte to send
// send next_byte
// crc = compute_crc( crc, next_byte );
// } while more bytes to send
//
// send most significant byte of crc
// send least significant byte of crc
//
// send ETX
// update CRC
unsigned short compute_crc(unsigned short crc, unsigned char c)
{
unsigned i;
unsigned short cc;
cc = ((unsigned short)c) << 8;
for(i=0;i<8;i++) {
if ((crc ^ cc) & 0x8000)
crc = (crc<<1) ^ 0x1021;
else
crc <<= 1;
cc<<=1;
}
return crc;
} |
|
|
| Back to top |
|
 |
hheinreich
Joined: 30 May 2006
Posts: 1
|
Posted:
Tue May 30, 2006 10:54 pm Post subject:
CME8000-BUS module |
|
|
Has anybody gotten this to work? I also traced out the comms using the demo program and figured out the crc. I still can not get it to work when connect to my micro (ATMega64).
Any suggestions or help would be great because I get no reply when contacting C-MAX and all that Digikey will tell me is to contact C-MAX.
Thanks for listening to my whinning! |
|
| Back to top |
|
 |
bigfatdeal
Joined: 06 Oct 2006
Posts: 1
|
Posted:
Fri Oct 06, 2006 7:45 pm Post subject:
|
|
|
I don't have anything constructive to add, except that I have had / am having the exact same problems that everyone else in this thread is having.
For the record, does anyone in the thread know of a system that is fully functional with the CME8000-BUS-LP-01 ? Has anyone been able to read anything from it? |
|
| Back to top |
|
 |
mike50
Joined: 29 Nov 2005
Posts: 5
|
Posted:
Sat Oct 14, 2006 5:18 pm Post subject:
|
|
|
I eventually gave up. I haven't looked at this for a long time.
Sorry
Mike |
|
| Back to top |
|
 |
|
|
|
|