Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

RS232+arrays

Status
Not open for further replies.

Asjad

New Member
Dear world,

Does anyone know how to pass an array through the serial port
I am using

PIC16F874
CCS COMPILER

If you know the soloution in hi-tech compiler, then that is okay

I thank you in advance

Regards
 
What do you mean an array? A variable array? Who is receiving it? Perhaps a loop will do it, loading the value into a variable and sending it then increasing 1 to read the next value and loop....

Ivancho
 
Here is what I haven't learned yet... I would like to recieve a few characters from the serial port and send a bunch back. I'm not sure how to work with this in the memory. If I want to recieve 3 characters first, I can store the first byte to some memory location, then I increment the address. I'm just not sure how to refer to an address rather than a number or literal. For this particular string I could refer to it in its exact location in the general registers.

Are there any routines for storing strings and sending them serially??

I would really like to move over to the PIC18 to get away from this paged memory but the web lacks many examples. At least its not too different.
 
In C to get a memory location instead of a value you use the & character in front of the variable

unsigned char var;

memorylocation = &var;
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top