Mike said:
It seems that I'm not getting what I want. Perhaps I shall fast forward.
Now I am able to share data at 56K with the PC if I make a "monitor" program. (one that interfaces with the terminal).
Here is the code I have so far when trying to make my dial-up server (on the 8051). Remember, this "server" will make the PC think it is connected to the internet.
Perhaps you should rewind instead of fast forward. It's fine that you want to put a web server on your 8051, but that shouldn't be your immediate goal.
Back up. Start small. Take it one little step at a time, like this:
- Connect an LED and a current limiting resistor in series between one of your I/O pins and +5V.
- From another I/O pin, connect a pullup resistor to +5V and a pushbutton switch to ground.
- Write a program that uses a simple delay loop to blink the LED on and off once per second. Don't go any further until you have this program working and properly commented.
- Write a program that turns the LED on for 1/4 second whenever you push the switch. Don't go any further until you have this program working and properly commented.
- Write a program that sends one character out the serial port every time you push the switch. Don't go any further until you have this program working and properly commented.
- When you do #5, you will probably find that you get more than one character when you push the switch. This is because the switch is probably bouncing. Figure out how to make your program "debounce" the switch. Don't give up on this step until your program sends one and only one character to the PC for each time you push the switch. Don't go any further until you have this program working and properly commented.
- Write a program that turns the LED on for 1/4 second whenever a character is received from the serial port. Don't go any further until you have this program working and properly commented.
- Write a program that echoes each character received from the serial port back to the PC. Don't go any further until you have this program working and properly commented.
- Write a program that receives characters one by one from the PC. If the character is a decimal digit, make the LED blink once for '1', twice for '2', three times for '3', etc. If the character is anything other than a decimal digit, make the LED blink very rapidly for two seconds. Don't go any further until you have this program working and properly commented.
Post your code for each one of these steps when you have it done. Every one of the experts on this forum went through this same exact process at one time or another, and they will have lots of good suggestions if you take it slow and easy.
-- Russ