
March 15th, 2008, 12:39 AM
|
|
Contributing User
|
|
Join Date: Mar 2006
Posts: 46
Time spent in forums: 8 h 13 m 34 sec
Reputation Power: 3
|
|
|
Homework - A print function with HC12 microcontroller
HI,
I want to create a function that transmits characters to the printer and then print the entire line once all characters have been transmitted. I wrote the function in C.
The signature of the function is:
void print(char array[], unsigned char length)
where array is the array of characters to be printed and length is the length of the array
the MCU loads each character at the time into the line printer through a 8 bit data bus.
My problem is that I do know how to combine the use of my MCU ports with array[]!
If I want to store the character in array what kind of instruction should I use?
Please can someone help me here.
I can give more info if I was not clear enough.
Thank you
B
|