any ideas on how i can write a code to transmit an AT command from 8051 to zigbee serially? thanks in advance
You do know how 'C' marks the end of a string - don't you?
What if i want to transmit a long string? Maybe around 40 to 50 characters. Do i still send a character one at a time? No right? If not the code will be very very long.
If you want to walk 10 kilometers do you then take one step at a time, or do you suddenly take 100 steps at the same time?
You always have to send one character at a time.
Program becomes very long? Why? Haven't you actually tried to search for the keywords "string" and "array" on Google? A loop that sends all characters in a string/array doesn't take more space because the string/array contains 50 characters instead of 1 character. It's only the assign of the string/array that will be come a longer line until the string is so long that you need to split it over multiple source code lines.
const char string[] = "This is a long string of many characters to send."
Have you not heard of loops ??
If not, then you really need to get (back) to that basic textbook!