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.

serial receive byte count

Status
Not open for further replies.

praba_J

Member level 3
Member level 3
Joined
Nov 24, 2010
Messages
66
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
LINYI,CHINA
Visit site
Activity points
1,655
hi.. i am receiving continuous data from blood pressure module.. initially it will send 10 byte data and after some time it will send 6 bytes only.. when i receive 6 byte data i need to reduce receive buffer size to 6 from 10.. how can i do this...i tried with buffer count for every receive.. any suggestions??
 

i think your problem is that you do not know how much data is coming ? could be 10 or could be 6.

i do not know what protocol is being used, or even what system you are talking about, but maybe if you look at the the 1st byte received it will tell you (somehow) how many bytes are there in the packet. Then you can offload either 10 byes or 6 bytes from buffer

but if you reduce the buffer size to 6, then how will you receive 10 bytes if they come next ?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top