+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 5
    Points: 82, Level: 1

    Join Date
    Jan 2018
    Posts
    8
    Helped
    0 / 0
    Points
    82
    Level
    1

    Output pixel larger than the desired pixel

    Please answer the following question if it is clear.
    I am using Altera FPGA board for saving a snapshot to a frame buffer and to send it serially to Matlab. My problem is that all the parts of my code are right but the received data to Matlab code are 14 bits rather than 8 bits.

    I tested each memory alone by defining a specific pixel at its input and output and checking the final output on Matlab, however all the parts seem to be correct.

    Would you help me to diagnose the problem?

    •   Alt27th March 2018, 13:04

      advertising

        
       

  2. #2
    Advanced Member level 5
    Points: 35,860, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,560
    Helped
    1913 / 1913
    Points
    35,860
    Level
    46

    Re: Output pixel larger than the desired pixel

    How is the data captured by matlab?



    •   Alt27th March 2018, 15:50

      advertising

        
       

  3. #3
    Member level 5
    Points: 753, Level: 6

    Join Date
    Aug 2016
    Location
    Bangalore, India
    Posts
    94
    Helped
    11 / 11
    Points
    753
    Level
    6

    Re: Output pixel larger than the desired pixel

    Can you please share the MATLAB code used for receiving the data as well as FPGA code used for sending the data ?



    •   Alt4th April 2018, 05:28

      advertising

        
       

  4. #4
    Newbie level 5
    Points: 82, Level: 1

    Join Date
    Jan 2018
    Posts
    8
    Helped
    0 / 0
    Points
    82
    Level
    1

    Re: Output pixel larger than the desired pixel

    Quote Originally Posted by TrickyDicky View Post
    How is the data captured by matlab?
    Here is my Matlab code.
    Code:
    clear all;
    delete(instrfindall);  
    s = serial('COM6');  
    info=get(s,{'Type','Name','Port'});
    set(s,'BaudRate',115200);  
    s.InputBufferSize = 8000;
    s.Timeout =200;
    
    
    fopen(s)
    fprintf(s,'%c','a') 
    Buffer = fscanf(s,'%c');
    fclose(s)
    binary_data=dec2bin(Buffer,8);
    Last edited by KlausST; 10th April 2018 at 10:53. Reason: correted tags



--[[ ]]--