Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

recieving serial communication problems in 8051

Status
Not open for further replies.

anasfuad33eng

Member level 1
Joined
Mar 21, 2013
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,498
hi,all i have a problem in serial communication my code below:
Matrix1=[1 2 3 4 5 6 7 8 9 ];
s=serial('com3','baudrate',9600);
set(s,'flowcontrol','none');
set(s,'parity','none');
set(s,'databit',8);
set(s,'stopbit',1);
fopen(s)
for i=1:length(Matrix1)
A=Matrix1(i) ;
fwrite(s,A,'int8')
pause(2)
end
the problem with this code only the five value of matrix1 will be send via serial port to 8051 ,so when i display the received values only the first five values of matrix1 displayed.the other values of the matrix not send whats the problem,please help,suggest,idea
the schematic diagram of my kit below:
Untitled.png
 

Try to increase the size of the IO buffers like used in the first lines of this code:
**broken link removed**
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top