project router in microcontroller 16f887

Discussion in 'Embedded Systems and Microcontrollers' started by zemzi, Dec 16, 2011.

  1. zemzi

    Thread Starter New Member

    Dec 14, 2011
    8
    0
    Here is the text of my project, can someone help how to solve this?

    To program the PIC to work as a Super Router, and reading the serial
    port frame, forwards them to the standard, or rejected. The next message
    format:
    First Destination MAC, 6 bytes fixed - variable value for each frame
    Second TTL, 1 byte fixed - variable value for each frame
    Third Length, 1 byte fixed - variable value for each frame
    4th Data, [1, 16] bytes - variable value, variable length for each frame
    5th Error Code, 1 byte fixed - sum of all units in the field 1-4
    And process the PIC as follows:
    First Checking the MAC address.
    - If it is rejected and the LCD display reads in two lines - "Primiv
    ramka sto ne e za mene ".
    - If it is addressed, go to step 2
    Second Checking the Error Code.
    - If the frame is error, rejecting the LCD screen and write in two rows -
    "Primiv ramka sto gresna".
    - If the frame is not an error, go to step 3
    Third Check the TTL.
    - If the TTL is 0, the frame is discarded and the LCD display reads in two rows -
    "Primiv ramka sto TTL = 0".
    - If TTL> 0, go to step 4.
    4th Creating a framework for sending.
    - In the Dest. MAC value is entered as DestMac own arbitrary will
    create it as a variable
    - TTL field is reduced by 1 from the received frame
    - Length field remains the same
    - Data remains the same field
    - Calculate new value for the Error Code field
    After creating the frame, it sends the serial port, and write the first row of the LCD
    - "Prativ ramka:", second row area Data
    After sending, wait for a new framework. Assume that in the meantime not to arrive
    new framework.
     
Loading...