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
  • Please read the instructions on the 'Reply' form - they tell you how to post code.

    for(i=0;i<len;i++)
    {
       ch=sarray[i];
       outportb(port1,ch);
    }
    Note that you may need to wait for the PC to finish transmitting each character before sending the next (if your PC has FIFOs enabled, you need to check instead that the FIFO is not full).

Reply
  • Please read the instructions on the 'Reply' form - they tell you how to post code.

    for(i=0;i<len;i++)
    {
       ch=sarray[i];
       outportb(port1,ch);
    }
    Note that you may need to wait for the PC to finish transmitting each character before sending the next (if your PC has FIFOs enabled, you need to check instead that the FIFO is not full).

Children
No data