Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

send an array on serial port

6 posts / 0 new
Last post
Hirenn
Hirenn's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 02/02/2015 - 14:20
send an array on serial port

hello,

i'm using at89s52 microcontroller and need to send few bytes serially.

i have an array like my_ip[6]={192,168,4,1};

how could i send it on serial port

Thanks!

GANEEV SINGH
GANEEV SINGH's picture
Offline
Last seen: 6 months 2 weeks ago
Joined: 22/07/2013 - 16:08
HiYou will need to send the

Hi

You will need to send the data byte by byte.

Check out this project: https://www.engineersgarage.com/microcontroller/8051projects/interface-s...

 

Ashutosh Bhatt
Ashutosh Bhatt's picture
Offline
Last seen: 1 month 1 week ago
Joined: 21/12/2010 - 15:59
starting with c=0send(my_ip[c

starting with c=0

send(my_ip[c]);

c++;

likewise you can send as many number of bytes as you want

ravindra
 ravindra's picture
thanks

thanks

anjali
 ravindra's picture
test

nice

arthur
 ravindra's picture
??
what?