Hi,
Your thoughts please on a potential future project,
I have a general purpose CAN project which uses something similar to the Arduino shields to allows me to add project specific custom hardware modules.
Basically consists of an ECIO 40P (18F4455) running FC5 Code and 2 x CAN, 1x LIN (using the same microchip ICs as the relevant E-Blocks)
I really should concentrate on sorting the core project but go distracted with a thought...
I was thinking about a future data logging capability, storing the raw data from one of the CAN bus. The aim is to copy every message sent on the bus (with no time stamp), store them in sequence and stream them back at a latter date. I can then use my CAN Analysis tool to read/record this data and analyse it from there. In this basic setup I would have no idea of timing between the messages for the regurgitated data but I can at least look at the data.
The only problem is that we have a busy CAN bus, running at around 65% bus load, which is around 5500 messages per second. (5500 x 8 data bytes = 44000 bytes per second)
Do you think it is realistic for the ECIO 40 to keep up with reading and writing 44 Kbytes/sec to MMC at this rate. Assuming the ECIO 40 is dedicated to just this task and both the CAN and MMC are connected over SPI.
I've read several of the threads and articles but was still not sure about this data rate.
Regards,
John.
ECIO Based Data Logger
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ECIO Based Data Logger
Hi John,
I think this rate to a MMC might be achievable but it looks a bit high to me. Certainly worth a go.
If no go then you should be able to pump that much data through the USB or to a local Static Ram IC.
I think this rate to a MMC might be achievable but it looks a bit high to me. Certainly worth a go.
If no go then you should be able to pump that much data through the USB or to a local Static Ram IC.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Jay Dee
- Posts: 398
- Joined: Tue Aug 18, 2009 6:42 pm
- Has thanked: 121 times
- Been thanked: 154 times
- Contact:
Re: ECIO Based Data Logger
Thanks Ben,
If I get the time and go ahead with this part of the project and make any progress, i'll pass it on.
Regards,
John.
If I get the time and go ahead with this part of the project and make any progress, i'll pass it on.
Regards,
John.
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Contact:
Re: ECIO Based Data Logger
Hi,
You could use like a little data buffer in the ECIO to 'capture' a couple of messages and then write it on the MMC.
I'm not sure how the MMC write/read process works, but I think writing multiple bytes one after the other is faster than doing it 1 by 1.
I've played a bit with an I²C EEPROM and to write a single byte I needed to send the control code + device address + R/W, the address where to write the byte to and the data byte, which is 4 bytes per data byte I want to save. (The address consists of a high byte and low byte address)
So if I need to write 10 bytes to the EEPROM it will need to write 4 times as much bytes.
By using what they call the 'page write' if I remember correctly I could send the control code + dev address + R/W and the address just once.
So instead of writing 40 bytes for 10 bytes data, you'll write 13 bytes which is approx 3 times faster.
I have not tested this, but it should be correct.
Cheers,
Nicolas
You could use like a little data buffer in the ECIO to 'capture' a couple of messages and then write it on the MMC.
I'm not sure how the MMC write/read process works, but I think writing multiple bytes one after the other is faster than doing it 1 by 1.
I've played a bit with an I²C EEPROM and to write a single byte I needed to send the control code + device address + R/W, the address where to write the byte to and the data byte, which is 4 bytes per data byte I want to save. (The address consists of a high byte and low byte address)
So if I need to write 10 bytes to the EEPROM it will need to write 4 times as much bytes.
By using what they call the 'page write' if I remember correctly I could send the control code + dev address + R/W and the address just once.
So instead of writing 40 bytes for 10 bytes data, you'll write 13 bytes which is approx 3 times faster.
I have not tested this, but it should be correct.
Cheers,
Nicolas
- Jay Dee
- Posts: 398
- Joined: Tue Aug 18, 2009 6:42 pm
- Has thanked: 121 times
- Been thanked: 154 times
- Contact:
Re: ECIO Based Data Logger
Thanks for that, make sense.
And since I am working with CAN, with typically 8 data bytes per message, writing 8 bytes at a time would be a sensible starting point.
Had a great result on the weekend but its now pushed some other projects back in front of this one, so could take a while before I get to progress it. Never have enough time to keep up with all the ideas!
Thanks again,
John.
And since I am working with CAN, with typically 8 data bytes per message, writing 8 bytes at a time would be a sensible starting point.
Had a great result on the weekend but its now pushed some other projects back in front of this one, so could take a while before I get to progress it. Never have enough time to keep up with all the ideas!
Thanks again,
John.