I need to feed a program in C into the 8051. The basic idea of the project is that an LED array rotates, and the LED sequence makes a particular string of characters displayed.
I am using the port 1 as the LED display, and the port 3 to connect through RS 232 to the comp from where I would enter the string. Can anyone guide me how I would do this connection from the microcontroller to the computer?
I understand the logic of the LED sequence (with delays) that must be displayed for each characters. But how do I get the micrcontroller to READ a particular entered string from a keyboard of the comp.
If I could know a program to do that, It could serially read and the program could direct it to the function of a particular alphanumeric. For instance if I have string "ST", it would go to a defined function:
void code_S (void)
{
P1=0x(1st hex value for LED sequence);
delay(ms);
P1=0x(2nd hex value for LED sequence);
delay(ms);
..
..
P1=0x(nth hex value for LED sequence);
delay(ms);
}
and then go to a function to display "T" like:
void code_T (void)
{
P1=0x(1st hex value of LED sequence);
delay(ms);
P1=0x(2nd hex value of LED sequence);
..
P1=0x(nth hex value of LED sequence);
delay(ms);
}
.
But my question is by what program could I get the microcontroller to read "ST" and branch into these functions? The return values and arguments are also void right?
Would like some help.
Thanks and regards,
Jay.
"Almost" Good Answers: