Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[51] Send an array on serial port

Status
Not open for further replies.

hirenn

Full Member level 1
Full Member level 1
Joined
Jul 12, 2014
Messages
96
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
703
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
 

Re: send an array on serial port

Based on your previous posts, you are supposed to be using MikroC.
So, this would solve:

my_ip[4]={192,168,4,1};
int x;
for ( x=0; x<sizeof(my_ip); x++ ) {
UART1_Write(my_ip[x]);
}

Anyway, this answer could be easily inferred from many examples available on other posts, which suggest you did not make a search before asking here.
 

Re: send an array on serial port

hi,
i have searched on same before post my question,as well i could find related solution..
yeah last question was on mikroC but now in same question i have mentioned that "i'm using at89s52 microcontroller " otherwise you gave me soultion for mikroC??????
btw thanks for your kind reply
 

Re: send an array on serial port

i have mentioned that "i'm using at89s52 microcontroller " otherwise you gave me soultion for mikroC?

Instead of giving us an impression of a lazy person, why don't you check this by yourself ? The answer can be quickly found in several places. Even so, I will give you a tip: The syntax of the commands of a compiler, as well as the syntax for its peripheral´s APIs is the same whatever the core you are compiling for.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top