2010-01-19

Well.. whadda'y'know...

Howdy again

Sometimes things do go better than planned/hoped for.

I compiled CCS tcp/ip-stack and now it works.
It was that simple. I don't know what to say.

Now I need to integrate my can-module to it and start thinking the messaging from PC to end devices (gauges, instruments etc.)

Should the ethernet-can transceiver be just a dummy repeater or should it have some intelligence like buffering messages or doing error checking?

Oh yeah, now when this ethernet-thingy got done I have spent some time drawing the schematics and layout for "enddevice" pcb.
"Enddevice" is a small pcb that handles the actual instrument control. It receives/sends messages over CAN-bus to ethernet-can-transceiver (should I call it "ethernet-can"?).

Here is the drawing:



And the final (we'll see about that...) pcb layout:


The size of pcb is 36mm x 51mm. It fits nicely inside the gauge.
It could be smaller, or even tiny if I would use smd-components but there is no need for that.
At least for now...

Ah, and here is the ethernet-can-transceiver all powered up an ready to receive data over ethernet:


Stay tuned. I have feeling this project is starting to get shape now...

2010-01-07

Yeah, right...

18F2580 has 32kB of flash.
TCP/IP-stack requires 44kB. And that is without CAN-stuff.

Fortunately 18F2685 is pin-compatible with 18F2580 and it has 96kB of program memory.
I somehow managed to compile the sw and even the hw is working like a charm...

So now I have a working ethernet connection that responds to ping and sends UDP packets!

I could almost say "YeeHaw!". Almost. There is still lots to do.

My girlfriend came to see why I was so excited and her comment was: "Lots of blinking lights and no smoke, it is working?"...

Next I need to integrate CAN module to ethernet module but there is only one (just one?) problem: my working CAN module is coded with CCS C-compiler and ethernet module is coded with Microchip's C-compiler...
Either way I have to port one module to another system. If I do whole thing with CCS, it will be a huge task because TCP-module is about 50x the size of my CAN-module.
If I do it the other way, I have wasted $200 for CCS C-compiler I am not even using.

Let's see how it goes...

2010-01-02

Ethernet...

Oh yeah! Finally some progress after long nonproductive time...

I just finished putting together circuit for ethernet connection.
PIC 18F2580 with enc28j60 and pulsejack J0026D21BNL:
Power connected, no smoke. Let's see if PicKit recognizes it...

No more updates this time.