any ideas on how i can write a code to transmit an AT command from 8051 to zigbee serially? thanks in advance
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."