Jun 1, 2013 #1 X xilinx1001 Member level 3 Joined Apr 3, 2013 Messages 60 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,781 Hi, I am doing VHDL project using nexys2 board. I need to read the sensor readings using matlab through serial communication. My Code: Code: nexys = serial('COM1', 'BaudRate', 9600, 'Parity', 'odd', 'Terminator', '', 'Timeout', 1); fopen(nexys); s = 's'; fwrite(nexys,s,'uchar'); scan_s1 = fread(nexys,1,'uint16'); t = 't'; fprintf(t,'nexys') scan_s2 = fread(nexys,1,'uint16'); I am able to read the sensor values from nexys2 board. But the problem is that I geeting the sensor readings like 55352,45232 like this. But the maximum range of sensor is 400. It should not exceed this value. Is this because continuous reading of data? Can you please help me in solving the problem. Thanks in advance Vivek Alaparthi
Hi, I am doing VHDL project using nexys2 board. I need to read the sensor readings using matlab through serial communication. My Code: Code: nexys = serial('COM1', 'BaudRate', 9600, 'Parity', 'odd', 'Terminator', '', 'Timeout', 1); fopen(nexys); s = 's'; fwrite(nexys,s,'uchar'); scan_s1 = fread(nexys,1,'uint16'); t = 't'; fprintf(t,'nexys') scan_s2 = fread(nexys,1,'uint16'); I am able to read the sensor values from nexys2 board. But the problem is that I geeting the sensor readings like 55352,45232 like this. But the maximum range of sensor is 400. It should not exceed this value. Is this because continuous reading of data? Can you please help me in solving the problem. Thanks in advance Vivek Alaparthi
Jun 9, 2013 #2 S sudesh Newbie level 1 Joined May 27, 2009 Messages 1 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,284 I am not sure about your board, but my past experience says most of the serial communications work at parity 'none' status. You may try and check if it works or not.
I am not sure about your board, but my past experience says most of the serial communications work at parity 'none' status. You may try and check if it works or not.