ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

AN S-7600A/PIC16F877 JOURNEY


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

AN S-7600A/PIC16F877 JOURNEY

Lessons from the Trenches 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

BRANCHING OUT

If you branch to the Menu function, youýll find that this function is a big switch statement that vectors the program execution to various other functions defined in the pre-main area. For instance, the first selection in Photo 4 calls Get_username( ) and so forth. There are also some routines that directly affect the S-7600A. If you take a look at the S-7600A pins C86 and PSX on the schematic, youýll see they are tied high. This puts the S-7600A in 68K MPU mode. If you compare the S-7600A datasheet timing diagram with the code in the W_Putc and S_Putc routines, youýll see that the code implements the time transitions found in the datasheet.

For this application, Tera Term Pro is set up to emulate a standard VT-100 terminal. For those of you familiar with DEC equipment, the VT-100 escape sequences in the pre-main functions will be familiar.

The main program begins execution with the initialization of the PIC I/O ports. Because Iým using PORTA as a digital I/O port, all of the analog capability of PORTA is disabled. Timer1 is enabled for 8-ýs cycles and used as a general-purpose connection timer. The clock and data lines for the EEPROM and DS1629 are floated, and the DS1629 is instructed to keep time and wait for requests for temperature from the PIC16F877 before beginning a temperature conversion.

If the username, password, phone number, and HTML have been entered previously, a push of the Esc key performs a hard reset on the S-7600A and a DTR reset on the external US Robotics 28.8 modem. The DTR reset is performed by writing 0x06 to the S-7600Aýs serial port configuration register.

The next task is to program the S-7600A internal clock divider to obtain a 1-KHz internal clock that is used for S-7600A internal affairs. The clock divider register contents are obtained by the following formula:

The clock frequency is the actual frequency supplied to the S-7600A. In this case, that is 7.3728 MHz through a 74HC4040 that divides by 32, which equates to approximately 230 KHz. Doing the math, that gives us a divide count of 0x00E5.

PREVIOUSNEXT


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.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ