xpress_embedo
Advanced Member level 4
- Joined
- Jul 5, 2011
- Messages
- 1,154
- Helped
- 161
- Reputation
- 396
- Reaction score
- 189
- Trophy points
- 1,353
- Location
- India
- Activity points
- 10,591
Hello!! Everyone,
I have to implement a queue in micro-controller, that is simple when the values stored are of single, double bytes, But what to do when there is a need to save a 20 bytes long packet.
I am confused how to implement this.
My Application Requirement is as follow:-
Micro-controller has to receive packet from serial port which is 20 bytes(Maximum) long and then have to check its validity and then store it in a queue and so on until an event occurs.
If an event occurs then the First Packet in Queue is processed, as in FIFO method, if another event occurs then another packet gets processed.
If in between another packet comes, it gets added to Message Queue.
What will be the structure for this, can anyone please help me to solve this.
I am using PIC18F4550 micro-controller and xc8 v1.31 compiler along with MPLAB X 2.10.
Thanks in Advance.
I have to implement a queue in micro-controller, that is simple when the values stored are of single, double bytes, But what to do when there is a need to save a 20 bytes long packet.
I am confused how to implement this.
My Application Requirement is as follow:-
Micro-controller has to receive packet from serial port which is 20 bytes(Maximum) long and then have to check its validity and then store it in a queue and so on until an event occurs.
If an event occurs then the First Packet in Queue is processed, as in FIFO method, if another event occurs then another packet gets processed.
If in between another packet comes, it gets added to Message Queue.
What will be the structure for this, can anyone please help me to solve this.
I am using PIC18F4550 micro-controller and xc8 v1.31 compiler along with MPLAB X 2.10.
Thanks in Advance.