This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to send an array to microcontroller through serial communication

Hi all
iam working on c51 cygnal microcntrollers
iam performing serial communication ,
at the console iam performing some manipulations and iam updating in an
array[255] now i would like to send this array to controller and iwant to write the received array to external memory of microcntroller could you please
suggest me how perform this ,
note i have already established serial
communication between console and microcontroller, at the console iam running c programme from that programme i have to send one array to microcontroller.please suggest me how to do this.

regards
ken

Parents
  • Hi
    neil thanks for your reply. well actually at the receiving end ie microcontroller how to receive this array in microcontroller.
    actually my project involves the following

    1) at console iam performing some overhead calculations and also i will take data from user, at last iam sending through serial port
    assume
    sarray[]={01,1e,30,30,12,32,21,31,38,84,18,32,47,12,3487,12,34,80}
    actually this type of array is generated at console using c programme .and at last iam writing the each element of array to serial
    port ,
    ie for(i=0;i<len;i++)
    {
    ch=sarray[i];
    outportb(port1,ch);
    }
    at microcontroller end its waiting to receive this array how to receive this array
    can i directly initialise an array in the micrcontroler will it store these datas

    regards
    narasimhajb

Reply
  • Hi
    neil thanks for your reply. well actually at the receiving end ie microcontroller how to receive this array in microcontroller.
    actually my project involves the following

    1) at console iam performing some overhead calculations and also i will take data from user, at last iam sending through serial port
    assume
    sarray[]={01,1e,30,30,12,32,21,31,38,84,18,32,47,12,3487,12,34,80}
    actually this type of array is generated at console using c programme .and at last iam writing the each element of array to serial
    port ,
    ie for(i=0;i<len;i++)
    {
    ch=sarray[i];
    outportb(port1,ch);
    }
    at microcontroller end its waiting to receive this array how to receive this array
    can i directly initialise an array in the micrcontroler will it store these datas

    regards
    narasimhajb

Children