+ 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?

    •   AltAdvertisment

        
       

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

    Join Date
    Jun 2010
    Posts
    6,614
    Helped
    1927 / 1927
    Points
    36,169
    Level
    46

    Re: Output pixel larger than the desired pixel

    How is the data captured by matlab?



    •   AltAdvertisment

        
       

  3. #3
    Full Member level 1
    Points: 844, Level: 6

    Join Date
    Aug 2016
    Location
    Bangalore, India
    Posts
    103
    Helped
    12 / 12
    Points
    844
    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 ?



    •   AltAdvertisment

        
       

  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



--[[ ]]--