|
Part 2: Revving It Up
by Fred Eady
Start ý Tera
Term Pro ý Road Test ý The
Hardware ý As a Web Server ý Branching
Out ý Making Changes ý ReadyýSet?
ý Go ý Sources
and PDF
For the last couple of weeks, Iýve been
chasing bits all over the Florida room. The S-7600A/PIC16F877 Internet
Engine is purring, and in this installment, Iýll take you all the
way through using it as a web server. However, before I begin the
technical discussion, there are some things I need to fix from last
month.
The boot loader has been revised to fix
some bugs and make it easier to use. The PCW builds an Intel hex file
and appends the whole thing with a semicolon followed by the PIC type
the file is intended to load into. That semicolon and the text that
followed it drove my boot loader menu crazy. The problem was that
the boot loader code didnýt know that the characters following the
last Intel hex line were bogus. It tried to load and analyze them.
So, I simply turned off the PICýs serial receiver in the UART and
delayed long enough to allow Tera Term Pro to spout all of the leftover
junk characters beginning with the semicolon.
A second potential problem involved the
boot code vector area. If for any reason the Tera Term Pro download
failed, the boot code vector for the failed program would be retained
in the NOPs area. If the S-7600A/PIC16F877 Internet Engine was allowed
to restart, it would vector to nonexistent or corrupted code. To avoid
this, I rewrite the boot code vector area with NOPs if the download
fails. This allows the boot loader to loop and wait until valid code
and a valid boot code vector are loaded. I also cleaned up the boot
loader listing to make it easier to follow. The results can be seen
in Listing
1.
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |