RFID and TCP/IP

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
Kai
Posts: 4
Joined: Thu Apr 07, 2011 12:46 pm
Has thanked: 1 time

RFID and TCP/IP

Post by Kai »

Hello
We have a problem with your project.
We are trying to connect both RFID and TCP/ IP blocks to your Microcontroller Port C.

The blocks use these ports:
The TCP/IP E-block uses pins 0-INT, 4-SDA, 3-SCL
The RFID E-block uses pins 0-CTS, 6-TX, 7-RX

We tried to change the chip select pin to 1, but I think we did it wrong. How exactly can we change that chip select pin?
We configured CTS pin (J6) to use the patch system (Position 4).
We also connected CTS signal from J9 to one of the unused pins on J8.

Should the RFID now work with a regular cable? We are trying to make it work like this before we try to put the TCP/IP-block in the mix. Please advice.
Later we will make our own cables to connect all of the pins from both of the blocks to the microcontroller.

User avatar
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: RFID and TCP/IP

Post by Benj »

Hello,

To change the chip select pin for the RFID component simply right click the RFID component and change the port and pin for the CTS pin. In your case to pins RC1 or RC2. Note that PWM channels are also on RC1 and RC2 so do not use the pin you are using for your PWM output.

The regular splitter cable should allow the RFID to work correctly with the patch system and pin change in place.

Let me know if you can't get this to work correctly.

Kai
Posts: 4
Joined: Thu Apr 07, 2011 12:46 pm
Has thanked: 1 time

Re: RFID and TCP/IP

Post by Kai »

Thank you Ben,
now we have another problem in our project.
We are trying to get a proper signal out of the EKG from Matrix Multimedia, but we get too much noise.
Is it normal, that it is the same signal with and without groound is connected ?
How can we fix that problem ?

best regards
Kai

User avatar
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: RFID and TCP/IP

Post by Benj »

Hello Kai,

The E-block system automatically connects the ground signal so you do not have to manually wire this across. This could be why the board is working with the ground connected and not connected. Are you sure you are sampling the correct ADC channel?

Kai
Posts: 4
Joined: Thu Apr 07, 2011 12:46 pm
Has thanked: 1 time

Re: RFID and TCP/IP

Post by Kai »

yes, the heartbeat is recognizable but the waveform is to noisy, even on the oscilloscope.
so taking a sample and half a ms later another one can give a huge difference, even if it should be the same value if the noise wasn't there.

it looks a bit like this except that the R waves don't stand out as much:
Image

other sensors, like the heart-rate sensor, don't have this noise.

Kai
Posts: 4
Joined: Thu Apr 07, 2011 12:46 pm
Has thanked: 1 time

Re: RFID and TCP/IP

Post by Kai »

another problem we have now on top of the noise is a delay on the TCP stack.

our protocol is as follows:

RX 1 byte
TX 4 bytes

RX 1 byte
TX 4 bytes

RX 1 byte
TX 4 bytes

RX 1 byte
TX 4 bytes

and when done from an application on another pc, there is no noticeable delay. the whole cycle above completes in under 1ms. However, when doing the same on the TCP board, the cycle completes in 130ms, noticeable slower.

we tried to figure out how to change the I2C baud rate for the TCP board to see if this could speed up things. but we cant find the settings to do that.

User avatar
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: RFID and TCP/IP

Post by Benj »

Hello,

If your using Flowcode v3 then you will have to edit the TCP/IP component C file to make the changes.

If your using Flowcode v4 then you can use the inbuilt code customization feature to avoid having to change the component C file.

Also if your using v4 then please sign up to the v4 forum topic. Details of how to do this are available from here.
http://www.matrixmultimedia.com/support ... f=29&t=602

Basically you are looking for this line in the initialize function.

sspadd = %a_I2C_BAUD;

At the moment the baud will default to 100KHz. To up the baud rate to 400khz you can try changing the value to this.

sspadd = 11;

The default value is 48 so if 11 does not work then you could try values in between.

Post Reply